reopening the session management discussion...
benedikt.meurer at unix-ag.uni-siegen.de
Tue Sep 2 14:26:04 CEST 2008
Brian J. Tarricone wrote:
>>>>> * App can never "accidentally" fall out of the session due to a
>>>>> crash (I guess I'm the biggest offender here). App will always be
>>>>> started when the DE starts unless the user disables it.
>>>> Inmplementing SmRestartImmediately in xfce4-session would solve the
>>>> problem without loosing the flexibility of session management.
>>> Well, who wants to do that? Benny doesn't seem to be around, and I
>>> feel like there must have been a reason why he didn't implement it
>>> in the first place.
>> I reallty see no reason other than no time or interest.
> I looked through the xfce4-session source for maybe a code comment
> explaining the omission, but I didn't see anything. I also thought
> Benny had talked about it on the ML at some point, but a search of the
> archives didn't yield anything (perhaps I just suck).
The SmRestart thing is really tricky to get right and not very useful in
general. There are several special cases to consider: I.e. stop
respawning after a number of failed retries (app dumps core on startup),
user killing xfwm4 to replace it with metacity (xfce4-session will
restart xfwm4 immediately), and so on. Afterall the XSMP is not very
well designed for todays needs (gnome-session is probably the most
complete implementation and it is a total mess for this very reason).
SmRestartImmediately makes sense for core desktop services only, and for
those it would be better to have some kind of autostart using a special
D-Bus service name (allowing replacement). I.e.
org.freedesktop.WindowManager for the window manager; then i.e. starting
metacity would simply replace xfwm4 as window manager, simple and
straight forward. The session manager would simply ask the well-known
core services (maybe extracting their defined names from some config
file) for its startup command on logout (IIRC this is already possible
using the dbus-daemon). For the automatic restart it would be sufficient
to watch the name registration signals from the bus daemon and Ping the
service name once a name is lost. It would even be possible to migrate
existing applications easily providing a simple wrapper binary, which
does the D-Bus part.
More information about the Xfce4-dev