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):
For 11.10
Disable the GNOME Settings Deamon's power plugin from the command line:
Alternatively, using
dconf-editor
from the dconf-tools package:For the screensaver:
Or again via
dconf-editor
: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:
You can put this in your
.xsession
file to disable it upon every login.You didn't specify if you want permanent solution or temporary solution. If you want to turn off screensaver and power management for e.g. 2 hours, you can simply inhibit those features.
In practice, you can simply run
As an alternative, you may want to inhibit screensaver and power management until a given process has completed. For example,
would inhibit screensaver and power management until download has finished.
See
man systemd-inhibit
for more details. It allows you do disable only selected features and allows setting user visible string to explain why these features are inhibited (nice if your system has multiple users).Make a plain text doc in your home folder and copy this into it.
Save the document as "screensaver_off.sh" (without quotes), then open a terminal and enter
Then open up startup applications from the dash, click on the add button, name your start up application, and enter your command as:
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.
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.
After reading huge amounts of forum posts, I eventually managed to get rid of it by setting crontab to run every 4 minutes command:
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. :)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
Unchecking the "Dim screen to save power" is possible with
and setting the "Turn off after" to "Never" with
The last command was completely sufficient for my needs.
Disabling Screensaver on Linux Environment from VNC Viewer
Thomas answer above works, but not everyone has .xsession file. You can use your .profile instead. Just add the lines below to the end of the .profile in your Home folder.
# Turn off screen blanking xset s off && xset -dpms
If you don't see .profile, open your Home folder in your file browser, click on 'View' and select 'Show Hidden Files'. Then just right click on .profile, select 'Open with text editor', copy and paste the above on a blank line at the end of the file and save the modified file.