Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have developed a brightness indicator for unity in python. I change the brightness using the following system call:

echo 4 > /sys/class/backlight/acpi_video0/brightness  [value = 0 to 9]

Problem is this command needs root access. Because of brightness file's permission:

-rw-r--r-- 1 root root 4096 2012-04-23 17:36 /sys/class/backlight/acpi_video0/brightness

So i just change the file's permission to 775. It worked. But after reboot the file's permission change again. Now it can not be done because permission denied. How can i do this without root permission?

thanks in advance

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

One thing you can do is change the permissions in some sort of startup script, such as /etc/rc.local.

share|improve this answer
    
It's a way but looking for better solution. thanks for reply –  shantanu Apr 30 '12 at 19:41
1  
this answer has a sample rc.local script: askubuntu.com/questions/3841/… –  ImaginaryRobots Apr 30 '12 at 20:17
    
Pretty sure sysfs stuff's permissions are not persistent so there's not really any better way to do it. –  Ibrahim Jul 13 '12 at 22:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.