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 would like to turn off the screen saver from command line, which used to work with

gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type=bool false

in natty & oneiric for precise this does not work.

Any ideas?

I know where I can do that in the gui, I'd need the setting for an automatic installation script, that also changes some default settings.

share|improve this question
    
+1 this only worked in my case: killall gnome-screensaver ; xset dpms force on –  YumYumYum Oct 18 '13 at 14:27

6 Answers 6

these settings will help

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

recheck with dconf-editor

when using the gui, these properties will also change in dconf-editor.

share|improve this answer
    
This would be awesome to just merge as an answer in the 11.10 question so we have the information in one place, can you post this answer there? –  Jorge Castro Mar 7 '12 at 19:42
    
Hmm, on second thought never mind, this isn't the exact same question. –  Jorge Castro Mar 7 '12 at 19:44
killall gnome-screensaver ; xset dpms force on
share|improve this answer
3  
this does not solve my problem, because the setting is not stored and the screenserver is back after a reboot. –  tom Mar 2 '12 at 8:17
    
+1 - This worked for me. all the rest in the planet mentioned did not worked except this –  YumYumYum Oct 18 '13 at 14:23

The command gsettings set org.gnome.desktop.screensaver lock-delay 3600 (delay in seconds) does seem to work for me when reset to 4000. Helps when watching an hours telly on iplayer.

The dconf setting is buried under org/desktop/applications/screensaver.

I think the GUI could be more helpful.

share|improve this answer

You will have to employ this command for all users but after that it will be run and set upon each login. I can't put it in a code box because there are quoted returns in the command that the code box sees as an end. But will be read quite differently by BASH. Copy and paste the following in a terminal and press enter. Do this for each user. It could be incorporates into an install script as well but you will need someone more experienced with making a script run for each user. Copy and paste the whole thing, from echo to the last autostart blank lines and all, one big copy and paste.

echo '#!/bin/bash

sleep 15

xset s 0 0

xset s off

exit 0' > screensave_off.sh ; chmod +x screensave_off.sh ; echo '[Desktop Entry]

Type=Application

Exec= sh ~/screensave_off.sh

Hidden=false

NoDisplay=false

X-GNOME-Autostart-enabled=true

Name=Screen-Saver-Off

Comment=to turn off the Xserver power save' > Screen-Saver-Off.desktop ; chmod +x Screen-Saver-Off.desktop ; mv Screen-Saver-Off.desktop ~/.config/autostart

share|improve this answer

For me this worked:

killall gnome-screensaver

And when I want enable it again

gnome-screensaver &

This is only a temporary solution but if you're looking for it then that's fine.

share|improve this answer

This is what did it for me:

gsettings set org.gnome.desktop.screensaver idle-activation-enabled 0
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.