You are not logged in.
The reason why I'm asking this is that I really, really need to run the scripts in /etc/pm/sleep.d/ and at the moment, this only happens when I run pm-suspend (as root) from the commandline but not when I click XFCE-Menu -> Log Out -> Suspend.
Of course, I could put these scripts to another place if needed by xfce suspend.
I'm running XFCE 4.12 on Arch Linux.
Edit:
sudo pm-suspend (as normal user) works too, as I have allowed pm-suspend with the NOPASSWD option in /etc/sudoers
Thanks,
Tuxolero
Last edited by tuxolero (2015-08-07 09:49:42)
Offline
The reason why I'm asking this is that I really, really need to run the scripts in /etc/pm/sleep.d/ and at the moment,
Systemd also supports sleep hooks. You need to re-write them in the format of:
#!/bin/sh
case $1/$2 in
pre/*)
echo "Going to $2..."
#your pre-sleep commands
;;
post/*)
echo "Waking up from $2..."
#your post-sleep commands
;;
esac
...make them executable and place them in /usr/lib/systemd/system-sleep. Just keep in mind that they are run concurrently.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I even did not know that it's using systemd states in the end :-)
The concurrent execution is no problem in my case. In fact, I have only two scripts, one will do nothing in 'pre' and the other one will do nothing in 'post', so they won't ever interfere.
After rewriting my scripts, can I uninstall the pm-utils (from the XFCE point of view) ?
Last edited by tuxolero (2015-08-07 12:07:17)
Offline
After rewriting my scripts, can I uninstall the pm-utils (from the XFCE point of view) ?
Yes. Xfce will work fine with systemd.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 528.84 KiB (Peak: 530.13 KiB) ]