[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    ksmserver: multiple sessions / checkpoints
From:       Matthias Ettrich <ettrich () trolltech ! com>
Date:       2002-04-30 18:16:54
[Download RAW message or body]

Hi,

Finally I came around doing some work on kapplication and ksmserver to support 
both multiple sessions and checkpoints. 

I haven't yet done anything to the GUI, because I believe this needs to be 
done very carefully (meaning as little intrusive and confusing as possible).

Note that the renaming of sessions will not work properly for applications 
using older Qt or KDE libraries. Futhermore Qt 3.0.x applications not using 
KDE will have the same problem (for compatibility reasons I did the fix only 
for the upcoming 3.1 as it introduced a new symbol). The problem is that 
those application store their session data only tagged with the sessionId, 
not tagged per saveYourself (we call that a sessionKey). This could and can 
result in all sorts of confusing effects: Broken session data when a shutdown 
was cancelled, missing session data when another session was discarded etc.

But those are problems of the past. Now everything is nice, beautiful and how 
it should have been, at least once the bugs are out of my implementation :)

Kudos go to Havoc Pennington, who figured out this missinterpretation (or 
rather simplification) of the XSMP specs in KDE.

Here's what's there yet:

ksmserver's default dcop interface looks like (only the new functions):

$ dcop ksmserver default
	QStringList sessionList()
	QString currentSession()
	void saveCurrentSession()
	void saveCurrentSessionAs(QString)

currentSession() typically returns "default". With 

$ dcop ksmserver default saveCurrentSession

you can do a non-interactive checkpoint. This should probably be support 
through the K menu.

With 

$dcop ksmserver default saveCurrentSessionAs MyWorkSession

you do a checkpoint under the new name "MyWorkSession". If that was 
successful,  currentSession() will return "MyWorkSession" and sessionList() 
will return { "default", "MyWorkSession" }

The session are stored in the ksmserverrc like this

[Session]
... // the default session, as before

[Session: MyWorkSession]
 ... // the work sessoin


Last but not least startkde now supports a command line argument: the session 
name. It simply passes that on to ksmserver:

    kwrapper ksmserver --restore "$1" 


Now all we would need is to have some support in kdm to make not only "KDE" 
(the default session) but also the other possible sessions available to the 
user.

Having an extra GUI after kdm to select the session you want to restore is out 
of the question in terms of usability, I think.


Enjoy,

  Matthias

btw: Before somebody asks for it: switching session at runtime is not possible 
for various reasons, the biggest problem being clients not participating in 
the session and the different AutoStart phases during KDE's startup. But 
since KDE 3 starts up as fast as it does, this isn't a problem, I hope. CDE 
cannot do it either.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic