2019-04-19 18:21:55 -04:00
|
|
|
[Unit]
|
|
|
|
Description=GNOME Shell on Wayland
|
|
|
|
# On wayland, force a session shutdown
|
2020-02-13 12:39:32 -05:00
|
|
|
OnFailure=org.gnome.Shell-disable-extensions.service gnome-session-shutdown.target
|
2019-04-19 18:21:55 -04:00
|
|
|
OnFailureJobMode=replace-irreversibly
|
|
|
|
CollectMode=inactive-or-failed
|
|
|
|
RefuseManualStart=on
|
|
|
|
RefuseManualStop=on
|
|
|
|
|
|
|
|
After=gnome-session-manager.target
|
|
|
|
|
|
|
|
Requisite=gnome-session-initialized.target
|
|
|
|
PartOf=gnome-session-initialized.target
|
|
|
|
Before=gnome-session-initialized.target
|
|
|
|
|
2023-06-07 03:59:25 -04:00
|
|
|
ConditionEnvironment=XDG_SESSION_TYPE=%I
|
|
|
|
|
2019-04-19 18:21:55 -04:00
|
|
|
[Service]
|
2020-07-29 10:59:32 -04:00
|
|
|
Slice=session.slice
|
2019-08-25 01:26:12 -04:00
|
|
|
Type=notify
|
2019-04-19 18:21:55 -04:00
|
|
|
ExecStart=@bindir@/gnome-shell
|
2020-06-09 07:01:39 -04:00
|
|
|
# Exit code 1 means we are probably *not* dealing with an extension failure
|
|
|
|
SuccessExitStatus=1
|
2020-03-25 16:30:46 -04:00
|
|
|
|
|
|
|
# unset some environment variables that were set by the shell and won't work now that the shell is gone
|
2020-08-20 04:08:01 -04:00
|
|
|
ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY'
|
2020-03-25 16:30:46 -04:00
|
|
|
|
2019-04-19 18:21:55 -04:00
|
|
|
# On wayland we cannot restart
|
|
|
|
Restart=no
|
2019-09-03 07:45:24 -04:00
|
|
|
# Kill any stubborn child processes after this long
|
|
|
|
TimeoutStopSec=5
|
2022-12-12 02:21:23 -05:00
|
|
|
|
|
|
|
# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early
|
|
|
|
OOMScoreAdjust=-1000
|