I noticed that the desktop login sound doesn't play when unlocked. I read other posts saying that putting an executable in /etc/pm/sleep.d or /lib/systemd/system-sleep will run it when you log in.
Those posts were very old (The newest was for 15.04), and the script won't run when I unlock my device. I created the script by duplicating one of the others and renamed and rewrote it to make sure I kept the right MIME type.
I can't find any log files related to suspend, so I have no idea if it's even attempting to run the script.
As of now, I'm using test scripts to make sure the executable works. It should run gedit when I unlock.
#! /bin/sh
# Custom script at login
case "$1" in
suspend|hibernate)
#do nothing
;;
resume|thaw)
gedit
;;
*)
exit 1
;;
esac
I am running Ubuntu 19.10
ExecStart=/usr/local/bin/start_my_connection
needs to call the sound you want to hear – Rinzwind Jan 14 '20 at 14:28gedit
withtouch /tmp/newFile
. Is the/tmp/newFile
file created? – terdon Jan 14 '20 at 16:30