[SOLVED] Restore running programs, open windows etc. after logout login
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Restore running programs, open windows etc. after logout login
This is something I had no interest in doing but now I have a situation where I need to. I saw an item while searching for something else which talked about it but of course I can not find it again and I did not read it closely enough nor do I remember where to make the config change. In a nutshell...
I wish to setup a user so that when they logout with programs running and windows open and sized and located as desired and then they login they will have the same programs running, windows sized and located. The machine is running Ubuntu Mate 15.04. I can not find anything under Preferences. It may be in dconf-editor but I have not found the setting. Can anyone point me to the config change I need to make?
I wish to setup a user so that when they logout with programs running and windows open and sized and located as desired and then they login they will have the same programs running, windows sized and located. The machine is running Ubuntu Mate 15.04. I can not find anything under Preferences. It may be in dconf-editor but I have not found the setting. Can anyone point me to the config change I need to make?
Personally I suspend my PC rather than shutting down. When suspended it only uses very little power and I always have everything open like I left it. To do this automatically after x minutes of inactivity, I installed xscreenserver and run the script below in a cronjob every minute, which checks whether the screensaver is active.
Code:
#!/bin/bash
SCREENSAVER_ACTIVE=$(xscreensaver-command -time 2>/dev/null|grep -E "\ blanked" >/dev/null;echo $?)
if [ $SCREENSAVER_ACTIVE -eq 0 ];then
sudo /usr/sbin/pm-suspend
fi
Thanks ondoho! "save session" was the phrase I was missing in my search. It seems that the feature was ripped out of Ubuntu back about version 11.something. It is not clear if it has been put back in Ubuntu-Mate. The Linuxmint forums talk about a mateconf-editor which allows enabling the feature. However, it was referring to Mint 13 which I think was back in the pre-Ubuntu11.xx days. I do not find mateconf-editor in Ubuntu Mate 15.04. I have also found references to mate-session-save which I do have. I think it would require some programming to incorporate it into the shutdown process.
I generally use suspend on my normal desktop system. The situation where I (thought) I needed the save session feature was an old Netbook which I am recycling as an mp3 player for my shop. I have managed to get it setup without the need to save session. I added Audacity and Caja (pointing to the mp3 archive) to the startup applications list of a dummy account which is set to autlogin. A couple of tweaks to Audacity and it is working great.
Again, thanks for providing me with the key words which I needed to find more information than I wished to read on the subject.
I was reading about mateconf-editor as you were posting and I was posting my previous note. It appears to be gone these days and I have only dconf-editor which does not have the save session option. As I noted above I have my special application machine working. And I do usually use suspend on my desktop PC.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.