Assumes gnome-session's @libexecdir@ matches gnome-initial-session's
ExecStopPost=-@libexecdir@/gnome-session-ctl --shutdown
This assumes that gnome-session
's @libexecdir@
is the same as gnome-initial-setup
's. This is (currently) not true on Debian: gnome-session
uses /usr/lib/gnome-session
following long-standing Debian convention, although gnome-initial-setup
has been updated to use /usr/libexec
after Debian's relatively recent embrace of /usr/libexec
.
We have a few options:
- Mandate that
gnome-session
's@libexecdir@
must be the same asgnome-initial-setup
's – ie, they must both use/usr/libexec
in practice – and go and change the Debian packaging - Try to detect the path to
gnome-session-ctl
at compile time (perhaps by addinggnome-session.pc
?) - Add a meson option to set the path
- Invoke
StartUnit("gnome-session-shutdown.target", "replace-irreversibly")
directly, perhaps usinggdbus
. Unfortunately there is no equivalent toOnFailure
which also is run after the unit completes successfully.