Talk:Activating Numlock on Bootup

From ArchWiki
Revision as of 10:13, 4 December 2009 by Ptsl (Talk | contribs) (Problem with /dev/tty?)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hi. I tried to use this code

for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done

in my startup scripts. However, there are a lot more consoles in my system (not only 1..6). The command

ls /dev/tty?

outputs ten different special files (tty0 to tty9). The command ls /dev/tty* outputs at least four dozens of them.

The problem is, when using /dev/tty?, the script tries to set numlock on for the X session - but in a strange way: the LED is on, but the numerical keyboard works like arrow keypad.

In order to get it working, I have to press NumLock twice: on the first press, the LED becomes off (the num pad still works as arrow keypad), on the second press, LED becomes on and the pressing the keys produce numbers.

(I found the problem was also reported in RedHat forums, see [1].)

My suggestion is to use only

for tty in /dev/tty{1..6}

which will turn the numlock on for the text consoles (and not for the X session), and use numlockx in KDM/GDM/SLiM, as described below in the wiki page.

--Ptsl 05:13, 4 December 2009 (EST)