Hello,
Post by Alexander HallPost by Marcus MERIGHIPost by joshua steinPost by Marcus Merighidoes 'xset(1) dpms 20' activate xidle(1) after 20 seconds?
$ xset dpms 20
$ xidle -timeout 180 &
With this I am locked out after 20 seconds, not 180.
The DPMS event activates the X screensaver which generates an X
event that xidle is listening for. xidle then runs its specified
program (or defaults to xlock).
Thanks for confirming and the explanation of the cause!
I know you are having piles of experience with OpenBSD on all sorts of
fancy hardware... what do you do for dimming the display and locking?
This is what I use to give myself a three second grace period between the
screen going blank and the lock kicking in. The scroll lock led was for
fun and cosmetics.
$ egrep '^xidle|^xlock' .Xresources
xidle.*.timeout: 300
xidle.*.delay: 99999
xlock.*.lockdelay: 3
xlock.*.startCmd: xset dpms 3; sleep 3; xset led named "Scroll Lock"
xlock.*.endCmd: xset -dpms; xset -led named "Scroll Lock"
I start xidle in my ~.xsession
especially "startCmd" with "xset dpms" was a precious hint!
xlock(1) always woke up my DPMS dimmed display, and it remained lit.
Not anymore, thank you!
But I had to return to xautolock(1), since xidle(1) does not play well
with my "xset dpms 20", as stated in the Subject:.
I dug through the code of xidle(1), but see no way of telling if it is
"xset dpms" running or the XScreenSaver(3) doing its thing.
But I found the reason why some DEBUG printf()s did not show up, below.
Thanks!
Marcus
Index: xidle.c
===================================================================
RCS file: /cvs/xenocara/app/xidle/xidle.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 xidle.c
--- xidle.c 6 Sep 2018 07:21:34 -0000 1.6
+++ xidle.c 29 Nov 2018 11:10:03 -0000
@@ -366,7 +366,9 @@ main(int argc, char **argv)
if (fd < 0)
err(1, _PATH_DEVNULL);
dup2(fd, STDIN_FILENO);
+#ifndef DEBUG
dup2(fd, STDOUT_FILENO);
+#endif
dup2(fd, STDERR_FILENO);
if (fd > 2)
close(fd);