GNOME Bugzilla – Bug 720894
gnome-shell loses classic mode after session is saved
Last modified: 2014-01-07 21:37:17 UTC
This started off as me jumping on to bug 591730 but that issue was really different and long fixed, so I decided to file a new bug. The problem is when the session is saved, the command to start gnome-shell is read from the saved session directory (~/.config/gnome-session/saved-session/) instead of from the /usr/share/applications. This desktop file currently just gets "gnome-shell" written in the Exec line even when running in classic mode. It could be fixed to add --mode=classic if classic mode is written (see attachment attachment 264717 [details] [review]) but then the Exec line would be wrong when the user jumps back to normal mode. Two possible ideas: 1) commit attachment 264717 [details] [review] and make gnome-session have a seaprate saved-session directory for classic mode and normal mode. 2) don't commit attachment 264717 [details] [review] and instead stop passing session mode on the command line and instead pass it in the environment
Is this really about gnome-shell version 3.4? That's ancient.
no
I chatted a bit with matthias about this yesterday, and the conclusion we came to is doing 2) is the simplest approach and we should just go for that.
Created attachment 265571 [details] [review] main: allow session mode to be specified in the environment Specifying the session mode on the command-line doesn't play well with session management (since the saved session desktop file well either drop the specified session mode, or force it always, even if the user picked a different mode at the login screen) This commit adds support for specifying the session mode via an enviroment variable. For now, keep the old command line interface for backward compatibility
Created attachment 265573 [details] [review] data: set shell classic mode via env variable instead of command line Currently, we start gnome-shell in classic mode by passing --mode=classic to the gnome-shell command line. This --mode=classic gets stripped away when the session is saved, which breaks classic mode on subsequent login attempts. This commit changes the session file to set the GNOME_SHELL_SESSION_MODE environment variable instead.
Review of attachment 265571 [details] [review]: OK.
Review of attachment 265573 [details] [review]: Looks good.
Comment on attachment 265571 [details] [review] main: allow session mode to be specified in the environment Attachment 265571 [details] pushed as 43cffd7 - main: allow session mode to be specified in the environment
Attachment 265573 [details] pushed as e08d527 - data: set shell classic mode via env variable instead of command line