You are not logged in.
Hi, I'm trying to set up the led-notification plugin for pidgin in my box, but I don't know how to control my LEDs with "boolean" files.
The plugin works by setting a given file to 0 or 1 to turn the LED on or off, and the file defaults to /proc/acpi/asus/mled.
Problem is I don't have /proc/acpi/asus directory (makes sense, I don't have an ASUS motherboard). I've seen a solved post [1] in the forum but modprobe "asus-acpi" won't work for me. Either will xset, ledcontrol etc, because I need to control the LEDs via file.
I imagine this will be different for each hardware, but I don't know how to find out.
[1] https://bbs.archlinux.org/viewtopic.php?id=37437
EDIT: I had wrongly said that the plugin was called "led-notifier".
Last edited by vitoreiji (2010-09-15 20:04:05)
Offline
On my keyboard
xset led 3
turns on my scrolllock led
and
xset -led 3
turns it off
Last edited by skunktrader (2010-09-15 18:24:26)
Offline
I don't think he wants to use xset though. What type of laptop do you have vitoreiji and which LEDs specifically are you trying to control?
Offline
I don't think he wants to use xset though. What type of laptop do you have vitoreiji and which LEDs specifically are you trying to control?
I have a Dell Vostro 1014, want to use the scroll lock led.
Thanks!
Offline
Can you give a little more context about what you're trying to do? The optimal choice in my opinion would be to use 'xset' as skunktrader pointed out.
Offline
Can you give a little more context about what you're trying to do? The optimal choice in my opinion would be to use 'xset' as skunktrader pointed out.
There is this pidgin plugin called led-notification (not led-notifier like I said before) that wil cause a led to flash when you get a new message. This plugin controls the led by writing 1 or 0 to a file, like
echo 1 > /proc/acpi/asus/mled
to turn it on (and 0 for off)
But I don't know where in my system I can find the file that controls the leds.
I thought I could write a fuse filesystem that uses xset or ledcontrol to do this, but it sounds a little bit overkill, it would be easier to write another plugin.
Thanks for your dedication!
Offline
You could write a script that watched a file in your local directory, then issue the appropriate xset commands when pidgin writes a 1 or a 0
Offline
Actually it looks like there is another plugin called Command-notification that you can use instead with 'xset'. http://guysoft.wordpress.com/2010/02/14 … w-message/
Try using this plugin manually, and if it works out you should consider taking the AUR package for led-notification and modifying it for command-notification!
EDIT: Added links.
Last edited by codycarey (2010-09-15 20:20:10)
Offline
I've modified this plugin a little, so that instead of writing to files, it runs scripts (defined by user, of course).
The script must be able to handle only one parameter that can be "0" or "1".
Can share my modified code if you want me to.
Offline
I've modified this plugin a little, so that instead of writing to files, it runs scripts (defined by user, of course).
The script must be able to handle only one parameter that can be "0" or "1".Can share my modified code if you want me to.
In that case the script could be something like:
#!/bin/bash
if test $1 -eq 0; then
xset -led named "Scroll Lock"
else
xset led named "Scroll Lock"
fi
Last edited by codycarey (2010-09-15 20:36:19)
Offline
http://paste.org/pastebin/view/22447
Here's the code.
The script, whose name the user himself has to enter, must be run with root privileges to be able to modify /proc, so you are to prepend it with sudo.
Don't forget to add it to the NOPASSWD list in /etc/sudoers.
Alternatively, you can just setuid it.
But remember: in both cases, you need to protect this script from unauthorized changing, because it is a potential security hole.
Last edited by hidefromkgb (2010-09-15 21:33:32)
Offline
Hey guys, thanks everybody for your help!
I installed command-notification here and it works, but not the way I imagined. It doesn't turn off the led when I focus/click/write in the conversation window.
I'll take a look at hidefromkgb's code later, but thank you again everyone!
Offline