SDB:Configurating NumLock / CapsLock on the text console automatically

Şuraya atla: kullan, ara


Question:

How can the NumLock key be automatically set?

The BIOS configurations are overwriten at the kernel start...

Solution:

The programme setleds serves for this purpose. It offers two possibilities:

  • A personal configuration. For this, it takes e.g. the following sequence in its .bashrc:
case `tty` in
        /dev/tty[0-9]) setleds -D +num -caps
        ;;
esac
  • A systematic configuration.
    From SuSE Linux 4.4 on there are two variables KBD_NUMLOCK and KBD_CAPSLOCK in the file /etc/rc.config (up to SuSE Linux version 7.3), which determine the configuration during the boot sequence. IF you use SuSE Linux from version 8.0 on please edit the file /etc/sysconfig/keyboard.

Further information:

See man setleds. <keyword>numlock,capslock,console,setleds</keyword>