35

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?

tshepang
  • 65,642

5 Answers5

19

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!

Hasasn
  • 291
11

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

jasonwryan
  • 73,126
2

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.

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

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

1

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.

Kevin
  • 40,767