mirror of
https://github.com/elementary/gala.git
synced 2024-12-27 19:24:40 +03:00
35 lines
1.0 KiB
SYSTEMD
35 lines
1.0 KiB
SYSTEMD
[Unit]
|
|
Description=Gala on Wayland
|
|
# On wayland, force a session shutdown
|
|
OnFailure=gnome-session-shutdown.target
|
|
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
|
|
|
|
#NOTE: ConditionEnvironment works with systemd >= 246
|
|
ConditionEnvironment=XDG_SESSION_TYPE=%I
|
|
|
|
[Service]
|
|
Slice=session.slice
|
|
Type=notify
|
|
ExecStart=@bindir@/gala
|
|
|
|
# unset some environment variables that were set by the compositor and won't work now that the compositor is gone
|
|
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
|
|
# Kill any stubborn child processes after this long
|
|
TimeoutStopSec=5
|
|
|
|
# Lower down Gala's OOM score to avoid being killed by OOM-killer too early
|
|
OOMScoreAdjust=-1000
|
|
|