[gdm] gdm-{wayland, x}-session: omit GNOME_SHELL_SESSION_MODE from environment
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] gdm-{wayland, x}-session: omit GNOME_SHELL_SESSION_MODE from environment
- Date: Wed, 9 Aug 2017 18:07:11 +0000 (UTC)
commit 9bd3c5f04efc0da7de9fc27237244e22942ef720
Author: Xiaoguang Wang <xwang suse com>
Date: Mon Aug 7 14:26:08 2017 +0800
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
daemon/gdm-wayland-session.c | 1 +
daemon/gdm-x-session.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
index efdb34e..742eb26 100644
--- a/daemon/gdm-wayland-session.c
+++ b/daemon/gdm-wayland-session.c
@@ -324,6 +324,7 @@ spawn_session (State *state,
g_subprocess_launcher_unsetenv (launcher, "XAUTHORITY");
g_subprocess_launcher_unsetenv (launcher, "WAYLAND_DISPLAY");
g_subprocess_launcher_unsetenv (launcher, "WAYLAND_SOCKET");
+ g_subprocess_launcher_unsetenv (launcher, "GNOME_SHELL_SESSION_MODE");
subprocess = g_subprocess_launcher_spawnv (launcher,
(const char * const *) argv,
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index b919e6e..3ac4861 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]