Right now I am running a cooler Master keyboard on Kubuntu 16.04. At present I have to run

xset led 3 

in Konsole in order to turn the keyboard on, which is a PITA.

How can I instruct the system to light the keyboard at boot, particularly before and after the login screen?

  • I would put the command in /etc/rc.local but you can also use a cron job with @reboot. See: askubuntu.com/questions/228304/… Jan 7, 2018 at 19:31
  • Can I enter the command as is, or should I enter a pathway for an *.sh file?
    – Timbot2000
    Jan 7, 2018 at 20:12
  • You can enter the command as is. A *.sh (script) file is typically only used for multi-line commands. When using cron you must find out the directory name to prefix the command. ie use which xset returns: /usr/bin/xset which is the exact command format you need to use. The simpler method is just to put the command in /etc/rc.local rather than using cron. Jan 7, 2018 at 20:23
  • Sorry WinEunuuchs2Unix, entering it in the rc.local file failed to enact the command at startup. What do we try next?
    – Timbot2000
    Jan 8, 2018 at 2:49
  • Sorry the rc.local didn't work out. I've posted an answer which I hope does work. Jan 8, 2018 at 3:42

1 Answer 1


Using "Startup Applications" instead of /etc/rc.local

  • Select the first option on your Launcher called Dash. Then type "startup" and a screen similar to this will appear: Dash Startup applications.png

  • Select the option "Startup Applications" and a screen similar to this will appear: Startup Applications 2.png

  • Select Add and this screen will appear: Startup Applications 3.png

  • Make sure you enter the command as: /usr/bin/xset led 3

  • I entered the comment as: Ubuntu 16.04 regular crash, Compiz segfault, error 4 in i965_dri.so, Fresh install but you don't need to.


I can't test this on my system because the Laptop's built-in keyboard and wireless keyboard both light up automatically.

You can't put xrandr commands in /etc/rc.local because it runs before a user logs in. xrandr commands can only be used after the user logs on.

  • 1
    I can confirm, this actually works on Linux Mint 19.1
    – falconR
    Dec 27, 2018 at 23:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .