diff --git a/data/org.gnome.Shell@wayland.service.in b/data/org.gnome.Shell@wayland.service.in index 427e3c807..692d45bb3 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