[gnome-shell/wip/clean-the-slate] data: ensure systemd environment is sanitized when shell exits
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/clean-the-slate] data: ensure systemd environment is sanitized when shell exits
- Date: Wed, 25 Mar 2020 20:52:45 +0000 (UTC)
commit 6e253608c562d1dfc2e12cbdd4db4fee2267b3df
Author: Ray Strode <rstrode redhat com>
Date: Wed Mar 25 16:30:46 2020 -0400
data: ensure systemd environment is sanitized when shell exits
When mutter is acting as a display server it sets a number of
environment variables in the user's session. These variables
tell applications where the display server's sockets are.
When the shell exits at logout time it leaves these environment
variables in the systemd --user environment, which can confuse
subsequent sessions.
This commit clears up the environment on exit.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1129
data/gnome-shell-wayland.service.in | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/data/gnome-shell-wayland.service.in b/data/gnome-shell-wayland.service.in
index 04f94af2d6..100be7f0f1 100644
--- a/data/gnome-shell-wayland.service.in
+++ b/data/gnome-shell-wayland.service.in
@@ -19,6 +19,10 @@ Before=gnome-session-initialized.target
[Service]
Type=notify
ExecStart=@bindir@/gnome-shell
+
+# unset some environment variables that were set by the shell and won't work now that the shell is gone
+ExecStopPost=-systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY
+
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1
# On wayland we cannot restart
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]