How to turn off screen with shortcut in Linux?
Try using
xset dpms force off
to force the screen to turn off.
I made a file called /home/me/bin/blank
and made it executable chmod +x blank
with the following in it:
#!/bin/bash
sleep 1; xset dpms force off
Then I set a shortcut in Gnome3 application "keyboard" (gnome-control-center keyboard
) to run that script when I push CTRL+ALT+Q.
Man I love linux.
slock locks the screen gracefully.