3

At times, i have multiple konsole terminal open with multiple tabs. I would like to save and restore it manually, just in case i accidentally close the window. In KDE there is a command to save the current session manually via qdbus. I managed to save it using the command:

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession "mysession"

I've checked whether the KDE session was saved, using the following command and it shows the name of the session file i saved along with other system default sessions like saved by user and saved at previous logout

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.sessionList

I've also checked the files in the following path (i believe this is where the sessions are saved) , and it shows my saved konsole sessions. The timestamp tallies with the time where i run the saveCurrentSsession command.

/users/username/.kde/share/config/session

Now i'm trying to restore the session via command line. I've checked the /KSMServer commands and the command to restore the session is:

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSubSession

I ran the command (with my saved session's name as argument) but nothing happened.

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSubSession "mysession"

In some KDE forums, they said to run using the command ksmserver. I tried this as well and it gives out the following error at the konsole terminal Could not register with D-BUS. Aborting.

Anyone managed to get the restoreSubSession command working?

Btw, I'm using KDE 4.14.8

nabilishes
  • 31
  • 4

0 Answers0