Numlock Persistence in Gnome 3

For some reason numlock is reset every time Gnome 3 shuts down returning to its default state (off). I think most people would expect it to remember its state but this is sadly not the case. But this is Linux, so there is always a work around.

Personally I don't ever want numlock turned off, so this work around is more about always starting up with numlock turned on rather than having it remember its previous state.

Using a program called numlockx there are 2 ways we can do this, when you log in which affects just your account or at startup affecting everyone.

First download numlockx from the repos. For Fedora:
sudo yum install numlockx

1. Turn Numlock on at Login

Launch the hidden application to edit the applications that launch on login:

Add a new entry

Name: Numlockx
Command: numlockx on
Comment: Turns on numlock

2. Turn Numlock on at Startup

As a superuser edit the file /etc/X11/xinit/xinitrc
sudo nano /etc/X11/xinit/xinitrc

At the beginning of the file add the following line
/usr/bin/numlockx on

Numlock should now have the behaviour that you want!

Courtesy of Vivek


Anonymous said...

Thank you!

Anonymous said...

Thank you from me, too! A definite sanity saver - overcoming yet another annoying Gnome 3 'feature'.

Anonymous said...

Thanks works great

kylerconway said...

You've just fixed a major annoyance of mine. Thanks!

Anonymous said...

Thanks, it is what i need

Anonymous said...

I am just amazed that this little button-presser occupies 36KB. What on earth is it doing with all that space?

shalafi said...

Nice workaround for a bug in gnome that was driving me mad. Thanks!

Anonymous said...

thank U

Schmoove said...

Yeah, this worked :) I could have sworn that my numlock was always on before upgrading from gnome2 to gnome3 under ubuntu.

Post a Comment