1

Is there a terminal command?

For istance, when i type:

sleep 1 && xset dpms force off

It turns off the display but enables automatically the screenlock (that instead I'd like to keep just when the computer is inactive).

2

xset dpms force off
Also disable "Lock after screen turns off" in System Settings > Security & Privacy > Locking.

| improve this answer | |
  • When I run that command then the screen automatically locks but if I disable "Lock after screen turns off" I would lose the locking during inactive mode – Alex Punkallo May 22 '17 at 19:41
  • Then don't disable "Lock on sleep", also in System Settings > Security & Privacy > Locking. – cristian mos May 22 '17 at 20:38
  • Yeah I don't disable it, for inactive I mean that the screen turns off after some minutes and locks automatically – Alex Punkallo May 22 '17 at 20:45
  • Set the minutes after you want to turn off display and lock automatically in System Settings > Power. – cristian mos May 22 '17 at 21:00
  • No, I explain better. I'd like write a command in terminal so that just the screen turns off immediately (ex. in a moment I'm studying on paper) and when I move/click the mouse it turns on. I prefer a command so that the screen turns off and locks automatically just in case I'm too long time far from the computer (so I can't set too few minutes). From the other answer it seems that I have a kind of bug that I don't know how to solve. – Alex Punkallo May 22 '17 at 21:16
1

Actually, the lowest brightness level on elementary turns off the display. This question covers how to change brightness using command line.

| improve this answer | |
  • I tried both methods with brightness to 0 but it just decreases to zero the brightness leaving the screen turned on – Alex Punkallo May 22 '17 at 19:46
  • That might be a bug in your system. Not only elementary turns off display for the lowest brightness, but also Ubuntu and most, if not all its derivatives. Have you tried the lowest brightness using GUI? Does it turn off display? – Supreme Dolphin May 22 '17 at 19:59
  • Do you mean with xrandr? It decreases the brightness to 0 doesn't turn off the screen – Alex Punkallo May 22 '17 at 20:06
  • No. I mean with using your mouse or keyboard with the brightness slider like so i.stack.imgur.com/ZHRQG.png – Supreme Dolphin May 22 '17 at 20:10
  • Sorry, no it doesn't work (and also doesn't reach the 0 brightness like the other methods) – Alex Punkallo May 22 '17 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.