KDE Tip - Switching NumLock On at the KDE Login Screen

Back last month I covered a quick KDE tip on how to set the Num Lock key on when you log in to KDE.

While that generally works, it doesn't cover the KDE login screen (or KDM).

You might wonder why this is an issue, but I have found that on my Kubuntu Hardy system, if you don't have Num Lock on at the KDM screen, the keyboard Num Lock light will stay off when you log in to KDE. KDE will then dutifully turn Num Lock on, but the light won't go on for some reason.

This results in the confusing state of having the Num Lock light on the keyboard display the opposite to what the current Num Lock status is.

To fix this, you can set Num Lock on at the login screen, which toggles the light correctly.

Unfortunately, I can't find any way to change this setting graphically, so here's how to do it through configuration files. The file you need to edit is kdmrc.

The exact location of that file might vary according to your distribution. Here on Kubuntu it's /etc/kde3/kdm/kdmrc, but it might be in a share directory somewhere.

Try this to find it:

$ locate kdmrc

Open that file up in a text editor. You will probably need to have administrator privileges, so press Alt-F2 and type this:

kdesu kwrite /etc/kde3/kdm/kdmrc

In that file, find the first section that begins:

[X-*-Greeter]

Right after that line, add this:

NumLock=On

Save the file and quit. To see your changes, you might need to restart KDM. The easy, but slower, way to do this is to restart the computer, but you can also try pressing Ctrl-Alt-Backspace to restart the graphics server which should bring KDM back up again.

Num Lock should now be on at the login screen. Shame it had to be so complicated.

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: KDE Tip - Switching NumLock On at the KDE Login Screen

  1. Binny V A (guest)

    # Posted on 23 June 2008 at 04:44 PM

    I think there is an option to turn on the Numlock in the BIOS settings somewhere. That should fix ite



  2. BassMan (guest)

    # Posted on 04 August 2008 at 04:25 AM

    Setting it in the BIOS won't necessarily fix it because usually the OS will override it and change the setting itself.



Home » Articles » KDE Tip - Switching NumLock On at the KDE Login Screen