Numlock activate at startup in login screen

Sponsored Link
It is very annoying that the numlock is not activated at startup in the login screen GDM, especially when using a password that contains numbers.

Make sure that the universe repository is enabled.

Execute the following commands in a terminal

sudo apt-get install numlockx

sudo gedit /etc/X11/gdm/Init/Default

Add the following lines at the end before the line "exit 0":

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

Put off your numlock and restart X by pressing Ctrl+Alt+Backspace

The numlock should be activated now and every time when you reboot

Sponsored Link

You may also like...

16 Responses

  1. Svensson says:

    numlockx on – worked for me. Feisty on PPC G4.

    Thx!

  2. jj says:

    In Gutsy, gedit /etc/gdm/Init/Default
    add
    if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
    fi

  3. M says:

    Thanks Jj, that worked perfectly in Hardy Heron too.

  4. manofskill says:

    In 8.04 Hardy 64bit it is slightly different. The command should be:

    sudo gedit /etc/gdm/Init/Default

    Add those lines as the instructions above describe. The only difference is the file is located in a different directory.

  5. Christopher says:

    Cannot find file:

    /etc/X11/gdm/Init/Default

    don’t have “gdm” in folder X11 and cannot find it anywhere else.

    Christopher

  6. Gustavo says:

    in ubuntu 8.04

    sudo gedit /etc/gdm/Init/Default

    the rest is the same

  7. yoshi115 says:

    The suggestion works, but in Ubuntu 8.10 the numlock is disabled after login and must be reenabled. Any suggestions?

  8. bdoe says:

    sudo apt-get install numlockx

    sudo gedit /etc/gdm/Init/Default

    Add the following above the last line (exit 0):
    if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
    fi

    Works in 9.04 Jaunty as well.

  9. Gustavo Uribe says:

    for ubuntu 9.04 use

    sudo gedit /etc/gdm/Init/Default

    no

    sudo gedit /etc/X11/gdm/Init/Default

    the rest is the same

  10. Kete says:

    Hello,

    Why do you change your instructions? Several people have corrected you… And the fi looks like a typo. Why not make it clear that it goes in there?

    Also, you might want to link to a new blog entry or one you’ve already created about the new Ubuntu disabling Ctrl+Alt+Backspace and needing to run “sudo dontzap --disable” in a terminal. (probably after sudo apt-get install dontzap)

    Thanks

  11. flippah says:

    What to do in xubuntu 9.10 ?

  12. Michael says:

    flippah…use the instructions bdoe gave. They work for Ubuntu 9.10.
    ————————————————

    sudo apt-get install numlockx

    sudo gedit /etc/gdm/Init/Default

    Add the following above the last line (exit 0):
    if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
    fi

  13. oliwek says:

    for ubuntu 10.04 (lucid), pay attention, second step is :

    sudo gedit /etc/gdm/Init/Default

    (and NOT sudo gedit /etc/X11/gdm/Init/Default : this would create a new file, so you would see an empty window with gedit)

  14. sahmada says:

    I’ve done all of above instructions,and get not through at all!
    I must run “numlocx on” in the Terminal window to activate it!
    Is there any fault in the instruction to edit “Default” file?

  15. giacomo says:

    Thank you

  16. Kristoff says:

    ffs there is no gdm folder anywhere, as Christopher already pointed out years ago. Your page is stealing search results for solutions that don’t work.

Leave a Reply

Your email address will not be published. Required fields are marked *