Linux – How to disable the screensaver and lock screen in Ubuntu 11.04

debiandesktoplinuxUbuntu

It's very disturbing when making a Kiosk application, every time the lock screen and screensaver shows up, also many popup + battery or updates shows up.

Where and how can I completely disable the lock screen, screen saver and alerts via a configuration file or from the terminal?

I have the tried following but nothing works:

  1. failed

    vim /etc/default/acpi-support
    ;LOCK_SCREEN=true
    
  2. failed

    $ gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/suspend false
    $ gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/blank_screen false
    $ gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/hibernate false
    $ sudo init 6
    
  3. failed (but worked for disabling the lock prompt)

    gconftool --set --type=bool /apps/gnome-screensaver/idle_activation_enabled False
    gconftool --unset /apps/gnome-screensaver/themes
    
  4. failed: To make it permanent:

sudo service gdm stop
sudo X -configure
vim /home/[username]/xorg.conf.new

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DPMS "false" <<<<<<<<< Added this line
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

I tried the following suggested command from the Ubuntu forum but the whole system froze:

sudo pm-suspend

Follow up:
https://askubuntu.com/questions/37761/xorg-conf-in-ubuntu-natty-11-04

http://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml

Best Answer

After getting the screensaver turned off I found that it was the power manager that kept putting the screen to sleep. For me the following worked xset -dpms which I found at http://v2kblog.blogspot.com/2008/08/disabling-monitor-power-saver.html and it included steps to set it up permanently.