How to enable numlock at boot time for login screen?

Clash Royale CLAN TAG#URR8PPP up vote
88
down vote
favorite
I am trying to force numlock to be on upon initial boot at the login screen on Ubuntu 12.04. The only solutions I have found so far switch numlock on only after initial login.
I'm looking to force numlock to be on when the login screen is displayed, and before the user has logged in. Can anyone assist?
login-screen numlock
add a comment |Â
up vote
88
down vote
favorite
I am trying to force numlock to be on upon initial boot at the login screen on Ubuntu 12.04. The only solutions I have found so far switch numlock on only after initial login.
I'm looking to force numlock to be on when the login screen is displayed, and before the user has logged in. Can anyone assist?
login-screen numlock
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
1
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58
add a comment |Â
up vote
88
down vote
favorite
up vote
88
down vote
favorite
I am trying to force numlock to be on upon initial boot at the login screen on Ubuntu 12.04. The only solutions I have found so far switch numlock on only after initial login.
I'm looking to force numlock to be on when the login screen is displayed, and before the user has logged in. Can anyone assist?
login-screen numlock
I am trying to force numlock to be on upon initial boot at the login screen on Ubuntu 12.04. The only solutions I have found so far switch numlock on only after initial login.
I'm looking to force numlock to be on when the login screen is displayed, and before the user has logged in. Can anyone assist?
login-screen numlock
edited Jul 24 '12 at 21:57
Jjed
10.5k65789
10.5k65789
asked Jun 25 '12 at 7:42
darryn.ten
6331815
6331815
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
1
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58
add a comment |Â
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
1
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
1
1
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58
add a comment |Â
8 Answers
8
active
oldest
votes
up vote
58
down vote
accepted
On many machines, you can set whether or not Number Lock is turned on on boot, in the BIOS settings (accessible when you first power on the machine).
Otherwise, there are a number of ways to enable (or disable) Number Lock in software, depending on your specific needs. The most useful ways are listed here.
If you want Number Lock turned on when Ubuntu starts (not before that on the GRUB menu, and not afterwards when logging in, and not just for specific virtual consoles), then install numlockx and make the initialization script /etc/rc.local use it to enable Number Lock:
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enablen[ -x /usr/bin/numlockx ] && numlockx onnnexit 0|' /etc/rc.local
Source: NumLock, by Contributors to the Ubuntu documentation wiki, last line taken verbatim (as this source permits).
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I didsudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?
â Samir
Jul 21 '13 at 13:26
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
add a comment |Â
up vote
36
down vote
Here's what worked for me:
Ensure that numlockx is installed:
sudo apt-get install numlockxEdit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.confAdd the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to removegreeter-session=unity-greeteror the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?
â Samir
Jul 21 '13 at 13:35
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
I don't have the file/etc/lightdm/lightdm.confBut I have this/etc/lightdm/lightdm.conf.d/70-linuxmint.confand it works!!! :D
â Shayan
Feb 28 at 15:20
 |Â
show 3 more comments
up vote
22
down vote
14.04
Yes, use locate command as follow:
locate 50-unity-greeter.conf
The output is:
/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
So, the file you need to edit is the above file.
sudo apt-get install numlockx
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add this line at the end of file:
greeter-setup-script=/usr/bin/numlockx on
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I useXubuntu 14.04and the file was/etc/lightdm/lightdm.conf.d/10-xubuntu.confand I added thegreeter-setup-script=/usr/bin/numlockx onto the end of that file and it worked great! +1 for pointing me in the right direction!
â Terrance
Feb 3 '16 at 1:00
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
 |Â
show 2 more comments
up vote
14
down vote
For Enabling it on Login Screen
First, ensure that numlockx is installed, by typing these in terminal:
sudo apt-get install numlockx
Then, edit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
For Enabling Numlock by Default after Logging In..
- In Dash Search for Keyboard Layout and open it
- In the window that opens on the ottom right there is Options, click on it.
- Under Miscellaneous compatibility options, Enable Default Numeric Keys.

