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

List:       kde-core-devel
Subject:    Re: starting apps from kicker
From:       Waldo Bastian <bastian () kde ! org>
Date:       2000-05-09 18:20:08
[Download RAW message or body]

On Tue, 09 May 2000, pbrown@redhat.com wrote:
> On Tue, 9 May 2000, Waldo Bastian wrote:
> > Seems like a good candidate for "startServiceByDesktopPath( relPath +
> > fileList[id])" ....
>
> We really need a canonical example of how to do this in writing
> somewhere.  Right now people use any one of the following methods, and
> sometimes several in the same program!
>
> 1. fork + exec

You never want to use this unless you have a very rood reason why it is 
impossible to use KProcess.

> 2. KProcess

You want to use this if you need to start a new process which needs to be a 
child of your process, e.g. because you want to catch stdout/stderr or need 
to send it data via stdin. You should never use this to start other KDE 
applications unless you are a debugger :-)

> 4. startServiceByDesktopPath

Preffered way to launch desktop (KDE/Gnome/X) applications or KDE services. 
The application/service must have a .desktop file. It will make use of 
KDEinit for increased startup performance and lower memory usage. These 
benefits only apply to applications available as KDEinit loadable module (KLM)

> 3. KRun

Generic way to open documents/applications/shell commands. Will use 
startServiceBy.... where applicable (in the future). Offers the additional 
benefit of startup-notification.

Currently the difference between the roles of KRun and startServiceBy... are 
not completely clear. KDE 1.x only had KRun and with KDE 2.0 a lot of the 
functionality has migrated to startServiceBy....

Is there an appropriate place where I can add this as documentation?

Cheers,
Waldo

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

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