Leave the Num Lock On! 12/14/09

Leave the Num Lock on!

Leave the Num Lock on!

I recently (finally) upgraded to Ubuntu 9.04 (I’ve always had issues with x.10 releases for some reason). Until the upgrade I wanted to remain with the LTS track, but (it seems) less developers are supporting it, hence the move. I’ve performed excessive numbers of installs of Ubuntu and various applications on test boxes, but they (obviously) were not my primary system, it’s important to note this, as ordinarily I did not notice a small annoyance regarding Num Lock. On my updated primary system, I noticed this issue immediately, when I tried to log in.

Here’s the rant… If I set the BIOS in my hardware, to turn on the Num Lock, then I’ve done so for a specific reason! For Ubuntu to keep turning it off when I log out, reboot or start up the PC – That’s just plain annoying. I did a bit of Googling to try and find if the issue is being addressed (I remember fixing it using numlockx, and will get to that shortly), but only found a few threads where developers were discussing the “how tos” and “maybe” of the issue. While I’m not a developer, by any stretch of the imagination, I do know that other OS’s accomplish this feat (of abiding by the BIOS num lock settings). So… Ubuntu, please abide by the BIOS settings (with regards to Num Lock).

However, for those of you who want to ensure the Num Lock is on, we can use the numlockx tool. There’s probably a ton of sites listing this and discussing it at great length, but for ease of reference, here are my notes from the last time I had to fix this issue:

Install numlockx via aptitude –> sudo aptitude install numlockx

Edit your desktop management settings (make SURE up BACKUP any important data you do not want to lose, just in case):

sudo gedit /etc/gdm/Init/Default

Add the following just above the statement (in that file), that says “exit 0”:

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on

Make sure you manually turn your Num Lock off, log out and log back in.

One thing I found was that during the log in, the Num Lock was on, as soon as I logged in, it turned off again.  Grrrrrrrr…. My Bad! It worked properly on subsequent reeboots.

The Ubuntu Wiki for Jaunty says:

“System –> Administration –> Keyboard & Mouse –> Keyboard –>”turn on Numlock on Startup

But… It’s not an option (Keyboard & Mouse)  in my Jaunty (which I just installed as a clean install).

Maybe there’ll be a fix for this in 10.04? (I hope so).

Have a better solution? PLEASE let us all know. 😉

Do you love to share?

You can leave a response, or trackback from your own site.

3 Responses to this article

RIdgeland December 15, 2009 Reply

I use 9.04. I don’t remember what I did but numlock is ON each boot to GUI. I don’t see it mentioned in /etc/gdm/Default. I don’t have the menu option you mentioned either.
BUT… any time I go to another session [Alt]+[Ctrl]+1 and login numlock is OFF.
A patch to gdm would be GUI only.
Anyone know a patch that starts text sessions with numlock ON?
Your rant is right. Leave the BIOS setting alone Ubuntu!

A Nonny Mouse January 14, 2010 Reply

Personally I have a keyboard with no numeric keypad (IBM SK-8845, if you’re interested), and I have the opposite problem. My Ubuntu keeps re-enabling numlock, which utterly shafts me. It does this *within a login session* — one second I’m typing away, the next the right half of my keyboard changes, which leads to

sentences 352e th5s

The scroll lock light flashes when this happens, and manually turning numlock off has only an extremely brief effect before it goes back on again. Eventually whatever’s doing it seems to stop, and I can turn the lock off, and all is well.

It’s driving me completely spare, because when numlock is on I can’t even type commands like “top” or “ps” to see what might be causing the problem.

runes February 11, 2010 Reply

In the Alt+F2 dialog box type gconf-editor and burrow down as I showed Desktop -> Gnome -> Peripherals -> host-hostname -> 0 and there you will see a small select box, which is pretty self explanatory. Select it and you should be OK.

I have not actually needed to use this however, as gnome seems to set the numlock to whatever state it was when you shutdown, or that’s my experience, but having a full size keyboard, I never have numlock off, so can’t really help with that any further

Extracted from:

Leave a Reply

close comment popup

Leave A Reply