Ubuntu – How to turn off the screen saver using the command line

12.04command linescreensaver

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.

Best Answer

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.