light icon indicating copy to clipboard operation
light copied to clipboard

compiling with --with-udev does not allow use without 'sudo'

Open ldartez opened this issue 5 years ago • 3 comments

compiled light using '--with-udev' as explained in the rules in order to be able to use the program without requiring sudo. the program compiles without errors but doesn't work without using sudo (it continues to work with sudo, however).

additionally, the udev rules file was placed in /usr/local/lib/udev/rules.d/ instead of /usr/lib/udev/rules.d/ as expected. Moving the rules file to the expected udev folder & rebooting still does not result with the proper behavior. I'm happy to provide more info to help debug

ldartez avatar Feb 03 '20 06:02 ldartez

If you're building for Debian, there is a slight change that you need to ensure makes it into the udev rules:

$ sudo sed -i 's/^ACTION=="add"/ACTION=="change"/g' /usr/lib/udev/rules.d/90-backlight.rules
$ cat /usr/lib/udev/rules.d/90-backlight.rules
ACTION=="change", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="change", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="change", SUBSYSTEM=="leds", RUN+="/bin/chgrp video /sys/class/leds/%k/brightness"
ACTION=="change", SUBSYSTEM=="leds", RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness
$ sudo udevadm control --reload-rules && sudo udevadm trigger

daryltucker avatar Mar 21 '21 06:03 daryltucker

built with arch, same results here as Idartez

imaducklol avatar Apr 14 '21 08:04 imaducklol

well, nvm actually. rebuilding it then rebooting fixed it for me. apologies.

imaducklol avatar Apr 14 '21 08:04 imaducklol