12

I'm running Ubuntu 13.10 and I don't seem to have any of the same menu items mentioned in other questions. In my "classicmenu" I have a "System Tools" > "Preferences" and then nothing about sessions.

According to Software Centre, I have Gnome Session Manager install, but there's no option to open it and searching for "session" in Dash reveals only "Startup Applications" which is not at all what I'm looking for and does not mention "session" anywhere.

I'm trying to access the Session Manger Dialogue depicted here: https://apps.ubuntu.com/cat/applications/saucy/gnome-session/

When I execute gnome-session in Terminal, I get:

gnome-session[5886]: WARNING: Failed to acquire org.gnome.SessionManager

EDIT I'm trying to enable the Automatically remember running applications when logging out. options under Session Options

5
  • it might help if you clarify, are you running stock Ubuntu(with Unity), Stock Ubuntu with Gome2 or gnome fallback installed, or Ubuntu-Gnome edition? I'm not sure the gnome-session will work with Unity(according to the description)
    – TrailRider
    Jan 15, 2014 at 23:53
  • i'm probably running the stock ubuntu. it's the one from ubuntu.com/download/desktop Jan 16, 2014 at 1:15
  • 1
    Yes that is the stock Ubuntu, looking at my install(12.04) I see that it is installed in my system as well and using the command in terminal gets me the same error. Reading the man page (man gnome-session) leads me to believe that this is one of the base files of Gnome that is included in Ubuntu, as Ubuntu's uses most of Gnome3s programs but uses Unity as the DE. As the config files listed in the man page do not exist on my system, I think that Ubuntu uses gnome-session to communicate with gnome programs but that the specific function you are trying to get do not exist.
    – TrailRider
    Jan 16, 2014 at 1:44
  • It might be better to edit your question to include what you were trying to accomplish with gnome-session, there is likely a way to accomplish it with Ubuntu's existing programs....
    – TrailRider
    Jan 16, 2014 at 1:46
  • @TrailRider, done. I'm trying to get Ubuntu to remember/restore my session. Jan 16, 2014 at 5:29

2 Answers 2

10

Edit: I am leaving the answer for informational purposes so that any future reader can see what was tried.(comments include additional info) It was discovered in the course of trying to resolve this that the desired function was removed. If any reader knows different please let me know

While the exact behavior is not possible, nearly the same thing can be accomplished by enabling hibernation. Be aware, however, that some systems do not support hibernation(the reason it was removed as a default option), so before you add the needed file in the following link Be sure to test it using the terminal command

How do I hibernate my computer?

for potential issue (and some workarounds) for hibernation/suspend see:

Why won't my computer turn back on after I suspended it?


I am using this question and answer for reference, but the answer is slightly different as the program name and the location of the settings have changed so I do not believe that the above question is quite a duplicate of my source Hence, I will post a new answer.....

Q:How do I make a program auto-start everytime I log in?>> A:To make a program start with Ubuntu:


The program you need used to be called gconf editor but is now called dconf editor

You can install it by installing the program dconf-tools

After you install it you can use the dash to open it as Dconf Editor.

There is a tree on the left of the window that you can use to navigate to the correct settings page.

The path is: org>>gnome>>gnome-session

You will then be presented with a screen that looks like this:

enter image description here

Where the mouse pointer in the screenshot is is the setting that you want to select by checking the box.

This should then save the current running programs and start them again when you reboot. The settings are saved when you check the box, there is no save button that you need to click before closing dconf editor.

Warning: This will only save a list of the applications to restart the next time you reboot, it will not save any unsaved statuses (i.e. any unsaved documents) on shutdown and all unsaved work will be lost.(Likely an unneeded warning but better to include it anyway)

If you want to disable this you can do it by simply unchecking the box.

As my source answer states, this may significantly slow down your boot if you have a large number of open programs when you shut down....I would also add that Firefox does not like it when you shut down your computer when it is running, it will do not damage but it will entirely wipe out your internet cache(saved webpages), but it will leave your cookies intact---if you have your cookies set to delete when the browser closes, you would need to verify that the cookies was removed, I'm not sure if they will be or not. I can give no guidance on Chrome/chromium, I use neither one.....


I have to add a caveat to my answer, I did not try this to verify, but, I have no reason to believe that it will not work. My source answer was an accepted answer with 29 upvotes and the settings are still available, albeit in a different location......

11
  • 2
    btw this did not work (I enabled both auto-save options). When I restart my computer it does not re-open the programmes and files I had open in my last session. Jan 17, 2014 at 18:52
  • 2
    hmm well of more extensive digging I have discovered that this option has been completely removed dug to bugs....some of the best explanations, or links to them, can be found on AU....askubuntu.com/q/201778/65969....http://askubuntu.com/q/78207/…, I found other sources on the web but they basically just include the info in these answers, so I will not bother to try and link to them as well.
    – TrailRider
    Jan 18, 2014 at 2:11
  • 1
    I tested the settings on my computer and tried several different things to get it to work but nothing did which prompted my to do some more extensive searching, which lead me to the links I included above....Wish I could have been of more help, but the developers had other ideas....
    – TrailRider
    Jan 18, 2014 at 2:19
  • 1
    I guess about the only way you can do this(as a workaround) is to hibernate your computer....you must have at least as much swap space as you do RAM. You can do this from a terminal by typing sudo pm-hibernate this will allow you to test that it will work on your system(it was removed from the shutdown options because it was very buggy on a few computers). If it works you can continue to hibernate using the terminal, or you can re-enable hibernation to show it as a selection in the {gear icon} menu.
    – TrailRider
    Jan 18, 2014 at 2:21
  • 1
    hibernation is a viable alternative, if your system supports it(I believe that most do) It will save all open program at their current status(including unsaved work, but I would save anyway) Linux can go long term without hard reboot-kernel and a few other updates will require it. in the event of a bad save/corrupted reload, you will need to reboot but that is rare in my experience.... While booting you will get a blank black screen while the image is loaded into RAM and it will take a little longer(10 sec.?) than a normal boot
    – TrailRider
    Jan 18, 2014 at 16:51
5

The command line alternative:

dconf write /org/gnome/gnome-session/auto-save-session true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .