These days, I'm getting more and more questions from people who own fairly old computers that have been running (or, often, rather
crawling) Windows XP so far. Instead of dumping their old hardware and buying new PCs with the dreaded Windows 8 system, they come and ask me if there isn't anything I can do to revive their computers.
Since these computers are not particularly powerful, I went looking for a fairly lightweight desktop, and I opted for LXDE, specifically the Debian 7 Wheezy LXDE distribution.
Most people appear quite happy about this choice, except that I kept getting one complaint over and over again:
"The numeric keypad doesn't work!" Actually, this issue is a simple matter of
NumLock being turned off by default, and of hitting the
NumLock key to turn it on. One additional inconvenience, as it turned out, was that
NumLock was automatically turned off
before login, and (even after it was manually turned on at the login screen) it was turned off again
after the login process was completed. This behaviour was getting on people's nerves, so I went looking for a solution.
This post serves to document the solution that I have come up with.
First, it is important to understand which
Display Manager your system is running. You can find this out with the following command:
Code:
cat /etc/X11/default-display-manager
The output from this command should tell you that Debian 7 Wheezy LXDE uses the
LightDM Display Manager,
"/usr/sbin/lightdm". Armed with this knowledge, you can configure your system such that
NumLock will be turned on
before the user logs in. Just follow these steps:
- Install the "numlockx" package (as root, obviously):
Code:
apt-get install numlockx
- Edit the LightDM configuration file, "/etc/lightdm/lightdm.conf", and (again, as root) add the following line under the "[SeatDefaults]" section heading:
Code:
greeter-setup-script=/usr/bin/numlockx on
NOTE: If you are using a different Display Manager, then the LightDM configuration file will not be used, and you will have to take some other action instead.
Next time you reboot,
NumLock will be turned on by the time the login screen is displayed. Once you log in to your LXDE session, however,
NumLock will be
OFF again.
To ensure that
NumLock will be turned
ON again once you are logged in, you will need to make one more edit: Still as root, add the following line to the file
"/etc/xdg/lxsession/LXDE/autostart":
Code:
/usr/bin/numlockx on
Note that the existing lines in the file will likely all start with an '@'-sign. You should
not, however, type an '@'-sign on the newly added line. (If you did, then
numlockx would be restarted whenever it ended— which is definitely
not what you would want to happen.)
From now on,
NumLock will be turned on not only when the login screen is displayed, but also after the user logs in to start the LXDE desktop environment.