Numlock on at login

freddyEK at gmail.com freddyEK at gmail.com
Fri Apr 22 11:47:00 UTC 2011


Hi everyone,
I struggled with a little, but annoying, problem with my Ubuntu 10.10: I  
could not manage to have the numlock on at login.
This is what you generally find by asking Google about this problem:

--- start quote ---
For Ubuntu Gnome and Xubuntu XFCE (GDM)
Install numlockx by this command in  
terminal(Applications/Accessories/Terminal):

sudo apt-get install numlockx

edit /etc/gdm/Init/Default with your favourite editor:

sudo gedit /etc/gdm/Init/Default

add following above the last line which says exit 0:

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

--- end quote ---

This works indeed, but only after login! I like to have my keypad numlock  
on at login!
I tried different things, but in fact the solution is simple.

Here is how it really works:

For Ubuntu Gnome and Xubuntu XFCE (GDM)
Install numlockx by this command in  
terminal(Applications/Accessories/Terminal):

sudo apt-get install numlockx

edit /etc/gdm/Init/Default with your favourite editor:

sudo vim /etc/gdm/Init/Default

find the line saying this:
/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm

add following immediately after this line:

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

et voilĂ !!! When you restart the computer, you can use the numerical keypad  
without the need to press NumLock first, although the numlock led is not on.
I did not search why the led is not on, because this is not really a  
priority, and anyway, once Gnome is starting the led will go on.

Hope it helps for some of you?

Kind regards, and happy easter holiday!

Freddy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110422/308f8457/attachment.html>


More information about the ubuntu-users mailing list