So how do I disable the blank screen mode, which activated after a few minutes? Answer is use setterm command.
setterm writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo database (terminfo is a data base describing terminals, used by screen-oriented programs and libraries such as ncurses) is consulted to find the string to use.
By default, the Linux kernel will use screen-save option to disable it you need to type command (it turns off monitor VESA powersaving features):
$ setterm -powersave off -blank 0If it dumps back you with an error that read as follows:
cannot (un)set powersave modeYou need to shutdown X window system and rerun the above command. Better, add following two commands to your ~/.xinitrc file:
setterm -blank 0 -powersave off -powerdown 0
xset s off
xset s off
Other useful optionsThis command also supports other useful options:
Resets the terminal to its power on state:
$ setterm -resetAlternatively, initialize terminal:
$ setterm -initializeTurns the terminal's cursor on or off:
$ setterm -cursor [on|off]Turns automatic line-wrapping on or off (virtual consoles only)
$ setterm -linewrap [on|off]Sets the foreground text color (virtual consoles only):
$ setterm -foreground blueSets the background text color (virtual consoles only):
$ setterm -background redEnables or disables the sending of kernel printk() messages to the console (virtual consoles only). Useful if you get lots message from iptables firewall:
$ setterm -msg [on|off]I regularly use these (above) options.
- Please consult the setterm and terminfo man pages for more information.
This happens when you run xgl on an ATI graphics card. To fix it, you can do this:
Add this section to the file and save it:
gksudo gedit /etc/X11/xorg.conf
If you already have a section called "ServerFlags", just add the four "Option" lines before the "EndSection" line.
Section "ServerFlags" Option "blank time" "0" Option "standby time" "0" Option "suspend time" "0" Option "off time" "0" EndSection
Restart the xserver (ctrl-alt-backspace) and the new settings should take effect.