On 2019-07-17 03:55:47 Stefan Krusche wrote:
Good day everyone,
until now it appeared to me that TDE is only able to save the current
session through TDE Menu -> Save Session.
At the same time, as long as I remember, the in this way subsequently
saved sessions turn up as a set of session files in
~/.trinity/share/config/session and stay there, i.e. are never deleted,
not even, when the session is saved next time. I have always wondered
because I have never found a way to access the "other", older saved
sessions…
Now. Also in ~/.trinity/share/config/ksmserverrc several sessions are
saved with instructions to load or delete their respective session files
in ~/.trinity/share/config/session.
Let's have a closer look. Out of curiosity I played with dcop and got
this:
$ dcop ksmserver ksmserver
[…]
void saveCurrentSessionAs(TQString)
[…]
So it seems there is a function "saveCurrentSessionAs" which would save
a session with an individual name given as an argument "(TQString)". I
tried:
$ dcop ksmserver ksmserver saveCurrentSessionAs "MySession"
No error. The session files are created in
~/.trinity/share/config/session just as when you would save a session
via TDE Menu -> Save Session.
Then I looked in ~/.trinity/share/config/session and voilá, there
appears a session with the name "MySession".
There are three sessions listed:
[LegacySession: MySession]
clientMachine1=localhost
command1=soffice
count=1
[LegacySession: saved at previous logout]
count=0
[LegacySession: saved by user]
count=0
which then are described under their individual tags, obviously the
information needed for ksmserver to restore them:
[Session: MySession]
[…]
[Session: saved at previous logout]
[…]
[Session: saved by user]
[…]
I am familiar with TDE's ability to start with "Session: saved by user"
and "Session: saved at previous logout" and have always thought "that
was it, there's no more ways to save and restore sessions" because these
are the only available options in TDE Control Center -> TDE
Components -> Session Manager. Until today when I found the above
mentioned method to save an additional session with it's own name.
Question: How to restore that session that I have saved with the
name "MySession"? Or is it a feature implemented only halfway…?
Any feedback welcome.
Kind regards,
Stefan
I also have wondered how to restore an old session.
Leslie