desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #100851
[Bug 771896] Re: No way to save current session
Unfortunately this (https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1037616/comments/4) does not work for me.
I'm on Ubuntu Trusty with Gnome3 (gnome-session 3.9.90-0ubuntu12).
I started with the following workaround (manual method see bottom for a
automated one):
1) download dex (https://github.com/jceb/dex) to e.g. ~/dex and make it executable (chmod +x ~/dex)
2) execute this in a terminal:
$> dconf write /org/gnome/gnome-session/auto-save-session-one-shot true
or if you like to save every session:
$> dconf write /org/gnome/gnome-session/auto-save-session true
3) open the apps you want to have been restored on login
4) Logout from Gnome
5) open "Startup Programs" settings tool
6) add a new entry and type in the full path to "dex" with the following options:
(replace [YOUR-USER] with your username and correct path)
#####################
Name: Restore Gnome Session
Command: /home/[YOUR-USER]/dex.py -a -s /home/[YOUR-USER]/.config/gnome-session/saved-session/
Comment: This will restore the last saved Gnome session
#####################
7) now remove the gnome arguments from the session files:
find ~/.config/gnome-session/saved-session -type f -name "*.desktop" -exec sed -i 's/--sm-c.*//g' {} \;
This will remove for every desktop file the gnome start arguments. They are not needed cause we do not use Gnome for restoring them.
8) On next login depending on your choice in 2) either the last session or the last saved session is restored
Notes:
If you choosen the second option in step 2) which means saving on each logout you need to automate step 7, too.
This way it will be sure that before the restore happens that the replacements are made.
If you have choosen the "one-shot" in step 2) and you want to change
some apps simply re-run the command in 2) then do your changes and do
not forget to do step 7 again.
**********************************************************
I used that a while and I come up with this scripted one:
https://raw.githubusercontent.com/xdajog/misc/master/restore-session.sh
Maybe useful for others so..
# INSTALL:
# 0) Download above script and place it somewhere handy
# 1) Download DEX (https://github.com/jceb/dex) and change the DEX var in this script
# 2) Use "dconf write /org/gnome/gnome-session/auto-save-session-one-shot true"
# (or "auto-save-session true" if you want to save EVERY session)
# 3) Open the apps you like
# 4) Open startup programs settings tool of Gnome and add the full path to this script
# 5) logout and enjoy your next login
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-session in Ubuntu.
https://bugs.launchpad.net/bugs/771896
Title:
No way to save current session
Status in Release Notes for Ubuntu:
Invalid
Status in gnome-session package in Ubuntu:
Fix Released
Status in gnome-session source package in Precise:
Fix Released
Status in gnome-session source package in Quantal:
Fix Released
Bug description:
Binary package hint: gnome-session
There is no way I can find to set up a session the way you'd like to
have Unity start up and then save that setup. This also affects the
Classic session.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-session 2.32.1-0ubuntu19
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Wed Apr 27 09:27:01 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
PackageArchitecture: all
ProcEnviron:
LANGUAGE=en
PATH=(custom, user)
LANG=C
LC_MESSAGES=en_US.UTF-8
SHELL=/bin/csh
SourcePackage: gnome-session
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/771896/+subscriptions