<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 8, 2018 at 6:36 PM, Bug Reporter <span dir="ltr"><<a href="mailto:bugreporter11@gmail.com" target="_blank">bugreporter11@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">see reply inline<br><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Tue, May 8, 2018 at 4:14 PM, Kevin Krammer <span dir="ltr"><<a href="mailto:krammer@kde.org" target="_blank">krammer@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_1038488426950111238gmail-HOEnZb"><div class="gmail-m_1038488426950111238gmail-h5">On Dienstag, 8. Mai 2018 19:08:19 CEST Bug Reporter wrote:<br>
> Thanks for the helpful responses. See comments inline.<br>
> <br>
> On Tue, May 8, 2018 at 1:23 AM, Duncan <<a href="mailto:1i5t5.duncan@cox.net" target="_blank">1i5t5.duncan@cox.net</a>> wrote:<br>
> > Bug Reporter posted on Mon, 07 May 2018 18:49:16 -0400 as excerpted:<br>
> > > I often keep a lot of tabs open in Dolphin and I would like to be able<br>
> > > to open all those tabs / locations again. I have seen an old feature<br>
> > > request for Dolphin saved sessions. I'm not asking for that. I just want<br>
> > > to know if I can do it manually. For example, I see some older session<br>
> > > files that seem to belong to Dolphin. Here's an example:<br>
> > > <br>
> > > /home/myuser/.config/session/<br>
> > <br>
> > dolphin_10d1d6cd65000151042956<wbr>000000012150067_1510464775_<wbr>250905<br>
> > <br>
> > > Are files like that currently used by Dolphin? If I have one, can I<br>
> > > reload it into Dolphin?<br>
> > <br>
> > AFAIK those are your kde/plasma session restoration files, not dolphin<br>
> > session files.<br>
> <br>
> That could be. See next comment.<br>
> <br>
> > The default is restore the previous session, and these session files are<br>
> > the session-manager's method of tracking what's open, with window sizes<br>
> > and locations, virtual desktop, activity, etc.<br>
> > <br>
> > That dolphin file, therefore, is unlikely to contain specific information<br>
> > about the dolphin session, but rather, where your dolphin windows were in<br>
> > that particular session when you logged out.<br>
> <br>
> If I leave Dolphin open when I log out of Plasma desktop, upon logging back<br>
> in Dolphin is restored with all my open tabs and each location within the<br>
> split views of those tabs remembered as well. It even remembers which tab<br>
> was active. So not only is window size and position remembered, but many<br>
> details of the Dolphin session are remembered. Since this can be done when<br>
> logging out of the desktop, my preferred solution is to find where that<br>
> info is stored, make a copy of it with a "session name" and then load it<br>
> manually on demand. I assume I might have to use the dbus scripting hint<br>
> provided below by stephen to accomplish this. However, I guess the first<br>
> obstacle is finding there this Dolphin session info is saved. I have not<br>
> been able to find it yet.<br>
<br>
</div></div>Saving a session is handled by a component called the session manager.<br>
Each of the X11 desktop shells implements one but the interface is <br>
standardized so it more or less works with all applications that support it no <br>
matter which desktop they are running on.<br>
<br>
On a KDE Plasma Desktop the session manager KSMServer, D-Bus name <br>
org.kde.ksmserver<br>
<br>
For example to trigger saving the current session the following command should <br>
do<br>
<br>
$ qdbus org.kde.ksmserver /KSMServer \<br>
   <a href="http://org.kde.KSMServerInterface.sa">org.kde.KSMServerInterface.sa</a><wbr>veCurrentSession<br>
<br>
It is also possible to activate that in System Settings, i.e. to manually save <br>
a session and have that restored on login instead of saving at logout.<br>
<br>
Might be possible to restore only part of a session, haven't looked too <br>
closely at the capabilities.<br>
<br><span class="gmail-m_1038488426950111238gmail-HOEnZb"></span></blockquote><div><br></div></div></div><div>Thanks Kevin. With the information you provided I was able to search more effectively. I found this interesting answer: <br><a href="https://superuser.com/a/958694/69231" target="_blank">https://superuser.com/a/<wbr>958694/69231</a><br><br></div><div>However, it states that "Session data is stored in: <code>~/.kde4/share/config/<wbr>ksmserverrc</code>". 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 <br><br></div><div>Also, is there any difference in the result of running these two commands?<br><br>    dbus-send --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.<wbr>saveCurrentSession<br>    qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.<wbr>saveCurrentSession<br></div><div><br></div></div></div></div></div>
</blockquote></div><br><div class="gmail_extra"><br></div></div><div class="gmail_extra">I was able to confirm that files such as $HOME/.config/session/dolphin_10d1d6cd65000152582669600000014080063_1525833493_964930 contain information about Dolphin tabs, locations opened in those tabs and even the currently selected file in each file pane. That information would be very useful to save and restore manually.<br><br></div><div class="gmail_extra">I was able to use method "void org.kde.KSMServerInterface.saveCurrentSessionAs(QString)" to create a named session within ~/.config/ksmserverrc. It contains the above referenced Dolphin session.<br><br><div class="gmail_extra">However, I'm not 
finding documentation on these methods shown below. Could these be used to save a 
Dolphin-only session and then restore that Dolphin session?</div><br>method void org.kde.KSMServerInterface.saveSubSession(QString, QStringList, QStringList)<br>method void org.kde.KSMServerInterface.restoreSubSession(QString)<br><br></div><div class="gmail_extra">Does anyone have examples of using the above methods?<br><br></div><div class="gmail_extra">The KDE reference I found (<a href="https://api.kde.org/4.x-api/kde-workspace-apidocs/plasma-workspace/html/classKSMServerInterface.html">https://api.kde.org/4.x-api/kde-workspace-apidocs/plasma-workspace/html/classKSMServerInterface.html</a>) apparently doesn't list all the methods, and it also doesn't provide examples that would be helpful to a non-developer as far as I can tell.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Here's one useful reference I found:<br><br><a href="https://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/">https://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/</a><br></div><div class="gmail_extra"><br></div></div>