1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
add a comment |Â
up vote
6
down vote
I have done this, and it worked for me. First, make sure you have universe repository added.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
sudo apt-get update
sudo apt-get install numlockx
Now that numlockx is installed, create a file named Default in /etc/X11/ with these contents:
if [ -x /usr/bin/X11/numlockx ]; then
/usr/bin/X11/numlockx on
fi
exit 0
Turn off your Num Lock and reboot. VoilÃÂ !
doesn't work in 18.04
â equitharn
May 2 at 14:38
add a comment |Â
up vote
4
down vote
Xubuntu specific.
Versions from 14.10 include a pkexec mousepad action.
Follow previous answers to install numlockx
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf as root
Alt+F2 then
pkexec mousepad /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Add
greeter-setup-script=/usr/bin/numlockx on
then save.
add a comment |Â
up vote
2
down vote
Most BIOSes allow this to be enabled. You can check your BIOS for this feature.
OR
Go to : System Settings -> Keyboard Layout -> Options -> Miscellaneous compatibility options
Check "Default numeric keypad keys"
Sources : https://help.ubuntu.com/community/NumLock
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
add a comment |Â
up vote
1
down vote
Here is a little bash script which takes care of everything in an automated way:
#!/usr/bin/env bash
FILE='/etc/lightdm/lightdm.conf'
KEYVALUE='greeter-setup-script=/usr/bin/numlockx on'
sudo apt-get --yes install numlockx
grep --quiet "$KEYVALUE" "$FILE" || echo "$KEYVALUE" | sudo tee --append "$FILE"
Do not forget to first make your bash script executable with chmod +x scriptname, then execute it with ./scriptname.
add a comment |Â
protected by Community⦠Feb 16 '14 at 9:28
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
58
down vote
accepted
On many machines, you can set whether or not Number Lock is turned on on boot, in the BIOS settings (accessible when you first power on the machine).
Otherwise, there are a number of ways to enable (or disable) Number Lock in software, depending on your specific needs. The most useful ways are listed here.
If you want Number Lock turned on when Ubuntu starts (not before that on the GRUB menu, and not afterwards when logging in, and not just for specific virtual consoles), then install numlockx and make the initialization script /etc/rc.local use it to enable Number Lock:
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enablen[ -x /usr/bin/numlockx ] && numlockx onnnexit 0|' /etc/rc.local
Source: NumLock, by Contributors to the Ubuntu documentation wiki, last line taken verbatim (as this source permits).
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I didsudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?
â Samir
Jul 21 '13 at 13:26
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
add a comment |Â
up vote
58
down vote
accepted
On many machines, you can set whether or not Number Lock is turned on on boot, in the BIOS settings (accessible when you first power on the machine).
Otherwise, there are a number of ways to enable (or disable) Number Lock in software, depending on your specific needs. The most useful ways are listed here.
If you want Number Lock turned on when Ubuntu starts (not before that on the GRUB menu, and not afterwards when logging in, and not just for specific virtual consoles), then install numlockx and make the initialization script /etc/rc.local use it to enable Number Lock:
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enablen[ -x /usr/bin/numlockx ] && numlockx onnnexit 0|' /etc/rc.local
Source: NumLock, by Contributors to the Ubuntu documentation wiki, last line taken verbatim (as this source permits).
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I didsudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?
â Samir
Jul 21 '13 at 13:26
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
add a comment |Â
up vote
58
down vote
accepted
up vote
58
down vote
accepted
On many machines, you can set whether or not Number Lock is turned on on boot, in the BIOS settings (accessible when you first power on the machine).
Otherwise, there are a number of ways to enable (or disable) Number Lock in software, depending on your specific needs. The most useful ways are listed here.
If you want Number Lock turned on when Ubuntu starts (not before that on the GRUB menu, and not afterwards when logging in, and not just for specific virtual consoles), then install numlockx and make the initialization script /etc/rc.local use it to enable Number Lock:
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enablen[ -x /usr/bin/numlockx ] && numlockx onnnexit 0|' /etc/rc.local
Source: NumLock, by Contributors to the Ubuntu documentation wiki, last line taken verbatim (as this source permits).
On many machines, you can set whether or not Number Lock is turned on on boot, in the BIOS settings (accessible when you first power on the machine).
Otherwise, there are a number of ways to enable (or disable) Number Lock in software, depending on your specific needs. The most useful ways are listed here.
If you want Number Lock turned on when Ubuntu starts (not before that on the GRUB menu, and not afterwards when logging in, and not just for specific virtual consoles), then install numlockx and make the initialization script /etc/rc.local use it to enable Number Lock:
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enablen[ -x /usr/bin/numlockx ] && numlockx onnnexit 0|' /etc/rc.local
Source: NumLock, by Contributors to the Ubuntu documentation wiki, last line taken verbatim (as this source permits).
edited Jun 25 '12 at 8:22
answered Jun 25 '12 at 7:48
Eliah Kagan
79.3k20219359
79.3k20219359
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I didsudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?
â Samir
Jul 21 '13 at 13:26
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
add a comment |Â
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I didsudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?
â Samir
Jul 21 '13 at 13:26
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I did
sudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?â Samir
Jul 21 '13 at 13:26
So I followed the instructions over at the wiki page you linked to. I did the update command you list here. I did
sudo apt-get install numlockx. But I didn't use the y option. Is that necessary? Didn't say anything about it over at the wiki page so I didn't do any of that. I rebooted and everything but Numlock is still disabled at boot and at login screen. Will try the update command. Other than that, am I missing something else here? The option "default numeric keypad keys" from keyboard preferences doesn't concern boot settings so I didn't enable that. Should I?â Samir
Jul 21 '13 at 13:26
1
1
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
This did not work for me. Answer by +luvr did however.
â Clarkey
Aug 24 '13 at 19:16
4
4
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
This no longer works on Xubuntu LTS 12.04.
â Serge Stroobandt
May 9 '14 at 16:39
2
2
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
-y option is for force answer "Yes" if apt-get question about to install it. BECAREFUL WITH THIS: sometimes -I think here it is not the case, at least not in my case- there is some cases when apt-get says that something is needed to remove; in that cases apt-get will ask you confirm that action. But, sometimes remove packages automatically using apt would cause several problems on your machine. As an example sometimes ask you for remove some graphical packages that are use for GUI'S. Even sometimes it has asked me to remove gnome-desktop and some gpu drivers...that will really messed up SO
â Diego Andrés DÃaz Espinoza
Mar 12 '15 at 18:55
add a comment |Â
up vote
36
down vote
Here's what worked for me:
Ensure that numlockx is installed:
sudo apt-get install numlockxEdit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.confAdd the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to removegreeter-session=unity-greeteror the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?
â Samir
Jul 21 '13 at 13:35
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
I don't have the file/etc/lightdm/lightdm.confBut I have this/etc/lightdm/lightdm.conf.d/70-linuxmint.confand it works!!! :D
â Shayan
Feb 28 at 15:20
 |Â
