1[Unit] 2Description=Shutdown running GNOME Session 3 4# Allow exit.target to start even if this unit is started with replace-irreversibly. 5# All (weak) dependencies need to do the same. Services also need to ensure they 6# are in the root slice by setting Slice=-.slice. 7DefaultDependencies=no 8 9Conflicts=graphical-session.target graphical-session-pre.target 10After=graphical-session.target graphical-session-pre.target 11 12# Add explicit conflicts/after lines for gnome-session targets, technically 13# this should not be needed, but is an extra safety measure. 14Conflicts=gnome-session.target gnome-session-manager.target 15After=gnome-session.target gnome-session-manager.target 16 17Conflicts=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target 18After=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target 19 20# We need to make sure this unit is stopped; primarily so that the tree of 21# units that we created is completely cleaned. 22# Note that this can also be improved by reversing the conflicts above and 23# not listing them in the shutdown unit. 24StopWhenUnneeded=true 25 26# We trigger a restart of DBus after reaching the shutdown target this 27# is a workaround so that DBus services that do not connect to the 28# display server are shut down after log-out. 29# This should be removed when the relevant services add a 30# PartOf=graphical-session.target 31# Historic bug: https://bugzilla.gnome.org/show_bug.cgi?id=764029 32Wants=gnome-session-restart-dbus.service 33Before=gnome-session-restart-dbus.service 34