You are not logged in.
Pages: 1
So I'm currently using slock to lock the screen, and It's working perfectly: I press the hotkey, the screen blanks and doesn't come back on until I've entered my password.
Is there any way to do exactly the same thing but with the screen turning off? The command "xset dpms force off" but it comes back on at the slightest touch and I'd like it to stay off until the password is entered.
thanks!
Offline
Yes, I think that xset command works too fast for the system clock on the video, so it resets - you need to build in some lag time. This works for me:
sleep 1 && xset dpms force off
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Yes, but there are still two problems with that:
1. Openbox can't understand the "sleep 1 &&" command if I try to execute it via a hotkey in rc.xml
2. The screen doesn't stay off until a password is entered, only until it detects user input, at which point you can only turn it back off by executing the command once more.
Offline
1. For openbox, use
<execute>/bin/sh -c 'sleep 1 && xset dpms force off'</execute>
Offline
2. The screen doesn't stay off until a password is entered, only until it detects user input, at which point you can only turn it back off by executing the command once more.
I use a simple script for slock and dpms handling:
( slock && xset dpms 0 0 60 ) &
xset dpms 0 0 2
xset dpms force off
This essentially turns off the monitor after 2s while running slock and restores the dpms timeout setting (60s) after slock terminates.
Offline
jakobm, that works perfectly. Thanks a bunch!
Offline
Pages: 1