How to activate numlock on by default in Manjaro or any other Arch derivative

Problem:

You have Manjaro with Xfce desktop environment installed and you want to turn numlock on by default so that you can use the number-pad on your keyboard at the login screen and after logging-in to Xfce desktop. This should have been the default behavior but sadly it’s not! Anyway, it’s an easy problem to fix. This solution is written for Manjaro but it should work on almost all Arch Linux based distributions and derivatives with LightDM display manager.

Solution:

First and foremost, you need to install a little utility called numlockx. To do so, open your terminal emulator and run the following command,

sudo pacman -S numlockx

Next, open the file /etc/lightdm/lightdm.conf in your favorite text-editor. For example you can use GNU nano to do so,

sudo nano /etc/lightdm/lightdm.conf

And in that file under the [Seat:*] section, you’ll find the following line,

#greeter-setup-script=

Uncomment that line and add the path to numlockx and a command switch to toggle it on like this,

greeter-setup-script=/usr/bin/numlockx on

Save the changes to the file. If you are using Xfce desktop environment, one final step you’ll have to take is to make a tiny change in the Keyboard settings. You can navigate to this settings window like this,

Menu => Settings => Keyboard

And in the Keyboard settings window you’ll find Restore num lock state on startup option in the General section under the Behavior tab. Enable this by clicking on the check mark box.
That’s it! This will keep numlock on by default the next time you boot your system. You’ll have numlock on all the way from logging screen and onto the desktop session.


 Date: January 14, 2022
 Tags:  how-to numlock
 Comments: 

I don't have comments on this blog as they not only are difficult to manage, but are also prone to privacy and security risks.
Instead of leaving a comment, you could email me directly.

Previous
⏪ How to activate numlock on by default in openSUSE with Xfce