I use this, with /etc/apm/hibernate as a symlink.

$ cat /etc/apm/suspend  
#!/bin/sh

pkill -USR1 -x xidle
#EOF

and my .Xdefaults have:

XIdle.timeout: 300
XLock.grabmouse: on
XLock.mode: blank
XLock.mousemotion: on
XLock.usefirst: yes
XLock.lockdelay: 10
XLock.nice: 19
#EOF


On 2017 Aug 15 (Tue) at 09:57:39 +1000 (+1000), tomr wrote:
:I've been struggling to get X to lock by calling xlock(1) from
:/etc/apm/{hibernate,resume,standby,suspend}
:
:Haven't seen a lot of useful debug output from xlock...
:
:# xlock -verbose ; echo $?
:1
:# xlock -verbose -display :0.0 ; echo $?
:No protocol specified
:1
:#
:
:I've figured out an effective workaround I think, which is to SIGUSR1 my
:running xidle(1) process, which works. I'm just wondering if there's a
:better way to get apmd, running /etc/apm/* as root, to do the same. I
:tried calling xlock both as root and as the current X user, no
:noticeable difference in results.
:

-- 
Academic politics is the most vicious and bitter form of politics,
because the stakes are so low.
                -- Wallace Sayre

Reply via email to