On Tue, Aug 15 2017, tomr <t...@equalit.ie> 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
> #

On my single-user laptop I use

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

su - mylogin -c '
export DISPLAY=:0
xlock &
'

> I've figured out an effective workaround I think, which is to SIGUSR1 my
> running xidle(1) process, which works.

That's probably less hackish and better on multi-user machines.

> 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.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to