Swirly Mein Kopf

Wednesday, November 16. 2005

Lightweight Replacement for 111 lines of code

Digital World

Chris Lamb has announced his gaim plugin "gaim-lightthink" both on his blog and on the thinkpad-linux mailing list. His plugin does basically the same thing as my gaim-thinklight plugin. I was a bit surprised to read that his plugin is supossed to be a lightweight replacement for mine, as he says on the code page.

As he has not yet replied to my mail, I can only guess what he means - it's probably not lines of code, I count 111 in mine and 128 in his. So I hoped he had found a better solution for letting the user write the /proc/acpi/ibm/light file, but he just requires the user to change permissions himself (on every boot, that is), while I install a suid program that does nothing but lets anyone write one of two strings to that file. Also, I think constructing a long line like "echo on > /proc/acpi/ibm/light; sleep .400; echo off > /proc/acpi/ibm/light; sleep .400;...; &" is not very lightweight compared to call the light controlling program directly from gaim, using gtk's event loop for the delays. But maybe I'm missing something...

BTW, I'm still looking for a sane way to let my plugin write to that /proc file. There should be a system wide list of files and permissions for virtual files (/proc, /sys), where packages like gaim-thinklight can register their needs. This file should then be worked off upon boot (or better, upon mounting of the respective file system).

Trackbacks


No Trackbacks

Comments

Display comments as (Linear | Threaded)

Seems like that would be something udev would be tailored to. Since it creates files in /dev and manages their permissions at boot, perhaps it could be extended to manage /proc and /sys permissions too?
#1 Stephen Touset (Homepage) on 2005-11-16 20:44 (Reply)

Add Comment



To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 
Nach oben