Hi Peter, indeed, this helps to understand the syntax!
Thanks... But still, I get no xlock on suspending. This is GENERIC.MP#121 amd64 And pyrrha(p1)| ls -l /etc/apm/suspend -rwxr--r-- 1 root wheel 28 Jun 2 21:03 /etc/apm/suspend pyrrha(p1)| cat /etc/apm/suspend #!/bin/sh pkill -USR1 xidle What am I doing wrong? Pau > pkill does take -USR1 as an option, but it is slightly stealthily mentioned. > > > -signal > A non-negative decimal number or symbolic signal name specifying > the signal to be sent instead of the default TERM. This option > is valid only when given as the first argument to pkill. > > USR1 is a signal. If you read the man page sigaction(2), it has a list > of possible signals. In this case, SIGUSR1 is described as > "user defined signal 1", which some programs use for specific events. > > xidle does have support for SIGUSR1: > > xidle uses the XScreenSaver(3) extension to receive inactivity events > when a timeout is specified, running a specific program after the elapsed > time. xidle will also run the program if it is sent a SIGUSR1 signal, or > if the pointer sits in a corner of the screen for an amount of time. > Signal and corner locking are always enabled, whether -timeout is > specified or not. > > > And so when xidle receives the USR1 signal, it immediately triggers the > screensaver program. > > So, when apmd receives the "suspend event" it will run the > /etc/apm/suspend script. This script sends the SIGUSR1 signal to the > xidle program. xidle receives the signal, and since it has a special > behaviour for SIGUSR1, it then runs the specified screensaver program > xlock. _______________________________________________ Openbsd-newbies mailing list Openbsd-newbies@sfobug.theapt.org http://mailman.theapt.org/listinfo/openbsd-newbies