Q. How do I make sure that numlock is always turn on GNOME Linux desktop system?
A. You need to install numlockx package, which enable NumLock in X11 sessions.
This little software allows you to start X with NumLock turned on which is a feature that a lot of people seem to miss and nobody really knew how to achieve this.
To install numlockx type the command:
# apt-get install numlockx
Now open your /etc/X11/gdm/Init/Default file and add line:
/usr/bin/numlockx on
Save and close the file.
You can also add line to /etc/X11/xinit/xinitrc. Open file:
# vi /etc/X11/xinit/xinitrc
At the beginning of file add line
/usr/bin/numlockx on
Save and close the file.
If you're not root (or don't have access to root account) and therefore you can modify neither config file, you can use your ~/.xinitrc ( in your home directory /home/you/.xinitrc file).
$ cd
$ vi .xinitrc
Append following line
/usr/bin/numlockx on
Save and close the file.
Reboot the system or restart the GNOME.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 1 comment… read it below or add one }
On nowadays’ distros xinitrc file has been deprecated in favor of xinitrc.d script directory, which provides better maintainability for packagers.
So, instead of editing
it’s better to create a script like this:
Then paste this code (don’t forget shebang line):
And lastly, give that file execute permissions.
Reboot to test it, and done.