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?

up vote 10 down vote accepted

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

  • That works on Fedora 15 (is it even the same bug?). – Tshepang May 25 '11 at 7:40
  • If Fedora uses a vanilla Gnome3, then yes. So you got it working in spite of the bug, or with it? – jasonwryan May 25 '11 at 7:45
  • I didn't do anything special. I just selected the option, and can log out and in without a problem, and my session gets restored. – Tshepang May 25 '11 at 8:38
  • Odd. The bug is still open... Oh well, at least it is working for you. – jasonwryan May 25 '11 at 8:45
  • for what it's worth, this is most definitely working for me right now in Fedora 16. Thanks jason! – wrongusername Nov 18 '11 at 23:31

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."

Good luck!

  • 1
    This works on Ubuntu 16.04 – aggsol Jul 3 '16 at 10:34
  • Works on debian 8.6 – Pierre Dec 13 '16 at 15:47
  • I don't have dconf-editor, there is some problem with the graphic interface. How do you do this same operation using dconf in terminal? – user2820579 Dec 5 '17 at 0:36
  • Use gsettings, just look it up. – Hasasn Dec 6 '17 at 13:27

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.

  • Update: even with this setting, not really, yet, if at all in Gnome3/Unity. Fuller discussion at askubuntu.com/a/78692/38636 – Marcos Jan 31 '12 at 11:05
  • Or just gsettings set org.gnome.SessionManager auto-save-session true – goetzc May 4 '17 at 21:47

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.

  • Just to give an update, it runs fine from the Alt+F2 command window in gnome 3.4 from debian. – Alexandre Martins Jun 3 '12 at 5:00
  • in Ubuntu 12.04 LTS it runs from cli or Alt+F2 (Mod4+r in awesomewm). But running it from anywhere, the auto_save_session option doesn't appear. – isomorphismes May 15 '13 at 7:12

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.