Home > Computers, Howto, Linux > How to switch on NumLock at Ubuntu login screen

How to switch on NumLock at Ubuntu login screen

October 15th, 2011

Each time I upgrade Ubuntu, something small seems to stop working. Nothing too major – thankfully my trusty old Dell laptop seems to be quite Ubuntu-friendly.

The upgrade to Unity seemed to stop my NumLock from working at the login screen. After I logged in to Ubuntu, NumLock would illuminate, but at the login screen it remained off. It doesn’t take much to confound my less-than-stellar muscle memory, so since I always use the number pad to input the numbers in my password, logging in was frustrating.

Anyway, the good news is – if you have the same strange affliction – it’s not too difficult to fix.

As always, open a terminal window.

Type:

sudo apt-get install numlockx

When this has finished, type:

gksu gedit /etc/gdm/Init/Default

At the end of the file, just before the line that says exit 0, insert the following lines:

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

exec /usr/bin/numlockx on

fi

Now exit from the terminal, and reboot your computer. NumLock should now be enabled at the login screen.

  1. Chuck Smith
    November 7th, 2011 at 11:50 | #1

    Didn’t really work for me which is sad, I have been wanting this fix for YEARS….

  2. November 7th, 2011 at 14:19 | #2

    @Chuck Smith
    That’s odd – if you run numlockx on from a terminal window does it switch your number lock on?

  3. December 16th, 2011 at 00:14 | #3

    Matt

    This will not work with the newest Ubuntu versions, as LightDM is the new display manager. I found a decent solution on this page:
    http://www.upubuntu.com/2011/11/how-to-enable-numpad-automatically-at.html

Comments are closed.