Numlock ON when starting X
Andrew
virgule88 at videotron.ca
Tue Nov 30 20:46:40 MST 2004
On Tue, 2004-11-30 at 20:49, Longman, Bill wrote:
> > This is probably more a generic linux question.
> >
> > When my system boots, neither in the virtual consoles, nor in X the
> > numlock key is activated.
> >
> > I would like to change this, such that the numlock is by
> > default on in
> > the virtual consoles and X (including the graphical login
> > screen kdm/gdm ?)
> >
> > Does anyone know where to change this ?
>
> Geert, my Gentoo box has a numlock init script. It calls "setleds". The
> "setleds" man page also references "loadkeys". You might be able to find
> something along these lines.
These are good pointers!
setleds:
>From the manual:
*****************************
DESCRIPTION
Setleds reports and changes the led flag settings of a VT
(namely Num-Lock, CapsLock and ScrollLock). Without arguments, setleds
prints the current settings. With arguments, it sets or clears
the indicated flags (and leaves the others unchanged). The settings
before and after the change are reported if the -v flag is given.
<<<SNIP>>>
One might use setleds in /etc/rc to define the initial and default
state of NumLock, e.g. by
INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done
*****************************
I guess the second paragraph mean to put these line somewhere in
/etc/rc*. I guess </etc/rc.d/rc.sysinit> or <etc/rc.d/rc.local> is the
appropriate place(?). This one only work within virtual terminals (VTx)
loadkeys:
>From the manual:
*****************************
DESCRIPTION
The program loadkeys reads the file or files specified by
filename.... Its main purpose is to load the kernel keymap for the
console.
<<<SNIP>>>
FILES
/lib/kbd/keymaps
default directory for keymaps
/usr/src/linux/drivers/char/defkeymap.map
default kernel keymap
******************************
I would put my money on setleds's way...
Further investigations (read: googleing) lead me to this:
http://www.gentoo.org/doc/en/faq.xml#numlock
http://linux.editme.com/how-to-get-num-lock-to-default-to-on
..but this page beat them all fare&square:
http://www.linuxgazette.com/node/395
As I am writing this, I notice the LED is OFF but the keypad do print
numbers but when the LED is ON the keypad act like arrows....Weirdo!
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general at lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> HINT: to Google archives, try '<keywords> site:terrasoftsolutions.com'
More information about the yellowdog-general
mailing list