GNOME Bugzilla – Bug 790913
gnome-session needs to write out autostart phase when saving session
Last modified: 2018-01-22 10:30:52 UTC
someone at work is having issues logging into wayland. after quite a bit of digging we noticed this in his ~/.config/gnome-session/saved-sessions dir: [Desktop Entry] Name=gnome-shell Comment=Client 107aadc289e46485ec150525119065205200000040350000 which was automatically saved Icon=system-run Type=Application StartupNotify=true X-GNOME-Autostart-startup-id=107aadc289e46485ec150525119065205200000040350000 Exec=gnome-shell --sm-client-id 107aadc289e46485ec150525119065205200000040350000 X-GNOME-Autostart-discard-exec=rm -f /home/simo/.config/mutter/sessions/107aadc289e46485ec150525119065205200000040350000.ms The important thing to notice here is the lack of a: X-GNOME-Autostart-Phase=DisplayServer line, so gnome-shell isn't getting started first.
Created attachment 364530 [details] [review] save: make sure app state is written into desktop file There are a number of important bits of app state written into an applications desktop file that needs to be restored when the session is saved. For instance, the phase in which the client should get started. That state is currently stored on the GsmApp object, which is inaccessible, from the client save function. This commit adds the neccesary plumbing to route the GsmApp object associated with a client to the client save function, and also adds code to allow the app object to augment the client keyfile at save time.
Note attachment 364530 [details] [review] is a completely untested first draft. I haven't tried it yet, so it probably needs some tweaks before it works.
Attachment 364530 [details] pushed as f7ff807 - save: make sure app state is written into desktop file
Created attachment 366946 [details] [review] save: track app store in state structure commit f7ff80775abd345a33e8a656ba019bc05e39d7bb attempts to save GsmApp specific state during session saving, but neglects to plumb through the app store to get to the state. This commit fixes that.
Created attachment 366947 [details] [review] save: fix use of uninitialized variable We're trying to access the app id before we look it up. This commit fixes that.
Attachment 366946 [details] pushed as c7f61ab - save: track app store in state structure Attachment 366947 [details] pushed as 06ef3f7 - save: fix use of uninitialized variable