I want numlock enabled everytime when Ubuntu starts. Here I found a guide how to do it, I just can not get into "Keyboard Preferences". When I go into "Keyboard" there are just "Typing" and "Shortcuts" tabs. In "Text Entry", there is nothing ragarding layout or preferences too. Or is that screenshot from older version and todays version doesnt contain these settings?
3 Answers
If you want numlock to be enabled before getting to the login screen
sudo apt-get install numlockx
Then edit the file /etc/lightdm/lightdm.conf
And add this line to the bottom:
greeter-setup-script=/usr/bin/numlockx on
This will enable the numlock before you login as opposed to something like indicator-keylock which only loads with the desktop. It's handy if you have numbers in your username or password and you want to use the number pad.
If you're not using lightdm and don't have the above mentioned file or directory, then put this into terminal:
sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& numlockx on\n\nexit 0|' /etc/rc.local
This will enabled it on boot, but in a different way.

- 10,923
Personally I find the guide you mentioned unnecessarily complicated. The official Ubuntu Desktop Guide explains it clearer:
https://help.ubuntu.com/stable/ubuntu-help/numeric-keypad.html
However, the recommended command to make it work also on the login screen is about to be changed from using /usr/share
to using /etc
. Hence it will be:
sudo sh -c 'printf "[Seat:*]\ngreeter-setup-script=numlockx on\n" >/etc/lightdm/lightdm.conf.d/50-numlock.conf'
Note: Before this change has made it into Xenial, you need to first create the directory:
sudo mkdir /etc/lightdm/lightdm.conf.d

- 33,540
- 3
- 64
- 94
Open a Terminal window and type:
sudo add-apt-repository ppa:tsbarnes/indicator-keylock
sudo apt-get update
sudo apt-get install indicator-keylock indicator-keylock'
Then press numlock key to activate it. The indicator will make sure it will remain active even after reboot.

- 2,584
-
Problem is that I dont have numlock on keyboard, so I couldnt activate it. – PKM May 25 '16 at 13:02
-
You have a numpad, but you don't have a numlock key? How did that magic happen? Anyways, you can activate numlock by clicking on the indicator and check the appropiate box. – ipse lute May 25 '16 at 13:52
-
-
Yeah, I know its kinda ironic, I really dont know why manufacturer skipped it on my NB model. I already read that article, but I cant get into "Keyboard Preferences" window. – PKM May 25 '16 at 15:55
-
Ok, so i found two possible workarounds:1-(de)activate numkey in BIOS (http://smallbusiness.chron.com/disable-num-lock-computer-bios-70151.html) OR 2-remap numkey to another physical key (https://radu.cotescu.com/remapping-keys-in-ubuntu-14.04/ OR http://askubuntu.com/questions/24916/how-do-i-remap-certain-keys-or-devices). I hope any of these will help you. – ipse lute May 25 '16 at 16:10
-
-
Please publish the solution that helped you most as an answer, so that others may benefit from your experience. Thank you. – ipse lute May 25 '16 at 16:51
-
50-unity-greeter.conf
, since it's a package owned file, and any edits will disappear at next upgrade of the unity-greeter package. Create a new file instead - please see my answer. – Gunnar Hjalmarsson May 25 '16 at 16:39