19

Situation:

When I turn on my Linux Mint 20/19/18/17 Cinnamon the NumLock is Off in the Login window.

Objective:

Turn on NumLock automatically at startup in the Login window.

3 Answers 3

25

For all versions of Linux Mint

You need to install a program needed for this purpose - numlockx; man page:

sudo apt-get install numlockx

Choose if you wish to achieve the goal through CLI or GUI below.


Linux Mint 20.x / 19.x (LightDM)

GUI; probably most convenient under normal operation:

Once numlockx is installed, the following menu item in Login Window -> Settings called:

Activate numlock

becomes available; as you can see:

Login Window Settings

This will add the line:

activate-numlock=true

to the following file:

/etc/lightdm/slick-greeter.conf

Linux Mint 18.x / 17.x (MDM)

GUI; probably most convenient under normal operation:

Once numlockx is installed, the following menu item in Login Window -> Options called:

Enable NumLock

becomes available; as you can see:

Login Window Preferences

As pointed out in the other answer, this will add the following line to /etc/mdm/mdm.conf:

EnableNumLock=true

CLI; suitable if you are setting other computers up through SSH, for instance:

Open a text editor you are skilled in with this file, e.g. nano if unsure:

sudoedit /etc/mdm/Init/Default

Add these lines at the beginning of the file:

if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
fi

As pointed out by Gilles, don't put exec in front of the command.

0
3

When you install numlockx (mentioned by vlastimil above) on Linux Mint 18.3 Cinnamon than the option is called Activate numlock located in System Settings > Login Window > Settings. enter image description here

1

Works to me by just installing numlockx package.

I didn't have to add those lines.

I can enable NumLock on Login Screen, from the GUI: Login Window (Preferences) » Options.

I see that in /etc/mdm/mdm.conf a new entry has been added:

EnableNumLock=true

(My OS: Linux Mint 17.3 Mate 64-bit.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .