Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I looking for a method to turn-off the screensaver and powermanager but from the command line.

I'm aware this can be done via the GUI screen - but can this be done via the command line or via some configuration editor?

Here is the gui way (via the "screen" or "brightness and lock" application):

enter image description here

share|improve this question

6 Answers 6

up vote 19 down vote accepted

For 11.10

Disable the GNOME Settings Deamon's power plugin from the command line:

gsettings set org.gnome.settings-daemon.plugins.power active false

Alternatively, using dconf-editor from the dconf-tools package:

enter image description here

For the screensaver:

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

Or again via dconf-editor:

enter image description here

share|improve this answer
2  
This does not work. I have an HDMI monitor, and it still turns off after a few minutes. All screensaver and power settings seem to be completely ignored. –  Cerin Feb 2 '13 at 23:51

Make a plain text doc in your home folder and copy this into it.

#!/bin/bash
sleep 10 &&
xset s 0 0
xset s off
exit 0

Save the document as "screensaver_off.sh" (without quotes), then open a terminal and enter

chmod +x screensaver_off.sh

Then open up startup applications from the dash, click on the add button, name your start up application, and enter your command as:

"sh /home/$LOGNAME/screensaver_off.sh"

Then add a description and click add, reboot and your done, No more screen blanking.

You will have to do this per each user as default settings revert after logout or reboot.

enter image description here

share|improve this answer

You can go to System preferences. There is a program called "Brightnes and lock" (Im not shure how it is called in english. Look at my screenshot) In this menu you can define, when the screenlock is activatet.

enter image description here

share|improve this answer
    
In US English it is "Brightness and Lock", as you suggest. –  david6 Jun 28 '12 at 5:01
    
That's not the issue, blank screen still appears over movies and full screen youtube clips. –  Xamidovic Aug 16 '12 at 5:36

Here is a solution that worked for me .. The problem I had was as I upgraded my Ubuntu 12.04 to 12.10 and to Gnome 3.6 the screen went black when idle for like 5 minutes even if I did not have any conventional settings for an active screen saver, needless to say it was sickeningly annoying ..

Here is the solution I used and it worked (and I have tried a lot of different things, spending too much time searching on startpage.com (google)

Scroll down to 'No screensaver in GNOME 3.2'.

http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html

share|improve this answer
1  
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Mark Paskal Oct 21 '12 at 13:42

You might find that the above solution is necessary, but not sufficient. The screen might still be blanking after 10 minutes. This is a default setting compiled into Xorg.

To disabled it for the current session, run:

xset s off

You can put this in your .xsession file to disable it upon every login.

share|improve this answer
    
Where is the .xsession file located I couldn't find it, do I need to make one and if so where? –  dginsd Jul 14 '13 at 20:16
    
The .xsession file is a hidden file in your Home directory. You can find it by pressing Ctrl+H. If you do not see the file, you can right-click and create the file with the name .xsession, or you can use your preferred text editor to make the file with the necessary info in it. –  MoustafaC Jul 20 '13 at 20:14

After reading huge amounts of forum posts, I eventually managed to get rid of it by setting crontab to run every 4 minutes command:

DISPLAY=:0.0 xset s activate

you can leave DISPLAY=:0.0 out, if you have logged in with ssh as a same user which uses gnome.

xset s off didn't help in my case. I have to run that every 4 minutes, to prevent screen saver coming on every 5 minutes. :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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