Difference between revisions of "Talk:Activating Numlock on Bootup"

From ArchWiki
Jump to: navigation, search
(Problem with /dev/tty?)
 
(implemented, closing)
Line 1: Line 1:
 +
===<s>Use 'for tty in /dev/tty{1..6}' instead of 'for tty in /dev/tty?'</s>===
 
Hi. I tried to use this code
 
Hi. I tried to use this code
  

Revision as of 00:05, 25 January 2012

Use 'for tty in /dev/tty{1..6}' instead of 'for tty in /dev/tty?'

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)