summaryrefslogtreecommitdiff
path: root/daemon/gdm-x-session.c
diff options
context:
space:
mode:
authorXiaoguang Wang <xwang@suse.com>2017-08-07 14:26:08 +0800
committerRay Strode <rstrode@redhat.com>2017-08-09 14:06:41 -0400
commit9bd3c5f04efc0da7de9fc27237244e22942ef720 (patch)
tree90cbf5ff10ec4a5df8c2748544a3282fe1795e89 /daemon/gdm-x-session.c
parent84a28ade2c5a5272d6c9c9e1c99da64108b5b19b (diff)
downloadgdm-9bd3c5f04efc0da7de9fc27237244e22942ef720.tar.gz
gdm-{wayland,x}-session: omit GNOME_SHELL_SESSION_MODE from environment
After a user logs out, the systemd --user session may still be running (if, say, the user session was left around in the closing state, because of pulseaudio). If that happens, new user sessions will inherit the environment of previous sessions. Some of these environment variables are already intentionally pruned, DISPLAY, XAUTHORITY, WAYLAND_SOCKET, etc. One environment variable that isn't pruned, but should be, is GNOME_SHELL_SESSION_MODE. If it lingers, users could end up in classic mode even though they picked the non-classic mode from the gear menu. This commit adds GNOME_SHELL_SESSION_MODE to the list of environment variables to prune. (minor changes to original patch and commit message from Ray Strode) https://bugzilla.gnome.org/show_bug.cgi?id=785918
Diffstat (limited to 'daemon/gdm-x-session.c')
-rw-r--r--daemon/gdm-x-session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index b919e6e9..3ac48616 100644
--- a/daemon/gdm-x-session.c
+++ b/daemon/gdm-x-session.c
@@ -643,6 +643,8 @@ spawn_session (State *state,
g_subprocess_launcher_setenv (launcher, "WINDOWPATH", vt, TRUE);
}
+ g_subprocess_launcher_unsetenv (launcher, "GNOME_SHELL_SESSION_MODE");
+
if (run_script) {
subprocess = g_subprocess_launcher_spawn (launcher,
&error,