How to enable NumLock on Ubuntu Login Screen
Introduction
In this post we discuss how to enable both NumLock and tap-to-click for the login screen of Ubuntu 18.04 LTS.
Steps
The GSettings configuration tool will enable us to do the task via 2 commands, although it requires the gdm user privilege.
Get gdm user privilege in a terminal window.
Open terminal by either pressing Ctrl+Alt+T or searching for ‘Terminal’ from software launcher.
Run command to get root privilege (type your password when it prompts):
1
sudo -i
In the terminal, run command to allow gdm to make connections to the X server:
1
xhost +SI:localuser:gdm
Finally switch to user gdm in this terminal via command:
1
su gdm -s /bin/bash
Run the command to enable NumLock automatically on the login screen:
1
gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'
To enable tap-to-click, run the following command in the same terminal:
1
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
NumLock and tap-to-click should now be enabled on your next startup.