I have a laptop with intel graphics. The
Fn key brightness control only works when the user is logged into the desktop environment. It never works in the login screen or in tty sessions. I have to manually execute command as root to change brightness in tty sessions which is kinda pain, considering brightness wont persist on reboot.
I can change brightness by writing value to
/sys/class/backlight/intel_backlight/brightness which requires root permissions. I have a bash script that increases or decreases brightness by 10percent based on argument it receives.
Now I want to change brightness whenever I press some key combination by executing this script in all runlevels. How can I do that, in both init and systemd systems? I need the solution irrelevant to the Desktop Environment. I use debian wheezy.
LCtrl + LShift + LArrow --> decrease brightness. LCtrl + LShift + RArrow --> increase brightness.