show 3 more comments
up vote
36
down vote
Here's what worked for me:
Ensure that numlockx is installed:
sudo apt-get install numlockxEdit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.confAdd the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to removegreeter-session=unity-greeteror the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?
â Samir
Jul 21 '13 at 13:35
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
I don't have the file/etc/lightdm/lightdm.confBut I have this/etc/lightdm/lightdm.conf.d/70-linuxmint.confand it works!!! :D
â Shayan
Feb 28 at 15:20
 |Â
show 3 more comments
up vote
36
down vote
up vote
36
down vote
Here's what worked for me:
Ensure that numlockx is installed:
sudo apt-get install numlockxEdit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.confAdd the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
Here's what worked for me:
Ensure that numlockx is installed:
sudo apt-get install numlockxEdit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.confAdd the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
edited Jan 9 '13 at 1:16
Eliah Kagan
79.3k20219359
79.3k20219359
answered Apr 29 '12 at 20:11
luvr
36123
36123
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to removegreeter-session=unity-greeteror the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?
â Samir
Jul 21 '13 at 13:35
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
I don't have the file/etc/lightdm/lightdm.confBut I have this/etc/lightdm/lightdm.conf.d/70-linuxmint.confand it works!!! :D
â Shayan
Feb 28 at 15:20
 |Â
