4 Dec 2013

Enable Numlock on bootup in GDM, LightDM and LXDM

GDM :-

First you'll have to install package 'numlockx'. It is available in the repositories of almost every Linux distribution. After you have installed 'numlockx' package open the following file as root in your favorite text editor,


And add the following code right above the line "exit 0" towards the end of the file,

if [ -x /etc/rc.d/rc.numlock ] && [ -x /usr/bin/numlockx ]; then
 /usr/bin/numlockx on

Reboot and you'll have your Num Lock on by default at the GDM login window.


Install package 'numlockx' as described earlier and open the following file as root,


And add the following line to the file,

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

Reboot and enjoy.


No need to install 'numlockx' here. Open the following file in your text editor as root,


And look for the line "[base]" and just add the following below it,


Save the file and you are done. On next boot you will have Num Lock enabled by default.


No comments: