[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kinit: A new way to start KDE programs!
From:       Mario Weilguni <mweilguni () sime ! com>
Date:       1999-12-26 14:32:37
[Download RAW message or body]

Am Son, 26 Dez 1999 schrieb Waldo Bastian:
> On Sun, 26 Dec 1999, Mario Weilguni wrote:
> > Why don't you take real advantage of this design, and offer the
> > option to start programs later with kinit? This will allow many small
> > programs to run (e.g. kicker applets, kwin helpers...) long after
> > startkde has finished.
> 
> Well.. the Xmas dinner was waiting so I couldn't finish eveything ;-)
> 
> > I've implemented this last sunday for a complete KDE 1.1.2 desktop,
> > and I am running this modified desktop since Monday without problems
> > (ok, to be honest, there is a kfm problem I did not find yet...). You
> > only need kinit to accept execution request via a socket, pass argv,
> > argc, environment, current working directory and such, pass this
> > information from a small wrapper to kinit, which sets up an
> > environment and dlopens() the library. This will allow programs like
> > konsole (which I use alot) to use this approach too.
> 
> The next step would be to launch "ktrader" (to be written) after the 
> dcopserver. ktrader can take requests via DCOP and uses kinit to launch 
> processes. ktrader needs some communication with kinit: It could use a 
> pipe for this, since kinit launches ktrader anyway.
> 
> Do you think it is necassery to pass the complete environment?

Yes, it is. 

export DISPLAY=:1
konsole&

or

export PATH=~/whatever:$PATH
konsole&

Both will not work without.

If I understand this ktrader will do what in ESL the wrapper does, right? Then
you can't use DCOP, because DCOP requires qt, and this renders the approach
useless in regards of startup time. I used a plain and simply C-wrapper, with
almost no memory and time penalty. The executor (or kinit or whatever you call
it) may use DCOP, because it is linked against qt anyways. But the wrapper
should NOT use DCOP.

Beside the environment, you must also pass all command line arguments, the cwd.
Look in ESL, wrapper.c. And don't forget that the wrapper itself must be able
to start programs, because otherwise, this will not work:
1. as non-root user start a konsole
2. xhost +localhost (or use xauth, if you prefer)
3. "su root"
3. konsole

This assumes that konsole is in reality "libkonsole.so", and is started with a
wrapper. No other user may use kinit, so your options are to launch a kinit for
"root" too, or start konsole directly from the wrapper.

Ciao,
	Mario

-- 
Gute Nachricht: Windows 98 ist kompatibel. 
Die besten Experten suchen noch zu was eigentlich.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic