[How to] change numlock default behaviour to 'on' at logon

Archived topics about LMDE 1 and LMDE 2
Locked
Bisto

[How to] change numlock default behaviour to 'on' at logon

Post by Bisto »

Hi all,
I believe this has been covered before, but I thought I would do a quick one to help others do what I finally got around to bothering with today.

In order to set your install so that your numlock defaults to on, in LMDE with Cinnamon (and quite a few other distros) you will have to install a command (numlockx)
Do this:

Code: Select all

sudo apt-get install numlockx
next you will want to set this to autorun on boot - to do this, open your menu, and type 'start' then select 'Startup Applications'
-Click on 'Add'
-in the box next to 'command' paste in the following:

Code: Select all

/usr/bin/numlockx on
-fill in the rest of the boxes with whatever you want, here's my example:
Image
-Press 'save' then close the main window.

You're all done :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
killer de bug

Re: [How to] change numlock default behaviour to 'on' at boo

Post by killer de bug »

Does this method enable numlock during login or after, when the desktop is loaded ?
I prefer this version, that way I can type my password with numbers, without any problem during the login in MDM.

After installing numlockx :
sudo gedit /etc/mdm/Init/Default
At the top of the file, just under the comments, add :
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
Bisto

Re: [How to] change numlock default behaviour to 'on' at boo

Post by Bisto »

I believe that my way would set the numlock during logon, as opposed to boot. I will change the title accordingly - nice one :)
stilloving

Re: [How to] change numlock default behaviour to 'on' at log

Post by stilloving »

This method enable numlock during login and after login, so you have the numlock always ON in your LINUX MINT and LMDE

1) FIRST, install numlockx : sudo apt-get install numlockx

2) SECOND, go to menu and type startup application and opent it.

3) Click on +add

4) On "Name" put NUMLOCK ON

5) On "Command" put /usr/bin/numlockx on

6) Click on "+add" and "close" .


7) Go to /etc/mdm/Init/ and edit Default

8) Add before exit 0 these lines:

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


Just restart your computer and next time you turn on it you have Numlock On always.


Stilloving from Argentina, Buenos Aires
killer de bug

Re: [How to] change numlock default behaviour to 'on' at log

Post by killer de bug »

Thank you for repeating exactly what was written earlier. Very Very useful... :roll:
DrHu

Re: [How to] change numlock default behaviour to 'on' at log

Post by DrHu »

I set my number lock in the BIOS and the Linux OS didn't change that
--OK, maybe its my version ? (lmde 13..)
vksteff

Re: [How to] change numlock default behaviour to 'on' at log

Post by vksteff »

stilloving

Ater i reboot the numlock was off,

have you an ide what its wrong?
killer de bug

Re: [How to] change numlock default behaviour to 'on' at log

Post by killer de bug »

Follow my first post in this topic. Don't create a start up application please.

edit : are you using mdm ? or gdm or... ?
vksteff

Re: [How to] change numlock default behaviour to 'on' at log

Post by vksteff »

killer de bug

Im new....

Then i save it and reboot its gone, like i dont write it.

i have use sudo for edit..
nswearin
Level 1
Level 1
Posts: 8
Joined: Sat Oct 04, 2014 1:39 am

Re: [How to] change numlock default behaviour to 'on' at log

Post by nswearin »

One using LinuxMint 17, cinnamon not sure of other specifics, can simply search software manager for numlockx, install it and then check the "enable numlock" box in Login window preferences

step 1: menu > administration > software manager > (enter password for admin user) > then search and install numlockx
step 2: menu > administration > login window > (enter password for admin user) > options > check the "enable numlock" box

to me that was easiest method :D (yes typing my password twice was annoying but hey it worked :) )
Got 5 to 10 systems running varying versions of LM Cinnamon, Mate, and Xfce.
HexChat user/nick : Sysadmin
Relatively new to Mint but enjoy learning and digging deep into issues rather than simply accepting "hardware's too old and unsupported"
johnniedoo

Re: [How to] change numlock default behaviour to 'on' at log

Post by johnniedoo »

I am a very new Linux(mint17-mate mostly) and in MATE
I do the above terminal numlockx install, then i go to the 'Appearance"
app and under 'options' the number lock enable is no longer dim
i just check to enable number lock or uncheck to disable.
But, it took me a while to figure out why the numlock check box was dimmed out
no numlockx applet comes up with the bin command , but the numlock check box is live
Locked

Return to “LMDE Archive”