More 2 Cent Tips & Tricks LG #35


Send Linux Tips and Tricks to gazette@ssc.com

Contents:

lil2cent-1747120 NumLock – On at Startup

Date: Mon, 02 Nov 1998 09:37:58 -0500
From: Brian Trapp, bmtrapp@acsu.buffalo.edu

Here’s a 2 cent tip for others trying to turn NumLock on at startup (I’m using Red Hat 5.1, Linux 2.0.34)

Dennis van Dok wrote in to let us know there’s a program called « setleds » that will handle this kind of activity. The « Linux FAQ » http://theory.uwinnipeg.ca/faqs/section7.html#q_7_10 has this to say about how to set this up automatically.

Question 7.10. How do I get NUM LOCK to default to on ?
Use the setleds program, for example (in /etc/rc.local or one of the /etc/rc.d/* files): for t in 1 2 3 4 5 6 7 8
do
setleds +num < /dev/tty$t > /dev/null
done setleds is part of the KDB package (see Q7.9 `How do I remap my keyboard to UK, French, etc. ?’).

Alternatively, patch your kernel. You need to arrange for KBD_DEFLEDS to be defined to (1

READ  Linux Humor LG #45