Autostart (Was: Third-party sessioning requests)
halfline at hawaii.rr.com
Sat Jan 10 04:02:26 EET 2004
> We have a bunch of such keys in KDE already:
> X-KDE-autostart-condition: a reference to a configuration entry which
> determines whether the application should be started or not. That way you
> don't need to mess around with .desktop files if you want to
> certain the autostarting of an application from a program. This probably
> needs some attention if we are going to standardize this.
> This looks at $KDEDIR/share/config/klipperrc, looks up the key
> AutoStart= in
> the [General] group and assumes "true" if no such key is present.
This one sounds like it probably should remain kde specific. AFAIK, the
configuration file format isn't standardized, so this key doesn't make
much sense standardized either. Unless I'm wrong?
> X-KDE-autostart-after: References another autostarted application by
> the name
> of its .desktop file (without the .desktop extension)
This probably would be good, but it's not entirely clear to me how this
interact with the _DSME_Priority (or whatever this becomes from
Lubos in the other thread) which clients are going to set when they are
Also, clients may need to be started after a program with a specific role,
versus after a program with a specific .desktop file. We should probably
add something to cover that too, but then we'll need a new key for
what the role is (like autostart-role=panel or whatever)
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
in, the program is going to be in two places, the session file and
Is this correct? How do you prevent it from being started twice?
> X-KDE-autostart-phase: We recognize two different phases during startup:
> 1: After the WM has started but before the rest of the (saved) session
> been restored
> 2: After the (saved) session has been restored
As Lubos pointed out, certain clients (those with the setup role) should be
started before the window manager. Maybe instead of having two phases, it
would be better to just specify the startup orders for the standard roles,
2) window manager
3) desktop handler
5) desktop component
Then .desktop files have a number of choices:
* They can do nothing at all, which would imply role normal and they
started last (or among the last few started).
* They can specify "autostart-role=desktop component", which would get
started from the order in the list above.
* They can specify "autostart-after-role=window manager" (or whatever) and
then they would be started after all the clients of a specific role are
started. I guess X-KDE-autostart-phase=2 would be
* They can specify "autostart-after: kdesktop" (or whatever) and then they
would be started after a specific other .desktop file is started.
Thanks for working through this with me,
More information about the xdg