show 3 more comments
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to removegreeter-session=unity-greeteror the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?
â Samir
Jul 21 '13 at 13:35
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
I don't have the file/etc/lightdm/lightdm.confBut I have this/etc/lightdm/lightdm.conf.d/70-linuxmint.confand it works!!! :D
â Shayan
Feb 28 at 15:20
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
How can I just verify that numlockx is installed? Should it appear on a dash search?
â Samir
Jul 21 '13 at 13:32
Do I have to remove
greeter-session=unity-greeter or the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?â Samir
Jul 21 '13 at 13:35
Do I have to remove
greeter-session=unity-greeter or the user-session=ubuntu` from the file (lightdm.conf)? Or just the greeter-setup-script line below them?â Samir
Jul 21 '13 at 13:35
4
4
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
On Ubuntu 13.10 this method prevented the display of the login screen on my machine. After the initial display of the Ubuntu logo, the monitor was simply showing that there is no signal (I tried to reboot a couple of times but it always ended up the same). Not knowing what else to do, I booted the system from a live USB and removed the line from lightdm.conf. After that the system loaded up again just fine.
â tmt
Jan 3 '14 at 15:57
2
2
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
While I know this trick worked for me in past versions, it no longer seems to works in 14.04. Adding this line to lightdm.conf breaks the login process, sending me to Low Graphics mode and preventing a login with Nvidia drivers. Removing this line fixed the problem.
â cowbell40
Jan 12 '15 at 19:28
1
1
I don't have the file
/etc/lightdm/lightdm.conf But I have this /etc/lightdm/lightdm.conf.d/70-linuxmint.conf and it works!!! :Dâ Shayan
Feb 28 at 15:20
I don't have the file
/etc/lightdm/lightdm.conf But I have this /etc/lightdm/lightdm.conf.d/70-linuxmint.conf and it works!!! :Dâ Shayan
Feb 28 at 15:20
 |Â
show 3 more comments
up vote
22
down vote
14.04
Yes, use locate command as follow:
locate 50-unity-greeter.conf
The output is:
/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
So, the file you need to edit is the above file.
sudo apt-get install numlockx
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add this line at the end of file:
greeter-setup-script=/usr/bin/numlockx on
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I useXubuntu 14.04and the file was/etc/lightdm/lightdm.conf.d/10-xubuntu.confand I added thegreeter-setup-script=/usr/bin/numlockx onto the end of that file and it worked great! +1 for pointing me in the right direction!
â Terrance
Feb 3 '16 at 1:00
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
 |Â
show 2 more comments
up vote
22
down vote
14.04
Yes, use locate command as follow:
locate 50-unity-greeter.conf
The output is:
/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
So, the file you need to edit is the above file.
sudo apt-get install numlockx
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add this line at the end of file:
greeter-setup-script=/usr/bin/numlockx on
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I useXubuntu 14.04and the file was/etc/lightdm/lightdm.conf.d/10-xubuntu.confand I added thegreeter-setup-script=/usr/bin/numlockx onto the end of that file and it worked great! +1 for pointing me in the right direction!
â Terrance
Feb 3 '16 at 1:00
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
 |Â
show 2 more comments
up vote
22
down vote
up vote
22
down vote
14.04
Yes, use locate command as follow:
locate 50-unity-greeter.conf
The output is:
/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
So, the file you need to edit is the above file.
sudo apt-get install numlockx
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add this line at the end of file:
greeter-setup-script=/usr/bin/numlockx on
14.04
Yes, use locate command as follow:
locate 50-unity-greeter.conf
The output is:
/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
So, the file you need to edit is the above file.
sudo apt-get install numlockx
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add this line at the end of file:
greeter-setup-script=/usr/bin/numlockx on
edited May 11 '14 at 16:52
answered Apr 2 '14 at 11:42
Radu RÃÂdeanu
110k33240319
110k33240319
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I useXubuntu 14.04and the file was/etc/lightdm/lightdm.conf.d/10-xubuntu.confand I added thegreeter-setup-script=/usr/bin/numlockx onto the end of that file and it worked great! +1 for pointing me in the right direction!
â Terrance
Feb 3 '16 at 1:00
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
 |Â
show 2 more comments
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I useXubuntu 14.04and the file was/etc/lightdm/lightdm.conf.d/10-xubuntu.confand I added thegreeter-setup-script=/usr/bin/numlockx onto the end of that file and it worked great! +1 for pointing me in the right direction!
â Terrance
Feb 3 '16 at 1:00
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
1
1
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
What's the difference between /usr/share/lightdm/ and /etc/lightdm? Wouldn't the settings in the former folder be overwritten with updates, while in the second they wont or did I misunderstand the meaning of the folders?
â Peter Raeves
Oct 21 '14 at 8:39
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
@PeterRaeves: You are absolutely correct. Radu, I would suggest that you edit your answer accordingly. Editing a package file which is not under /etc can't be anything but a temporary hack.
â Gunnar Hjalmarsson
Nov 8 '14 at 22:32
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This one worked for me
â abhishah901
Sep 18 '15 at 4:19
This is the closest answer that helped me. I use
Xubuntu 14.04 and the file was /etc/lightdm/lightdm.conf.d/10-xubuntu.conf and I added the greeter-setup-script=/usr/bin/numlockx on to the end of that file and it worked great! +1 for pointing me in the right direction!â Terrance
Feb 3 '16 at 1:00
This is the closest answer that helped me. I use
Xubuntu 14.04 and the file was /etc/lightdm/lightdm.conf.d/10-xubuntu.conf and I added the greeter-setup-script=/usr/bin/numlockx on to the end of that file and it worked great! +1 for pointing me in the right direction!â Terrance
Feb 3 '16 at 1:00
2
2
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
in 16.04 beta2 this will lead to this problem askubuntu.com/questions/141606/â¦
â Geng Jiawen
Apr 6 '16 at 9:28
 |Â
show 2 more comments
up vote
14
down vote
For Enabling it on Login Screen
First, ensure that numlockx is installed, by typing these in terminal:
sudo apt-get install numlockx
Then, edit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
For Enabling Numlock by Default after Logging In..
- In Dash Search for Keyboard Layout and open it
- In the window that opens on the ottom right there is Options, click on it.
- Under Miscellaneous compatibility options, Enable Default Numeric Keys.

1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
add a comment |Â
up vote
14
down vote
For Enabling it on Login Screen
First, ensure that numlockx is installed, by typing these in terminal:
sudo apt-get install numlockx
Then, edit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
For Enabling Numlock by Default after Logging In..
- In Dash Search for Keyboard Layout and open it
- In the window that opens on the ottom right there is Options, click on it.
- Under Miscellaneous compatibility options, Enable Default Numeric Keys.

1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
add a comment |Â
up vote
14
down vote
up vote
14
down vote
For Enabling it on Login Screen
First, ensure that numlockx is installed, by typing these in terminal:
sudo apt-get install numlockx
Then, edit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
For Enabling Numlock by Default after Logging In..
- In Dash Search for Keyboard Layout and open it
- In the window that opens on the ottom right there is Options, click on it.
- Under Miscellaneous compatibility options, Enable Default Numeric Keys.

For Enabling it on Login Screen
First, ensure that numlockx is installed, by typing these in terminal:
sudo apt-get install numlockx
Then, edit the file /etc/lightdm/lightdm.conf
gksudo gedit /etc/lightdm/lightdm.conf
Add the following line to the file:
greeter-setup-script=/usr/bin/numlockx on
For Enabling Numlock by Default after Logging In..
- In Dash Search for Keyboard Layout and open it
- In the window that opens on the ottom right there is Options, click on it.
- Under Miscellaneous compatibility options, Enable Default Numeric Keys.

answered May 2 '12 at 17:20
sarveshlad
2,14021526
2,14021526
1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
add a comment |Â
1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
1
1
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
it's not this case, i make this procedure by the way. I press the button "Num Lock" and immediately it's goes off, "don't stay on". I had checked the keyboard and it's ok in other machine and other o.s. I change the keyboard to an older ps/2 keyboard to test. It seems that works, ie, there is some problem with USB keyboard in ubuntu 12.04
â Brunno
May 4 '12 at 14:12
add a comment |Â
up vote
6
down vote
I have done this, and it worked for me. First, make sure you have universe repository added.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
sudo apt-get update
sudo apt-get install numlockx
Now that numlockx is installed, create a file named Default in /etc/X11/ with these contents:
if [ -x /usr/bin/X11/numlockx ]; then
/usr/bin/X11/numlockx on
fi
exit 0
Turn off your Num Lock and reboot. VoilÃÂ !
doesn't work in 18.04
â equitharn
May 2 at 14:38
add a comment |Â
up vote
6
down vote
I have done this, and it worked for me. First, make sure you have universe repository added.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
sudo apt-get update
sudo apt-get install numlockx
Now that numlockx is installed, create a file named Default in /etc/X11/ with these contents:
if [ -x /usr/bin/X11/numlockx ]; then
/usr/bin/X11/numlockx on
fi
exit 0
Turn off your Num Lock and reboot. VoilÃÂ !
doesn't work in 18.04
â equitharn
May 2 at 14:38
add a comment |Â
up vote
6
down vote
up vote
6
down vote
I have done this, and it worked for me. First, make sure you have universe repository added.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
sudo apt-get update
sudo apt-get install numlockx
Now that numlockx is installed, create a file named Default in /etc/X11/ with these contents:
if [ -x /usr/bin/X11/numlockx ]; then
/usr/bin/X11/numlockx on
fi
exit 0
Turn off your Num Lock and reboot. VoilÃÂ !
I have done this, and it worked for me. First, make sure you have universe repository added.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
sudo apt-get update
sudo apt-get install numlockx
Now that numlockx is installed, create a file named Default in /etc/X11/ with these contents:
if [ -x /usr/bin/X11/numlockx ]; then
/usr/bin/X11/numlockx on
fi
exit 0
Turn off your Num Lock and reboot. VoilÃÂ !
edited Jun 25 '12 at 8:54
answered Jun 25 '12 at 8:42
Mitchâ¦
81.1k14165226
81.1k14165226
doesn't work in 18.04
â equitharn
May 2 at 14:38
add a comment |Â
doesn't work in 18.04
â equitharn
May 2 at 14:38
doesn't work in 18.04
â equitharn
May 2 at 14:38
doesn't work in 18.04
â equitharn
May 2 at 14:38
add a comment |Â
up vote
4
down vote
Xubuntu specific.
Versions from 14.10 include a pkexec mousepad action.
Follow previous answers to install numlockx
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf as root
Alt+F2 then
pkexec mousepad /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Add
greeter-setup-script=/usr/bin/numlockx on
then save.
add a comment |Â
up vote
4
down vote
Xubuntu specific.
Versions from 14.10 include a pkexec mousepad action.
Follow previous answers to install numlockx
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf as root
Alt+F2 then
pkexec mousepad /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Add
greeter-setup-script=/usr/bin/numlockx on
then save.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Xubuntu specific.
Versions from 14.10 include a pkexec mousepad action.
Follow previous answers to install numlockx
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf as root
Alt+F2 then
pkexec mousepad /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Add
greeter-setup-script=/usr/bin/numlockx on
then save.
Xubuntu specific.
Versions from 14.10 include a pkexec mousepad action.
Follow previous answers to install numlockx
Edit /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf as root
Alt+F2 then
pkexec mousepad /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Add
greeter-setup-script=/usr/bin/numlockx on
then save.
answered Feb 22 '15 at 15:31
23 93 26 35 19 57 3 89
4,98512136
4,98512136
add a comment |Â
add a comment |Â
up vote
2
down vote
Most BIOSes allow this to be enabled. You can check your BIOS for this feature.
OR
Go to : System Settings -> Keyboard Layout -> Options -> Miscellaneous compatibility options
Check "Default numeric keypad keys"
Sources : https://help.ubuntu.com/community/NumLock
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
add a comment |Â
up vote
2
down vote
Most BIOSes allow this to be enabled. You can check your BIOS for this feature.
OR
Go to : System Settings -> Keyboard Layout -> Options -> Miscellaneous compatibility options
Check "Default numeric keypad keys"
Sources : https://help.ubuntu.com/community/NumLock
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Most BIOSes allow this to be enabled. You can check your BIOS for this feature.
OR
Go to : System Settings -> Keyboard Layout -> Options -> Miscellaneous compatibility options
Check "Default numeric keypad keys"
Sources : https://help.ubuntu.com/community/NumLock
Most BIOSes allow this to be enabled. You can check your BIOS for this feature.
OR
Go to : System Settings -> Keyboard Layout -> Options -> Miscellaneous compatibility options
Check "Default numeric keypad keys"
Sources : https://help.ubuntu.com/community/NumLock
answered Feb 11 '12 at 6:11
Vibhav Pant
2,88311215
2,88311215
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
add a comment |Â
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
1
1
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
I gave up...thanks
â ì ìÂÂ민
Feb 12 '12 at 1:17
add a comment |Â
up vote
1
down vote
Here is a little bash script which takes care of everything in an automated way:
#!/usr/bin/env bash
FILE='/etc/lightdm/lightdm.conf'
KEYVALUE='greeter-setup-script=/usr/bin/numlockx on'
sudo apt-get --yes install numlockx
grep --quiet "$KEYVALUE" "$FILE" || echo "$KEYVALUE" | sudo tee --append "$FILE"
Do not forget to first make your bash script executable with chmod +x scriptname, then execute it with ./scriptname.
add a comment |Â
up vote
1
down vote
Here is a little bash script which takes care of everything in an automated way:
#!/usr/bin/env bash
FILE='/etc/lightdm/lightdm.conf'
KEYVALUE='greeter-setup-script=/usr/bin/numlockx on'
sudo apt-get --yes install numlockx
grep --quiet "$KEYVALUE" "$FILE" || echo "$KEYVALUE" | sudo tee --append "$FILE"
Do not forget to first make your bash script executable with chmod +x scriptname, then execute it with ./scriptname.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Here is a little bash script which takes care of everything in an automated way:
#!/usr/bin/env bash
FILE='/etc/lightdm/lightdm.conf'
KEYVALUE='greeter-setup-script=/usr/bin/numlockx on'
sudo apt-get --yes install numlockx
grep --quiet "$KEYVALUE" "$FILE" || echo "$KEYVALUE" | sudo tee --append "$FILE"
Do not forget to first make your bash script executable with chmod +x scriptname, then execute it with ./scriptname.
Here is a little bash script which takes care of everything in an automated way:
#!/usr/bin/env bash
FILE='/etc/lightdm/lightdm.conf'
KEYVALUE='greeter-setup-script=/usr/bin/numlockx on'
sudo apt-get --yes install numlockx
grep --quiet "$KEYVALUE" "$FILE" || echo "$KEYVALUE" | sudo tee --append "$FILE"
Do not forget to first make your bash script executable with chmod +x scriptname, then execute it with ./scriptname.
edited Jun 8 '17 at 7:08
answered May 9 '14 at 17:01
Serge Stroobandt
1,8571732
1,8571732
add a comment |Â
add a comment |Â
protected by Community⦠Feb 16 '14 at 9:28
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
is it during login screen on lightdm or after logging in under unity? cause i know solution to both
â sarveshlad
May 2 '12 at 17:11
1
From darryn.ten -- NOT an exact duplicate, as I need numlock on BEFORE I login not after.
â Jjed
Jul 24 '12 at 21:58