On Fri, Jan 09, 2009 at 05:28:40PM +0100, Andrea Momesso wrote: > On Wed, Jan 7, 2009 at 9:47 PM, Paul Hartman > wrote: > > On Wed, Jan 7, 2009 at 8:29 AM, Momesso Andrea wrote: > >> I'd like to make the file /sys/class/backlight/asus-laptop/brightness > >> writeable for users, so that I don't need to be root anymore to change > >> the brightness. > >> > >> Of course I can chown or chmod ot in local.start but I'm asking if there > >> is a cleaner way. > > > > I guess you need to use udevinfo to get the important information > > about /sys/class/backlight/asus-laptop/brightness and then write up a > > rule, slap it into a file in /etc/udev/rules.d/ and enjoy your new > > permissions. :) I don't have that device on my system so I can't > > really suggest anything more specific. > > > > Here's a udev rules HOWTO that might help: > > > > http://www.reactivated.net/writing_udev_rules.html > > > > (specifically "Controlling permissions and ownership") > > > > Good luck :) > > Paul > > > > > > It looks like I cannot simply write a rule to change that permission... > After experiencing some failures I guess that udev rules can change > permissions on /dev/ files, but not on /sys/ files... > > This is my case: > > # udevadm info -a -p /sys/class/backlight/asus-laptop/ > > looking at device '/class/backlight/asus-laptop': > KERNEL=="asus-laptop" > SUBSYSTEM=="backlight" > DRIVER=="" > ATTR{bl_power}=="0" > ATTR{brightness}=="5" > ATTR{actual_brightness}=="5" > ATTR{max_brightness}=="15" > > And this is the rule I added in /etc/udev/rules.d/10-local.rules > > KERNEL=="asus-laptop", SUBSYSTEM=="backlight", GROUP="video", MODE="0660" > > After a reboot I still get this: > > # ls -la /sys/class/backlight/asus-laptop > total 0 > drwxr-xr-x 3 root root 0 2009-01-09 15:18 . > drwxr-xr-x 3 root root 0 2009-01-09 15:18 .. > -r--r--r-- 1 root root 4096 2009-01-09 15:18 actual_brightness > -rw-r--r-- 1 root root 4096 2009-01-09 15:19 bl_power > -rw-r--r-- 1 root root 4096 2009-01-09 17:02 brightness > -r--r--r-- 1 root root 4096 2009-01-09 15:18 max_brightness > drwxr-xr-x 2 root root 0 2009-01-09 15:19 power > lrwxrwxrwx 1 root root 0 2009-01-09 15:18 subsystem -> ../../backlight > -rw-r--r-- 1 root root 4096 2009-01-09 15:18 uevent > > Googling a bit I found some solutions [1] [2], but all of them are > changing the permissions at every > boot. It works, but it looks to me a bit unclean... > [1] http://wiki.laptop.org/go/Xfce_keybindings#Adjust_screen_brightness_buttons > [2] http://www.thinkwiki.org/wiki/Automatically_reduce_brightness > Hmmm... Having not recived any answers might mean that my suspects are right and there is no way to create an udev rule for my scope. I think I will have to change those permissions manually at boot time Thanks anyway for help -- Momesso (TopperH) Andrea http://topperh.blogspot.com Jabber: topper_harley@jabber.org ICQ: 224179391