Autostart (Was: Third-party sessioning requests)

Lubos Lunak l.lunak at suse.cz
Sun Jan 11 01:45:17 EET 2004


Dne Sunday 11 of January 2004 00:34 l.lunak at suse.cz napsal(a):
> > Actually I have a broader question for you.  Once a program is started
> > from autostart it registers with the session manager and becomes part of
> > the user session right?  Then if the user saves session the program is
> > going to be recorded in ksmserver's user session file I assume.  So next
> > time the user logs
> > in, the program is going to be in two places, the session file and
> > autostart.
> > Is this correct?  How do you prevent it from being started twice?
>
>  Actually that's mostly what the autostart condition is for. Apps started
> this way specify RestartNever for SM, and use the autostart condition to
> specify whether the app should be restarted or not. I've never liked this
> much (but apparently not that much to make me think about something
> better). This can get ever a bit more complicated with the fact that many
> utilities which I believe should be panel applets are systray apps, and
> even if the user decides not to save KDE sessions, they still expect things
> that are "part" of the panel stay in the panel even after KDE restart (if
> you want to see something bizarre, start KDE, quit Klipper from systray,
> say that you don't want it restarted, and later try to find out how to
> re-add it permanently - things like this are the reason why I don't like
> this way).
>
>  Maybe this could be handled by changing those apps to applets or making
> them use RestartAnyway. I'm not sure if this would solve all cases though,
> we use the condition even for KTip (i.e. whether to show a tip after KDE
> startup).
>
>  This would of course require that the SM manager reads both its saved
> session and the autostart directory and ignores the apps in the autostart
> directory that are in the saved session. This would also solve the problem
> how to specify what has to be started for the very first time when you have
> nothing at all the session.

 No, this wouldn't work :(. RedHat puts both KDE and GNOME in /usr, so both 
have their to-be-started apps in /usr/share/autostart, the user logs in for 
the first time, and get KDE and GNOME together, minus the components like WMs 
which detect the conflict and only one of them wins. With WMs it could get 
wrong also e.g. if KDE has KWin as the default WM to be started, but the user 
switches to Metacity instead - on the other hand, limiting to only one WM 
wouldn't work because of the already mentioned problem with dualhead and WMs 
per screen.

-- 
 Lubos Lunak
 KDE Developer



More information about the xdg mailing list