Friday, May 3, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 8942  / 3 Years ago, thu, october 14, 2021, 5:15:27

I do change the Turn screen off when incative for: often using the below screen in Ubuntu 12.04. How do I change the same from the terminal? I did check in the gconf-editor, but couldn't figure it out.



enter image description here



I use the below commands for turning the monitor off and for the locking the screen quickly from the terminal.



alias off='xset dpms force off'  
alias lock='gnome-screensaver-command -a'

More From » command-line

 Answers
0

You can change the time of inactivity after which to turn the screen off from terminal using next commands:



gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac <nr_of_sec>
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery <nr_of_sec>
gsettings set org.gnome.desktop.session idle-delay <nr_of_sec>


Change <nr_of_sec> as you wish. For example, for 3 minutes, use 3x60=180:



gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 180
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 180
gsettings set org.gnome.desktop.session idle-delay 180


If you will use 0, the screen will never turn off.



Source: https://askubuntu.com/a/313155/147044.



To change the brightness through terminal, use this answer: https://askubuntu.com/a/56171/147044. I tested this method on 13.04 and is working.


[#30558] Friday, October 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligenvirt

Total Points: 238
Total Questions: 98
Total Answers: 100

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
ligenvirt questions
Tue, Aug 17, 21, 02:28, 3 Years ago
Thu, Sep 23, 21, 17:55, 3 Years ago
Mon, Oct 18, 21, 03:34, 3 Years ago
;