Web lists-archives.com

Re: manually reload Dolphin session?

see reply inline

On Tue, May 8, 2018 at 4:14 PM, Kevin Krammer <krammer@xxxxxxx> wrote:
On Dienstag, 8. Mai 2018 19:08:19 CEST Bug Reporter wrote:
> Thanks for the helpful responses. See comments inline.
> On Tue, May 8, 2018 at 1:23 AM, Duncan <1i5t5.duncan@xxxxxxx> wrote:
> > Bug Reporter posted on Mon, 07 May 2018 18:49:16 -0400 as excerpted:
> > > I often keep a lot of tabs open in Dolphin and I would like to be able
> > > to open all those tabs / locations again. I have seen an old feature
> > > request for Dolphin saved sessions. I'm not asking for that. I just want
> > > to know if I can do it manually. For example, I see some older session
> > > files that seem to belong to Dolphin. Here's an example:
> > >
> > > /home/myuser/.config/session/
> >
> > dolphin_10d1d6cd65000151042956000000012150067_1510464775_250905
> >
> > > Are files like that currently used by Dolphin? If I have one, can I
> > > reload it into Dolphin?
> >
> > AFAIK those are your kde/plasma session restoration files, not dolphin
> > session files.
> That could be. See next comment.
> > The default is restore the previous session, and these session files are
> > the session-manager's method of tracking what's open, with window sizes
> > and locations, virtual desktop, activity, etc.
> >
> > That dolphin file, therefore, is unlikely to contain specific information
> > about the dolphin session, but rather, where your dolphin windows were in
> > that particular session when you logged out.
> If I leave Dolphin open when I log out of Plasma desktop, upon logging back
> in Dolphin is restored with all my open tabs and each location within the
> split views of those tabs remembered as well. It even remembers which tab
> was active. So not only is window size and position remembered, but many
> details of the Dolphin session are remembered. Since this can be done when
> logging out of the desktop, my preferred solution is to find where that
> info is stored, make a copy of it with a "session name" and then load it
> manually on demand. I assume I might have to use the dbus scripting hint
> provided below by stephen to accomplish this. However, I guess the first
> obstacle is finding there this Dolphin session info is saved. I have not
> been able to find it yet.

Saving a session is handled by a component called the session manager.
Each of the X11 desktop shells implements one but the interface is
standardized so it more or less works with all applications that support it no
matter which desktop they are running on.

On a KDE Plasma Desktop the session manager KSMServer, D-Bus name

For example to trigger saving the current session the following command should

$ qdbus org.kde.ksmserver /KSMServer \

It is also possible to activate that in System Settings, i.e. to manually save
a session and have that restored on login instead of saving at logout.

Might be possible to restore only part of a session, haven't looked too
closely at the capabilities.

Thanks Kevin. With the information you provided I was able to search more effectively. I found this interesting answer:

However, it states that "Session data is stored in: ~/.kde4/share/config/ksmserverrc". On my system that location does not exist. The find command does not show any files by that name in any location on my system. What is the Plasma5 location where KSMServer saves these session files now? (Is there some reference for

Also, is there any difference in the result of running these two commands?

    dbus-send --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession
    qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession