[LightDM] How to adjust display brightness using keyboard keys?

Jonathan dev at puppeq.com
Wed Jul 31 11:05:47 PDT 2013


I have tried everything I can think of to adjust display brightness via the keyboard keys at the lightdm unity-greeter login screen.

Once you login to an Ubuntu desktop session the keys work fine. However, at the login screen and when you are logged in to a non-Ubuntu desktop session, e.g. xfreerdp then the brightness keys do not work.

I have verified that I can change the brightness by doing ctrl+alt+f1 at the lightdm login screen and issuing either of these commands:

sudo /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 150

echo 150 | sudo tee /sys/class/backlight/radeon*/brightness

The question is how to I execute these commands from the brightness keys or any other combination of keys if that makes it possible?

I have tried to use xbindkeys and a .xbindkeyrc file with the following contents:

/usr/bin/pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 150
c:68

/usr/bin/pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 255
c:69

This works, but again you have to be logged in to an Ubuntu desktop session!

I have tried to use an upstart job to start xbindkeys.

I have tried to place the .xbindkeysrc file in /var/lib/lightdm.

Nothing works and I have no other options right now other than to tell my users...sorry but you can't change display brightness or if you need to I'll have to ssh into your machine and run the command above :(

Something this simple must be possible I just don't know how.


More information about the LightDM mailing list