[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NumLock in console



On Sun, 17 Jul 2011 10:02:23 -0400 (EDT), Camaleón wrote:
> On Thu, 14 Jul 2011 23:51:11 +0700, Sthu Deus wrote:
>> 
>> I want to have NumLock turned on in console automatically that is on
>> start up.
>> 
>> On the web I have found such a solution:
>> 
>> for tty in /dev/tty[1-6]; do
>>     /usr/bin/setleds -D +num < $tty
>> done
>> 
>> But I look for a setting, may in
>> 
>> /etc/default/keyboard
>> 
>> to reach my goal instead of performing the above cycle every time the OS
>> boots.
>> 
>> Do You have any idea how to do that?
> 
> Not sure if this will work, but "console-tools" package includes the 
> ability to turn on the NumLock led, or at least there is a variable that 
> seems to do it so:
> 
> sm01@stt008:/etc/console-tools$ grep -i num /etc/console-tools/config
> # Turn on numlock by default
> #LEDS=+num

This is a BIOS setting in a number of computers.  I have mine set to On.
In other words, NumLock is initially on at boot time by virtue of the
BIOS setting.  At my bootloader menu, NumLock is on.  However, Linux
seems to set this off during boot.  Your suggestion probably works
with the default Lenny installation.  However, for Squeeze and later,
console-tools does not coordinate well with console-setup and is not
normally installed.  kbd may be installed, however, since it coordinates
with console-setup.  If kbd is installed, a similar setting is available
in /etc/kbd/config (LEDS=+num).  This setting works for the text consoles
(by default, vt1 through vt6).  However, in GNOME, the default NumLock
setting is still off.

For GNOME, the NumLock setting may be changed as follows:

   System -> Preferences -> Keyboard

Select the "Layouts" tab.  Click on the "Options" button.  This will
pop up a second window.  Scroll down through the options until you find
"Miscellaneous compatibility options".  Click on it.  This will expand
the view to the contained options.  One of those will be
"Default numeric keypad keys".  Click on the check box next
to this option.  Click on the "Close" button.  Click on the "Close" button
for the previous window.

At the next login to GNOME, the NumLock key will be on initially.
This is a user-specific setting, not a global setting.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: