2

I have a Kopete plug-in that tries to blink my Thinkpad light when I have a new incoming message. To accomplish this it uses a /proc virtual file provided by the thinkpad-acpi kernel module, situated in /proc/acpi/ibm/light. When I try to echo "on" or "off" in that file as a superuser, the light becomes on or off as expected, but Kopete is always executed by unprivileged users. Now, I can chmod that file but upon reboot everything is reset to the original state in /proc (as it should be).

I could make an init script that changes permission on that file on boot, but I'm asking if this is the way to go, or there are most proper ways to do this (perhaps through udev or sysctl.conf?)

Thanks.

1 Answer 1

2

The easy way to do it would be to set up a cronjob.

In a shell, type: sudo crontab -e to edit root's crontab.

Then add a line saying @reboot chmod <your-chmod-options-here> /proc/acpi/ibm/light.

Done! On reboot, your chmod command will be run.

2
  • It's a quick and easy solution, I like it! I'm just wondering if there is a possibility that the cron manager (vixie-cron in my case) delays the execution of @reboot cron jobs beyond its start time at boot. This would be quite strange, and I don't think this happens, but in this case there is a chance that Kopete could start before the cron job.
    – dappiu
    Commented Jul 16, 2014 at 18:37
  • @dappiu I don't think that will be a problem.
    – BenjiWiebe
    Commented Jul 16, 2014 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .