How does ksmserver start applications?

Lubos Lunak l.lunak at
Tue Aug 27 17:17:45 BST 2002

On Tuesday 27 August 2002 14:14, Roland Seuhs wrote:
> > > > On Tuesday 27 August 2002 12:26, Lubos Lunak wrote:
> >
> > Yes, it's handled by KWin. KWin asks X to redirect window mapping to
> > KWin, and before the window is actually shown, KWin applies geometry,
> > etc. saved from the session. And no, your application cannot do the same,
> > it'd have to ask KWin to do it (e.g. now placing windows of newly started
> > app on the desktop they were started on is handled this way - but I guess
> > it refuses to use non-existing virtual desktop).
> I don't understand, why can't my app tell KWin?

 Since right now there's no such support for it in KWin. And let's now forget 
those foolish people trying to use a different WM with KDE.

> Well, the problem is that it works only with Konqueror, but I'd like to use
> it for Mozilla and especially StarOffice, too. Other people will probably
> like to use it for other programs. On next-generation computers with 2GB or
> more RAM, you probably want to use it for *all* apps. Disk-drives get
> bigger but not much faster, so app-start-up of nontrivial graphical
> applications time will *NEVER* be instantaneous (<50ms) using conventional
> methods. (Although cashing isn't that unconventional either, it happens all
> the time) IMO, it's the way computers should behave. You click an icon and
> a window pops up - immediately. Heck, we currently have 2002 and no
> operating system behaves like this, isn't that a shame?. It would be great
> if KDE could change that - for ALL apps.
> Also I think that such a feature does not belong into the app, the DE
> should handle it, IMO. Implementing that on application-level seems like a
> massive duplication of effort.

 I'd say it's actually the system (kernel etc.) itself that should handle it 
(and that's why we have kdeinit and other hacks, right? :-/ ).

> If I can somehow overcome the focus-problem, I think this app will make KDE
> usable for many users which find KDE currently too slow. A KDE/Linux system
> caches data on so many levels (CPU, disk-cache in RAM, disk-cache on HDD)
> why not cache whole apps to eliminate start-up time once and for all? Also,
> my app doesn't interfere with any other things in KDE.

 Well, I personally don't like these details:
- this hidden app(s) will most probably get session managed just like others, 
so it will make KDE startup time even longer (which is for many people 
actually the reason they say KDE is slow).
- the hidden app may eat some CPU time (not that much though I guess)
- it's not going to work reliably for all apps (they may e.g. popup a modal 
dialog sometimes, which would look strange since the app is not "running")
- technically it's probably better to avoid hacks like 'hidden desktop 16', 
and hide the window completely instead
- this all will be IMHO just one big ugly hack

 Hmm, ok. Looks like nothing really preventing you from doing it :). For the 
focus problem, you can for now probably use doNotManage() from KWin's DCOP 
interface, the argument is regexp for window title, first matching window 
won't be shown. In case your utility shows to be really useful, there can be 
written something better in KWin than this ugly (yes, you guessed it) hack 

Lubos Lunak
SuSE CR, s.r.o.  e-mail: l.lunak at , l.lunak at
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic

More information about the kde-core-devel mailing list