Xfce vs. KDE

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Fri Nov 19 02:02:01 CET 2004


Ok, I just investigated another 2 hours tracing the konqueror/KDE 
general session management bug - quite handy to have a session manager 
that generates verbose output :-).

What I figured so far:

a) KDE apps store session data in files ~/.kde/share/config/session, 
where the filename is build from the app name, the session id and some 
other random numbers: <appname>_<sessionid>_<num1>_<num2>

b) the client specifies the last part of the filename in the 
RestartCommand, e.g. for konqueror:
   konqueror -session <sessionid>_<num1>_<num2>

c) The client sets a DiscardCommand that removes this session file 
afterwards.

This is mostly automagically handled by KApplication (and 
QSessionManager), and works for the first (and sometimes second) restart.

But on the 2nd or 3rd session with the final SaveYourself (on logout), 
the KDE apps specify the wrong <num2> and <num1> in the RestartCommand 
and delete the previously set DiscardCommand. Looking through the 
KApplication source, this seems to happen, when the pSessionConfig 
object isn't present. So, to sum up, the KDE app restores correctly when 
spawned by the session manager, but then looses the correct state 
internally for some reason and supplies invalid properties to the 
session manager; the result is that the app doesn't fire up correctly on 
next startup (because it broke its own RestartCommand previously).

So far so good. This explains why KDE apps don't work correctly with all 
session managers (xfce4-session, gnome-session and xsm). What makes me 
wonder is, why do they work with ksmserver? What kind of voodoo magic is 
required to unbreak KDE apps? Looking through the ksmserver source 
doesn't show anything interesting, but afterall ksmserver isn't the most 
standard-compliant session manager either. I'm too tired to dig in the 
kdelibs source any further.

So if any KDE user/developer knows the magic key to unbreak KDE apps, 
please let me know.

regards,
Benedikt



More information about the Xfce4-dev mailing list