GNOME Bugzilla – Bug 785918
After gnome-classic session, gnome session looks like gnome-classic
Last modified: 2017-09-11 13:32:50 UTC
After logging out of a Gnome Classic session, then logging in as gnome session, desktop looks like gnome classic, there are top and bottom bars. Steps to Reproduce: 1.Log into Gnome Classic 2.Log out of Gnome Classic 3.Immediately Log into Gnome session The fault can't be reproduced every time, it depends on some OS or environment. I find this problem on openSUSE Tumbleweed, I can't reproduce it on Fedora 26. There is related bug: https://bugzilla.redhat.com/show_bug.cgi?id=1428001
When problem happened, after you logged in as gnome session, you can find the environment variable 'GNOME_SHELL_SESSION_MODE=classic', this cause gnome shell to start gnome classic desktop. Where is this environment variable from? When problem happened, after logging out gnome classic, use loginctl to show sessions > loginctl SESSION UID USER SEAT TTY c1 474 gdm seat0 /dev/tty7 1 1000 test seat0 /dev/tty2 > loginctl session-status 1 1 - test (1000) Since: Fri 2017-08-04 14:58:09 CST; 2 days ago Leader: 2012 Seat: seat0; vc2 TTY: /dev/tty2 Service: gdm-password; type x11; class user State: closing Unit: session-1.scope ├─2160 /usr/bin/pulseaudio --start --log-target=syslog └─2163 /usr/lib/pulse/gconf-helper > ps aux |grep dbus-daemon message+ 806 0.0 0.2 44656 5464 ? Ss Aug04 0:02 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation gdm 1725 0.0 0.2 42648 4492 ? Ss Aug04 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation gdm 1823 0.0 0.2 42212 4156 ? S Aug04 0:00 /bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 test 22759 0.0 0.2 42212 4124 ? Ss 11:28 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation test 23073 0.0 0.0 8584 824 pts/1 S+ 11:30 0:00 grep --color=auto dbus-daemon we can see process pulseaudio can't stop immediately, and user login session can't release completely. This will make user dbus-daemon can't release. The environment variable GNOME_SHELL_SESSION_MODE stores in user dbus-daemon. When logging in as gnome session, if old user dbus-daemon exists, GDM doesn't create new user dbus-daemon and uses old, then environment variable 'GNOME_SHELL_SESSION_MODE' inherits from old user session. I think GDM should omit 'GNOME_SHELL_SESSION_MODE' when inheriting from old dbus-daemon environment.
Created attachment 357087 [details] [review] omit environment variable GNOME_SHELL_SESSION_MODE
Thanks pushed with minor changes 84a28ade..9bd3c5f0 master -> master
I had to revert this because it broke the greeter and initial-setup.
(see bug 786278 )
Created attachment 357607 [details] [review] session omit environment variable GNOME_SHELL_SESSION_MODE=classic
is this patch even needed after https://git.gnome.org/browse/gnome-session/commit/?id=97d1cf5360c0bbf213c8037918c7b14582e7791d ?
(In reply to Ray Strode [halfline] from comment #7) > is this patch even needed after > https://git.gnome.org/browse/gnome-session/commit/ > ?id=97d1cf5360c0bbf213c8037918c7b14582e7791d ? I tried https://git.gnome.org/browse/gnome-session/commit/?id=97d1cf5360c0bbf213c8037918c7b14582e7791d , still has same problem. So we need this patch.
Okay this should be squared away now: To ssh://git.gnome.org/git/gdm 95b46d9d..853e93be master -> master I went with a slightly different approach.
@@ -609,6 +609,7 @@ spawn_session (State *state, "XAUTHORITY", "WAYLAND_DISPLAY", "WAYLAND_SOCKET", + "GNOME_SHELL_SESSION_MODE", NULL }; I think just unset environment "GNOME_SHELL_SESSION_MODE" will break greeter and initial-setup, we need to unset "GNOME_SHELL_SESSION_MODE" just when "GNOME_SHELL_SESSION_MODE=classic".
should be fine since we only do the unset if getenv() returns NULL.