I've got an Ubuntu server that boots up in text mode. It rarely has a screen or keyboard attached to it, but when I do attach a screen, I usually have to attach a keyboard too, because the darn console mode screen saver will be on and I'll need to hit a key to see what's going on.
I'm aware that the setterm command can disable this, but it's a per-session thing. How can I make it so the machine never ever blanks the screen in text mode, even when it's first booted up and sitting at the login prompt?
In Ubuntu 12.10 and earlier the console-tools package allows console options to be controlled.
To turn off screen blanking and powerdown, set
BLANK_TIME
andPOWERDOWN_TIME
to0
in/etc/console-tools/config
. If you'd prefer not to modify the config file, the same effect can be achieved by creating a new file in/etc/console-tools/config.d
containing the following:The name of the file in config.d must consist entirely of upper and lower case letters, digits, underscores, and hyphens.
Or you use /etc/kbd/config to set up (depends on your system, what is installed)
The parameter is controlled via the kernel command line, using setterm merely alters the runtime settings. To disable it system wide you can alter your kernel boot command line by appending it with "consoleblank=0" in your boot configuration (grub/lilo).
If something during boot setterm's it then it will override the value.
If you add the
setterm
command to/etc/rc.local
, it should take effect for all virtual consoles, whether or not a user is logged into them. E.g.:If you are running a newer Ubuntu that uses upstart, you can use:
A little explanation of what's going on here:
Newer Ubuntu versions use upstart for system startup. With upstart, the Linux consoles are setup with config files stored within /etc/init. The command above starts by iterating over each of those config files:
The tty's upstart config file name in $file is used to build the name of the tty device:
An upstart "post-start" command is built that runs "setterm" to disable screen blanking and power saving after the tty has been started:
And finally that command is appended to the upstart config file:
Ubuntu 12.04
Desktop
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
Server
see - https://askubuntu.com/questions/138918/how-do-i-disable-the-blank-console-screensaver-on-ubuntu-server
Might work for others
see - http://www.cyberciti.biz/tips/linux-disable-screen-blanking-screen-going-blank.html
Common search terms