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

Write tutorials and howtos in here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this

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

Postby Bisto on Sat May 11, 2013 9:22 am

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 Bisto on Sat May 11, 2013 10:04 am, edited 1 time in total.
Bisto
Level 1
Level 1
 
Posts: 26
Joined: Tue Mar 26, 2013 7:41 am

Linux Mint is funded by ads and donations.
 

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

Postby killer de bug on Sat May 11, 2013 9:45 am

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
If I have seen further it is by standing on the shoulders of giants. [Isaac Newton]
User avatar
killer de bug
Level 7
Level 7
 
Posts: 1795
Joined: Tue Jul 08, 2008 1:49 pm
Location: Austria

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

Postby Bisto on Sat May 11, 2013 10:03 am

I believe that my way would set the numlock during logon, as opposed to boot. I will change the title accordingly - nice one :)
Bisto
Level 1
Level 1
 
Posts: 26
Joined: Tue Mar 26, 2013 7:41 am

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

Postby stilloving on Sat Jun 29, 2013 8:09 am

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
stilloving
Level 1
Level 1
 
Posts: 5
Joined: Sat Jun 29, 2013 7:52 am

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

Postby killer de bug on Tue Jul 02, 2013 4:12 pm

Thank you for repeating exactly what was written earlier. Very Very useful... :roll:
If I have seen further it is by standing on the shoulders of giants. [Isaac Newton]
User avatar
killer de bug
Level 7
Level 7
 
Posts: 1795
Joined: Tue Jul 08, 2008 1:49 pm
Location: Austria

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

Postby DrHu on Tue Jul 02, 2013 4:30 pm

I set my number lock in the BIOS and the Linux OS didn't change that
--OK, maybe its my version ? (lmde 13..)
User avatar
DrHu
Level 16
Level 16
 
Posts: 6783
Joined: Wed Jun 17, 2009 8:20 pm

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

Postby vksteff on Wed Aug 07, 2013 5:20 am

stilloving

Ater i reboot the numlock was off,

have you an ide what its wrong?
vksteff
Level 1
Level 1
 
Posts: 6
Joined: Fri Aug 02, 2013 11:53 am

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

Postby killer de bug on Wed Aug 07, 2013 5:59 am

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

edit : are you using mdm ? or gdm or... ?
If I have seen further it is by standing on the shoulders of giants. [Isaac Newton]
User avatar
killer de bug
Level 7
Level 7
 
Posts: 1795
Joined: Tue Jul 08, 2008 1:49 pm
Location: Austria

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

Postby vksteff on Wed Aug 07, 2013 6:09 am

killer de bug

Im new....

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

i have use sudo for edit..
vksteff
Level 1
Level 1
 
Posts: 6
Joined: Fri Aug 02, 2013 11:53 am

Linux Mint is funded by ads and donations.
 

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 3 guests