manual vs automatic saved sessions
Tim Middleton
x at Vex.Net
Tue Dec 16 12:43:03 GMT 2003
Can i use dcop to save a "logout" sessoin" at any time?
I have been searching for some time for a way to save my desktop session
periodically. In my scratchings I had heard mention of a "Save Session"
option on the kmenu... but could never find it. The popup popup help on the
Sessoin Manager control pannel even says it is there. But it is not.
I *finally* discovered a post to the debian-kde mailing list (though i don't
use debian myself) where someone shared the great secret... you have to
actually select and apply the "Restore manually saved sessions" option on the
control pannel before the option appears. Is this not rather obscure?
The original query in the thread I found that revealed this occult knowledge
actually was looking for a similar solution to myself. But it doens't seem to
be in KDE, strangely...
My problem is that my box for various reasons is often unstable and crashes.
The session restoring code in KDE is wonderful... except that when my box
crashes the sessions are not saved, and i end up booting up and restoring
whatever session was saved days or weeks ago. This renders the feature next
to useless (since i rarely ever shut down except for crashes).
So now I have at long last found the way to save the sessions manually... I
can at least do that periodically. It seems I will also have to remember to
do it if i ever do log out as well... having set it to manual, there seems to
be no option on the logout dialog to save session.
What would be ideal is to have KDE save sessions automatically at an interval.
This functionality doesn't seem to be in KDE... so I was wondering if there
is a dcop call that i could cron to do this...
I have discovered using kdcop the ksmserver.ksmserver.saveCurrentSession()
and .saveCurrentSessionAs(QString) ... and .sessionList(). Using the latter
at the comand line I see:
$ dcop ksmserver ksmserver sessionList
default
saved at previous logout
saved by user
Can i assume saveCurrentSession() saves to "saved by user"? Is there any
problem with my executing any time I want:
$ dcop ksmserver ksmserver saveCurrentSessionAs "saved at previous logout"
Will that do what I think it does? Ie. behave as if i was saving a session at
logout... and thus, if my box crashes it will automatically restore (if i set
the Session Manager back to "Restore prevoius sessoin")? This way if I do log
out the sessoin will also be saved and restored automatically.
If not, am I on the right track? I could save to default, or "saved by user",
but then i don't get the automatic save behavior if I log out...
--
Tim Middleton | Cain Gang Ltd | One afternoon, disgusted, bravo, you fall
x at veX.net | www.Vex.Net | asleep. --T.Lilburn (MS)
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list