Can't xset on boot


#1

I have a crappy backlit keyboard that lights up by having the scroll lock led on, so I’m using the following:

xset led named "Scroll Lock"

but it doesn’t work when I put it on ~/.xinitrc or set it as a bash script to run on boot on kde. What do I do?


(Benjamín Albiñana) #2

does it work when in X, launching from a console?
If you are using a graphical login manager (kdm, xdm…) try to link .xsession to your .xinitrc.


#3

hmm, it works when I run it with kde booted, and I use sddm. gonna try the .xsession thing later, thanks for the suggestion.


#4

Probably because sddm doesn’t care about your ~/.xinitrc

Take a look at /usr/share/sddm/scripts/Xsession

# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for i in /etc/X11/xinit/xinitrc.d/* ; do
  if [ -x "$i" ]; then
    . "$i"
  fi
  done
fi

You can put your scripts in /etc/X11/xinit/xinitrc.d

It works with lightdm too! :wink:


#5
$ cat /etc/sddm.conf

[General]
# Halt command
HaltCommand=/usr/bin/loginctl poweroff

# Reboot command
RebootCommand=/usr/bin/loginctl reboot

:non-potable_water: Should be changed.