You are not logged in.
Will the associated program set in Application autostart tab be run before suspending, when resuming or on both? Should the program take some arguments? I couldn't make it work in Xubuntu 20.04 running Xfce 14.4.
Offline
It is run when the option is selected. So for example, when you click on "shutdown" (and optionally confirm), then the runhook (trigger) for "shutdown" is processed.
I couldn't make it work in Xubuntu 20.04 running Xfce 14.4
What exactly are you trying to do? Which program and trigger are you using?
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
If your system is systemd-based and if you want something to run on wake from suspend, you can simply write a shell script and place it in /usr/lib/systemd/system-sleep/. For example, here is one that lock the eject button of my DVD drive (not POSIX-compliant):
#!/bin/bash
if [[ $1 = post ]]; then
eject -i on
fi
systemd-suspend.service(8) has a brief explanation of the format of these scripts.
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
KBar, don't you want to disable eject pre suspend?
I want to run something as the current user, namely to activate remembered pulseaudio sink that I had to unbind due to a bug. Running as superuser like scripts in /usr/lib/systemd/system-sleep/ does not work for pulseaudio.
Offline
KBar, don't you want to disable eject pre suspend?
No, because then it gets unlocked on wakeup again. I have one startup application and one post-suspend specifically script for it. I put my laptop to suspend a lot and I never use its DVD drive. If I could, I would have blacklisted the sr_mod module altogether but unfortunately it was installed and configured as a builtin on my system.
I want to run something as the current user, namely to activate remembered pulseaudio sink that I had to unbind due to a bug. Running as superuser like scripts in /usr/lib/systemd/system-sleep/ does not work for pulseaudio.
PulseAudio works in weird ways. It's an entire system on its own. Perhaps there is an answer somewhere in pulse-cli-syntax(5)?
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 541.91 KiB (Peak: 542.76 KiB) ]