I have a fresh 18.04 install and would like to enable the numlock key for login, without switching to the older lightDM. I saw this, this and this, but when trying the gdm approach I get: Command 'gdm' not found but as said above I would like to achieve this small task, without having to switch to lightDM or do some other major changes.


Do the following:

xhost +SI:localuser:gdm

sudo su gdm -s /bin/bash

Now, you need to use gsettings or dconf #or dconf-edit if you have it

Go to /org/gnome/settings-daemon/peripherals/keyboard/numlock-state and change it to on

or simply after the two lines do this

dconf write /org/gnome/settings-daemon/peripherals/keyboard/numlock-state "'on'"


gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'

Now reboot

  • Awesome it worked, could you maybe add a bit of explanation what the first command does? The other ones are self explanatory. Looking at the man page of xhost it looks like it adds gdm to the allowed display managers? – Hakaishin Jul 26 '19 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.