GNOME systemd units hooked to sleep.target
Issue
Indeed, there's a process but ultimately I had to raise an issue after all the head-scratching. I've created a custom script that uses Zenity to fire a dialog just before the system sleeps. Since systemd
runs hooks concurrently, my goal is to use before=
in my [Unit]
to sequence my service just before one of GNOME's services lock the screen and switch it off in order to actually display a visible dialog before the system sleeps.
Would really like to know which is the relevant GNOME service (.target
file) before which I should ideally sequence my sleep hook service.
System
- Distro: Ubuntu 20.04.1 LTS
-
gnome-shell --version
: 3.36.4