2

This question already has an answer here:

I have a black keyboard with characters which are completely invisible until the keyboard light comes on... Which it doesn't. I've made a script to toggle the light:

#!/bin/bash
FLAGS=$(xset -q | awk 'NR==2' | awk '{ print $10 }')
if [ "$FLAGS" = 00000000 ] || [ "$FLAGS" = 00000002 ]; then
    xset led 3
else
    xset -led 3
fi

My problem is that I can't find where to put it to make it work at the login prompt (I think I am using GDM.) So every time I boot, I log in blind and I can only turn the lights on once logged in :(

So, questions!

xset is an X11 command? Will it even run at the login prompt? I'm guessing it has to wait until X11 starts?

Where do I put it?

I've tried putting it in: /etc/X11/Xsession.d /etc/init.d

Neither seem to work.

Thanks!

Beth

marked as duplicate by Mark Kirby, Community Jan 7 '16 at 9:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Wait, found it! Sry... :$

How to light up back-lit keyboard?

for those who land here because they also want the keyboard to light up BEFORE the login screen:

Finally found an answer, at least for Ubuntu 14.04

as for how to get the keyboard to light up before the login screen:

Edit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

sudo nano /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

Add the line:

greeter-setup-script= xset led 3

Not the answer you're looking for? Browse other questions tagged or ask your own question.