Projekt

Allgemein

Profil

Aktionen

Configure terminal via setterm

Requirements

To configure the terminal via setterm you will need the following:
  • a installed and supported operating system (e.g. CentOS)
  • root-access

Preliminary Note

While in the past it was graceful to the crt-monitor not to display the same content for ages this behaviour is not necessary any more, especially with virtual screens

Therefore we disable powersaving and blanking of the screen.

This information is taken from [[http://www.cyberciti.biz/tips/linux-disable-screen-blanking-screen-going-blank.html]] other setterm related information may be found also in the setterm and terminfo man pages.

Configure terminal

short version

add following to /boot/grub/menu.lst at kernel

consoleblank=0

long version

setterm -powersave off -blank 0

If it dumps back you with an error that read as follows:
cannot (un)set powersave mode

You 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

You can verify what timeout the kernel uses for virtual console blanking via:

$ cat /sys/module/kernel/parameters/consoleblank
600

This file is read-only and the timeout is specified in seconds. The current default seems to be 10 minutes.

You can change that value with entering the following command on a virtual console (if you are inside an xterm you have to change to a virtual console via hitting e.g. Ctrl+Alt+F1).

$ setterm -blank VALUE

Where the new VALUE is specified in minutes. A value of 0 disables blanking:

$ cat /sys/module/kernel/parameters/consoleblank
600
$ setterm -blank 0
$ cat /sys/module/kernel/parameters/consoleblank
0

setterm has other powersaving related options, the must useful combination seems to be:

$ setterm -blank 0 -powersave off

Thus to permanently/automatically disable virtual console blanking on startup you can either:

  • add consoleblank=0 to the kernel parameters (edit grub configuration)
  • add the setterm -blank 0 command to an rc-local or equivalent startup script
  • add the setterm output to /etc/issue since /etc/issue is output on every virtual console:
    # setterm -blank 0 >> /etc/issue
    

Choose one alternative from the above.

Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 1 Revisionen