Linux – Disable screensaver / screen blank via command line

fedoralinuxscreensaverxorg

I am attempting to disable screensaver, screen blank and screen lock via the command line. This is because the settings will be applied in an unattended install.

From my own research this appears to be possible through xorg.conf.

I have tried setting:

Section "ServerFlags"
    Option          "BlankTime" "0"
    Option          "StandbyTime" "0"
    Option          "OffTime" "0"
    Option          "SuspendTime" "0"
EndSection

Also:

Option "DPMS" "false"

in the Monitor section.

But even with these settings, when the machine is inactive for a period of time, the screen blanks and shortly after locks (password is required to disable screen blank).

Can someone please point me in the right direction?

I am running the XFCE spin of Fedora 19

Best Answer

You can use the xset command to disable screen blanking and locking.

E.g.

xset s off (turns off the screen saver)

xset s noblank (turns off blanking)

You can also use it to disable the power management using dpms to power the monitor down

xset -dpms

I use these commands in a script set to run at login to stop the screen blanking on my MythTV machine.

EDIT:

Script I mentioned:

#!/bin/sh
export DISPLAY=:0.0
xset s off
xset s noblank
xset -dpms
Related Question