Post

How to enable NumLock on Ubuntu Login Screen

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.

  1. Get gdm user privilege in a terminal window.

    1. Open terminal by either pressing Ctrl+Alt+T or searching for ‘Terminal’ from software launcher.

      launch terminal

    2. Run command to get root privilege (type your password when it prompts):

      1
      
       sudo -i
      

      get into root

    3. In the terminal, run command to allow gdm to make connections to the X server:

      1
      
       xhost +SI:localuser:gdm
      

      allow-gdm-tox

    4. Finally switch to user gdm in this terminal via command:

      1
      
       su gdm -s /bin/bash
      

      gdm-terminal

  2. Run the command to enable NumLock automatically on the login screen:

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

    enable numlock

  3. 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
    

    enable tap-to-click

NumLock and tap-to-click should now be enabled on your next startup.

This post is licensed under CC BY 4.0 by the author.