Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to save current session (the applications + the organization of windows in desktops) in Unity and load it when needed?

share|improve this question
up vote 4 down vote accepted

No - as you've described it is not currently possible on Ubuntu versions 11.04 and up.

You may read this bug report, comment 24 in particular

or here is a more complete explanation (too long to copy here)?

share|improve this answer

I have made a workaround that is a script that helps to configure your session. Just paste this at terminal:

cd ~/ && wget -c && chmod +x ~/session.config && ~/session.config

You can view the code of script ( ), there are explanations in each part. It will create a startup script which will move to each viewport and open the specified application.

Also you can run it whenever you want just press Alt + F2 and paste ~/.sessionconf.


To remove any changes made by my script just delete this files:

  • ~/session.config
  • ~/sessionconf
  • ~/sessionconf.bak
  • ~/.config/autostart/sessionconf.desktop

Or run this at terminal:

rm ~/session.config ; rm ~/sessionconf ; rm ~/sessionconf.bak ; rm ~/.config/autostart/sessionconf.desktop  
share|improve this answer

You can do this: killall gnome-session. As we know that entering the command sudo gnome-session-save --logout will log out the system. This will save the current session on Unity. I have tried this.

Or may be you can read about how to make a program auto-start everytime you log in.

Or you can try this gconf-editor key:

/apps/gnome-session/options/auto_save_session = true
share|improve this answer
What is gnome-session-save? I get "command not found". And I can't find it in repository. "Unable to locate package gnome-session-save". – Sanjay Manohar Mar 27 '15 at 22:23

dconf write /org/gnome/gnome-session/auto-save-session true Should enable this for you.

share|improve this answer
Not working on 14.04 :( – AlikElzin-kilaka Jan 29 '15 at 23:20
I also cannot get it to work on 14.04. The property is changed correctly, but nothing gets restored. Do you know where the session data is stored? That way I could find out if it's actually being saved. – Sanjay Manohar Mar 27 '15 at 22:22

This script works great for me on Xubuntu. It's more or less desktop-agnostic and in theory should also support Unity. From the original blog post by Arnon Weinberg:

GNOME session save and restore

This script is used to save and restore a desktop session.

Why this script?

Some desktop managers do offer some session management features. Under GNOME it may be possible to run gnome-session-properties manually and turn on “Automatically remember running applications when logging out”. However, some GNOME implementations (notably Ubuntu’s) appear to be deemphasizing or deprecating this feature in favour of the Suspend or Hibernate feature.

Both the automated session save and suspend feature however are limited to saving/restoring sessions only on clean logout/login.

I use this script because sometimes I just need to reboot, and sometimes I like to restore my session to a previous state.

How to use:

Download the script, place it on your PATH, and be sure to give it executable permissions.

To save the current session:

session save

To restore the saved session:

session restore

Installation on Ubuntu

The installation instructions provided in the blog post are valid for Fedora. On Ubuntu you will have to install the following dependencies:

sudo apt-get install perl wmctrl xdotool x11-utils

Please make sure to check out the 'Details' section of the original blog post to find out more about the different session restore levels.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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