Turn on NumLock Automatically When Ubuntu 14.04 Boots Up

June 7, 2014 — 9 Comments

turn on NumLock automatically

For desktops and laptops that have a separate numeric keypad, it might be useful for NumLock to be turned on automatically when your Ubuntu boots up. This quick tutorial will show you how to do it in Ubuntu 14.04.

First click the below button to bring up Ubuntu Software Center and install numlockx.

Click to install numlockx

Then press Alt+F2 and paste below command into the dash.

gksudo gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf


Hit enter and type your password when prompt. It will open the lightdm config file with gedit text editor.

Next to do is add below line into the end and save the file:

greeter-setup-script=/usr/bin/numlockx on


Finally restart your computer. The numeric keypad should turn on automatically when you’re at the login screen, and stay on after logging in.

Tip: In my case, NumLock was turned off again during login. If this happens to you, add numlockx as a startup program:

name: Numlockx
command: sleep 20 && numlockx on


For more: https://help.ubuntu.com/community/NumLock

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

9 responses to Turn on NumLock Automatically When Ubuntu 14.04 Boots Up

  1. Its a stupid problem on Ubuntu!…. but a good solution.

  2. Anthony Paramo July 23, 2014 at 6:28 pm

    Thanks this worked perfectly!
    I added numlockx as a startup program before restarting too.

  3. Just wanted to flag that adding

    greeter-setup-script=/usr/bin/numlockx on

    to my lightdm config causes startup problems – forced into low-graphics mode.

  4. Pressing enter after pasting the gksudo command into the dash resulted in… absolutely nothing. Once again I find myself trying to- make that, wanting to like Linux but what I feel should be a simple task turns out to take so many resources. Am I honestly supposed to believe that the more difficult tasks are going to be easier when activating numlock at startup is this bad?

  5. Just want to note that the image (http://ubuntuhandbook.org/wp-content/uploads/2014/06/numlock-off.png) in this article, shows an numlock icon in the systray that is not present on my Ubuntu 14.04.1 fresh install. Additionally there is no way to configure the numlock button in 14.04 in the graphical user interface.

    In my humble opinion this is an EPIC failure on Canonical’s part.

  6. What about Ubuntu Trusty Server (14.04.2)? There is no GUI, so this solution will not work. Is there a strictly CLI way to get numlock to turn on (and STAY on) at boot? Currently, I went into the VM bios and set numlock to on, but Ubuntu turns it off when it loads.



  7. @Dave: I pasted the command in the shell, and had to install gksu first.
    @Ben: My machine (Ubuntu 14.04) dont even want to start up. :(

  8. This recommendation is from the Ubuntu Community website. When I tried it, it would no longer boot. I’d get an error and have no keyboard or mouse input available. I had to boot to CD and go remove this line from the config file to get it to boot successfully again.

    I started playing with Linux 14 years ago and have still never got any install to remain stable.

  9. It won’t work. The Save button is inactive, Save As won’t work either.

    There’s another issue: when you try to type numbers using the top keyboard row after you switch the language, the first typed symbol is the “upper” case. I.e. I change from RUS to ENG or vice versa and then type 1. Instead of 1 I get !

Leave a Reply


Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>