GDM3 Enable NumLock on boot, before login

Everything about X, Gnome, KDE, ... and everything running on it

GDM3 Enable NumLock on boot, before login

Postby ponasm » 2018-07-21 08:51

Hey. I have had trouble trying to enable NumLock on boot.
I use Gnome Display Manager. I have numlockx installed and tried placing
Code: Select all
/usr/bin/numlockx on
in /etc/rc.local (which resulted in error opening display. Then I tried placing it in /etc/gdm3/Init/Default, just to find out it doesn't even get executed at boot. After trying few more things I finally came up with the solution: I installed lightdm and placed
Code: Select all
greeter-setup-script=/usr/bin/numlockx on
in /usr/share/lightdm/lightdm.conf.d/01_debian.conf. I finally got my numlock enabled on boot, but the lightdm greeter is horrible and would like to get it working on GDM.
Ṳ̴̰̮̗͘ͅͅN̡̟̮̬̬̞͚̘̗̲̯̙̻͘Ì̷̧̡͙̪̘̮̬̟̝̝͡Ç̸̬͈̰̣͉͇̥̮̖̖̦͉͡͡ͅÓ̸̱̝̪͚͕͔͍̺̣̟͍̩̫͍͡͠D̨̡̧͕̲̻̝͇̣̘̻̣͔͢͡E̵̯͈̦̫̕̕͟͠4̴̦̙̣̮̦̖͢͟L̴̨͈̫͉̞͚͓̮͔̞͙̟͚͖͜͢͡I͏͜͏̷̣̻̜̘͙̻̘̟̝̥̣̦̣̥̟̙ͅF͏͏̸͉͔̥̲̺̮̟̩͕͍E͏̲̺̜̘̳̮̥̯̺̲̹̩̳̰͍̱͔̀̀
ponasm
 
Posts: 4
Joined: 2018-07-21 08:36

Re: GDM3 Enable NumLock on boot, before login

Postby Head_on_a_Stick » 2018-07-21 11:31

The ArchWiki suggests ~/.xprofile but I think ~/.profile is the one for Debian:

https://wiki.archlinux.org/index.php/Ac ... up#Console

That won't work before login though, for obvious reasons, so perhaps try https://wiki.archlinux.org/index.php/Activating_Numlock_on_Bootup#Console?

Disclaimer: all untested, I don't run a display manager :)
E Pluribus Unix
User avatar
Head_on_a_Stick
 
Posts: 7778
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GDM3 Enable NumLock on boot, before login

Postby ponasm » 2018-07-21 12:42

Thanks. I created a service and did some tests to see if it gets executed before login, and yes it does, but my numlock for some reason is still disabled. I also tried changing this piece of code:
Code: Select all
for tty in /dev/tty{1..6}
do
    /usr/bin/setleds -D +num < "$tty";
done

to
Code: Select all
/usr/bin/numlockx on

(which worked on lightdm conf.d file)
but it also doesn't seem to work.
Ṳ̴̰̮̗͘ͅͅN̡̟̮̬̬̞͚̘̗̲̯̙̻͘Ì̷̧̡͙̪̘̮̬̟̝̝͡Ç̸̬͈̰̣͉͇̥̮̖̖̦͉͡͡ͅÓ̸̱̝̪͚͕͔͍̺̣̟͍̩̫͍͡͠D̨̡̧͕̲̻̝͇̣̘̻̣͔͢͡E̵̯͈̦̫̕̕͟͠4̴̦̙̣̮̦̖͢͟L̴̨͈̫͉̞͚͓̮͔̞͙̟͚͖͜͢͡I͏͜͏̷̣̻̜̘͙̻̘̟̝̥̣̦̣̥̟̙ͅF͏͏̸͉͔̥̲̺̮̟̩͕͍E͏̲̺̜̘̳̮̥̯̺̲̹̩̳̰͍̱͔̀̀
ponasm
 
Posts: 4
Joined: 2018-07-21 08:36

Re: GDM3 Enable NumLock on boot, before login

Postby Head_on_a_Stick » 2018-07-21 19:34

E Pluribus Unix
User avatar
Head_on_a_Stick
 
Posts: 7778
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable