You are not logged in.

#1 2019-08-19 01:34:21

quimkaos
Member
Registered: 2014-09-27
Posts: 59

[SOLVED] Numlock not on in GDM

As the title says I'm having trouble enabling numlock on start up, specifically in GDM.
I followed the various options in the wiki (Activating Numlock on Bootup and GNOME/Tips and tricks pages) and searched forum and the net, but nothing works.
Well, it works, just not with GDM. It works on TTY and in Lightdm. For TTY, both the configuration described in the wiki and the AUR systemd-numlockontty work. For Lightdm is as simple as editing lightdm.conf.
while booting the numlock led is on, but as soon as GDM loads the led goes off.
i tried editing ~/.xprofile and adding:

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

i tried:

gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

i tried

sudo -i
su gdm -s /bin/bash
gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

tho the wiki says GDM does not execute scripts in /etc/gdm/Init anymore i added:

which numlockx >/dev/null && numlockx on

does anyone knows any fix/workaround?
thanks in advance

Last edited by quimkaos (2019-08-31 17:55:38)

Offline

#2 2019-08-31 17:54:33

quimkaos
Member
Registered: 2014-09-27
Posts: 59

Re: [SOLVED] Numlock not on in GDM

finally i found something that works:

sudo sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

this is a derivation from posts from other forums:
https://askubuntu.com/questions/977903/ … 10-wayland
and
https://unix.stackexchange.com/question … es-gnome-3

i'm not absolutely sure about the one liner but it's working for me...
for what i understand i have to sudo then sudo as user gdm then set the options with gsettings...
any input from another experienced user is appreciated.

Offline

#3 2019-09-01 20:47:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Numlock not on in GDM

The first sudo doesn't make any sense, the rest does (other than the fact that dbus-launch will leave a lingering DBUS session, for this purpose it will not really matter, but more proper for one shot type invocations like these would be to use dbus-run-session instead of dbus-launch)

Offline

#4 2019-09-02 11:25:58

quimkaos
Member
Registered: 2014-09-27
Posts: 59

Re: [SOLVED] Numlock not on in GDM

thank you v1del i'll look in to it

Offline

#5 2019-09-06 22:00:33

quimkaos
Member
Registered: 2014-09-27
Posts: 59

Re: [SOLVED] Numlock not on in GDM

Sory for bumping but the suggestion made by V1del works:

sudo -u gdm dbus-run-session gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

I'm converting all my machines from Arch based to Arch and just did this configuration.
thanks again!

Last edited by quimkaos (2019-09-06 22:31:48)

Offline

Board footer

Powered by FluxBB