LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-02-2014, 11:06 AM   #1
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 197
Blog Entries: 1

Rep: Reputation: 83
Lightbulb HOWTO: Debian 7 (Wheezy) LXDE Auto Numlock, both BEFORE and AFTER login


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.

Last edited by luvr; 04-02-2014 at 12:13 PM.
 
Old 04-03-2014, 04:05 AM   #2
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Hi luvr, it's been ages since I read anything you wrote (on another forum) but your clear and concise style has never changed. Good to see you're still working as hard as ever.
 
Old 04-07-2014, 04:11 PM   #3
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 197

Original Poster
Blog Entries: 1

Rep: Reputation: 83
Quote:
Originally Posted by k3lt01 View Post
Hi luvr, it's been ages since I read anything you wrote (on another forum) but your clear and concise style has never changed. Good to see you're still working as hard as ever.
Well, thank you for your nice words! I must admit, though, that I've been down and out for a while, but that I'm currently in the process of slowly recovering to full force.
 
Old 04-08-2014, 10:00 PM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Very clear and concise. Thanks a lot.

Only thing that you need to do is mark this thread as solved so that folks that use the forum search function will find it and use it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Changing The Login Screen Background in Debian Wheezy(LXDE)? xcanox Debian 5 11-30-2014 11:37 PM
[SOLVED] Unable to change a LXDE desktop settings on Debian Wheezy xcanox Linux - Desktop 4 05-13-2014 05:50 AM
LXer: Howto: Virtualization with KVM and openQRM 5.1 on Debian Wheezy LXer Syndicated Linux News 0 08-11-2013 03:51 PM
LXer: Howto: Install openQRM 5.1 on Debian Wheezy LXer Syndicated Linux News 0 08-10-2013 07:01 AM
Debian Live, howto disable auto-login in gnome and in text shells (ctrl-alt 1/7) friendship7 Debian 1 01-26-2007 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration