Added udev rule and init.d script for allowing users of video group to control backlight

This commit is contained in:
rexy712
2018-01-12 17:59:12 -08:00
parent 3cb653fdd2
commit 33cf717cd3
5 changed files with 26 additions and 40 deletions

3
rules/91-backlight.rules Normal file
View File

@@ -0,0 +1,3 @@
SUBSYSTEM=="backlight", ACTION=="add", \
RUN+="/bin/chgrp video %S%p/brightness", \
RUN+="/bin/chmod g+w %S%p/brightness"

13
rules/backlight Executable file
View File

@@ -0,0 +1,13 @@
#!/sbin/openrc-run
#Copyright (C) 2018 rexy712
start() {
ebegin "Forcing intel_backlight to work correctly"
/bin/chgrp video /sys/class/backlight/intel_backlight/brightness
/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness
eend $?
}
stop() {
eend ${ret}
}