Screen Keeps Waking Up After Locking

I always used to forget to turn off presentation mode, so I configured Xfce to just do that for me when the screen is locked manually:

$ xfconf-query -c xfce4-session -p /general/LockCommand -n -t string -s 'eval xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false & xscreensaver-command -lock'

(The single & is not a typo: In case the inner xfconf-query command to turn off presentation mode ever fails or hangs, xscreensaver-command -lock will still be engaged by xflock4.)

4 Likes