[gnome-shell/benzea/fix-x11-login: 6/7] data: Only unset environment when the service actually ran
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/benzea/fix-x11-login: 6/7] data: Only unset environment when the service actually ran
- Date: Thu, 20 Aug 2020 08:11:12 +0000 (UTC)
commit 56b6e653175bbf85261712dda96cb99bcd727482
Author: Benjamin Berg <bberg redhat com>
Date: Thu Aug 20 10:08:01 2020 +0200
data: Only unset environment when the service actually ran
ExecStopPost= is executed even if ExecCondition= fails. As such, we need
to add a guard as we would otherwise clear environment variables on X11
sessions (rendering them utterly useless).
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418
data/org gnome Shell wayland service in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/data/org gnome Shell wayland service in b/data/org gnome Shell wayland service in
index 427e3c8072..692d45bb37 100644
--- a/data/org gnome Shell wayland service in
+++ b/data/org gnome Shell wayland service in
@@ -26,7 +26,7 @@ ExecStart=@bindir@/gnome-shell
SuccessExitStatus=1
# 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
+ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment
GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY'
# On wayland we cannot restart
Restart=no
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]