How to save a GNOME 3 session

GNOME 2 allows one to either save the session automatically or manually (i.e. save the session as it looks right now). This is a nice feature because it restores the various desktop states between logins (and system restarts):

  • which apps were open
  • where (physically) on the desktop were they open
  • what specific window sizes were these apps set to

Looking around, I can’t find the feature in GNOME 3? Did I not look hard enough?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Try using dconf Editor, here are the steps

  1. Open dconf Editor
  2. Goto org/gnome/gnome-session
  3. Check the property called “auto_save_session

The description says “If enabled, gnome-session will save the session automatically.

If you don’t have dconf Editor installed, the setting can also be changed via the command line with:

gsettings set org.gnome.SessionManager auto-save-session true

Good luck!

Method 2

Normally you would Alt-F2 to run gnome-session-properties, and select “Automatically remember running applications when logging out” under the Options tab.

However, it is broken at the moment. There is a bug filed:

https://bugzilla.gnome.org/show_bug.cgi?id=647359

Method 3

Sadly in 11.10
gnome-session-properties
doesn’t offer any Option tab with Auto Save Session toggle.

So I installed gconf-editor to flip /apps/gnome-session/options/auto_save_session to TRUE.

Not sure if it works. Once I had to add that missing key as boolean.

Method 4

I wrote a little library/command line tool which allow saving and restoring sessions and has support for different monitors setups as well as virtual desktops. It requires NodeJS to be installed.

Installation

npm install -g linux-window-session-manager

Usage

Save the current session to ~/.lwsm/sessionData/DEFAULT.json

lwsm save

Save the current session to ~/.lwsm/sessionData/my-session.json

lwsm save my-session

Restore the session from ~/.lwsm/sessionData/DEFAULT.json

lwsm restore

Restore the session from ~/.lwsm/sessionData/my-session.json

lwsm restore my-session

Gracefully close all running apps before starting the session

lwsm restore --closeAllOpenWindows

Check it out: https://github.com/johannesjo/linux-window-session-manager

Method 5

It works from the CLI – gnome-session-properties brings up the dialog. I’m not sure where it is on the menu. You can’t run it from the Alt+F2 command window with that command though.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x