Friday, June 26, 2009

Setting NumLock on automatically in Fedora

The NumLock is not activated by default at start-up (in FC-9/10). I am not sure of the fact in other distros. Everytime when the computer starts, you have to manually activate the NumLock key.

The following solution works :

Execute the following commands as root in a terminal.

1. Install numlockx

yum install numlockx


Install using numlocx rpm.

rpm -ivh numlockx*.rpm

2. gedit /etc/gdm/Init/Default

3. At the end of the file you will find a line like

exit 0

Above this line add the following code

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

4. Save the file and restart the computer.

You will find the NumLock activated by default at startup.


  1. it works thanks... But some are told need to edit the file /etc/X11/gdm/Init/Default . but this file is not found in fedora 14..

  2. I couldn't find it as root but as user.

    Just find/edit it as user save it to some remote location and then move and overwrite it as root.
    I have Fedora 15.

  3. Thanks for your guide!
    Starting with this: yum install numlockx
    and then continuing with the rest of your guide set numlock as default on my Fedora 15, which is great since I'm so bored of always pressing the NumLK key. Can't get it why they still have the option to switch of this part of the keyboard.