After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720894 - gnome-shell loses classic mode after session is saved
gnome-shell loses classic mode after session is saved
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-21 18:34 UTC by Ray Strode [halfline]
Modified: 2014-01-07 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: allow session mode to be specified in the environment (2.06 KB, patch)
2014-01-07 20:28 UTC, Ray Strode [halfline]
committed Details | Review
data: set shell classic mode via env variable instead of command line (1.97 KB, patch)
2014-01-07 20:29 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2013-12-21 18:34:12 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
Comment 1 André Klapper 2013-12-21 20:29:31 UTC
Is this really about gnome-shell version 3.4? That's ancient.
Comment 2 Ray Strode [halfline] 2013-12-21 20:51:49 UTC
no
Comment 3 Ray Strode [halfline] 2014-01-07 18:09:23 UTC
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.
Comment 4 Ray Strode [halfline] 2014-01-07 20:28:39 UTC
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
Comment 5 Ray Strode [halfline] 2014-01-07 20:29:05 UTC
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.
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-01-07 20:41:51 UTC
Review of attachment 265571 [details] [review]:

OK.
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-01-07 20:42:01 UTC
Review of attachment 265573 [details] [review]:

Looks good.
Comment 8 Ray Strode [halfline] 2014-01-07 21:36:46 UTC
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
Comment 9 Ray Strode [halfline] 2014-01-07 21:37:13 UTC
Attachment 265573 [details] pushed as e08d527 - data: set shell classic mode via env variable instead of command line