From: Andrew C. <and...@gm...> - 2006-07-10 17:20:20
|
I have a Philips MCE remote with a USB receiver that I have working on LIRC 0.8.0 on Ubuntu Dapper. (I installed from source from the instructions on http://www.mythtv.org/wiki/index.php/MCE_Remote.) I'm having a problem with unplugging the receiver. This is my laptop, so I'm fairly frequently unplugging it. When I plug it back in, I can rerun lircd and irexec to get it working again, but is there a way to get it to start working automatically when plugging it in (like e.g. my USB mouse)? Thanks for LIRC and the help, Andrew |
From: Michael M. <mic...@gm...> - 2006-07-10 20:11:47
|
Andrew Conkling wrote: > I have a Philips MCE remote with a USB receiver that I have working on > LIRC 0.8.0 on Ubuntu Dapper. (I installed from source from the > instructions on http://www.mythtv.org/wiki/index.php/MCE_Remote.) > > I'm having a problem with unplugging the receiver. This is my laptop, > so I'm fairly frequently unplugging it. When I plug it back in, I can > rerun lircd and irexec to get it working again, but is there a way to > get it to start working automatically when plugging it in (like e.g. > my USB mouse)? Perhaps you could use udev to (re)start lircd and irexec. Unplug the device, run udevinfo -d >before Plug the device in, run udevinfo -d >after diff -u before after You should get a line with a "+" prepended - that's your device. The left column before the "=" (without the "+") is the udev device path. You can see all the device attributes with: udevinfo -a -p your_udev_device_path Now go to /etc/udev/rules.d and look at the files there, e.g. 85-hdparm.rules: ACTION=="add", SUBSYSTEM=="block", KERNEL=="hd[a-z]", \ RUN+="/lib/udev/hdparm" The first line is used to search for a specific device/action, and the RUN entry tells udev what it should start when the rule matches. Create a new file like 71-local.rules (the suffix has to be ".rules") and add two lines similar to that 85-hdparm.rules, but which matches the attributes of your device. Restart udev with "/etc/init.d/udev restart" afterwards. For a complete guide see <http://www.reactivated.net/writing_udev_rules.html>, and/or see "man udev". Regards... Michael |
From: Andrew C. <and...@gm...> - 2006-07-11 15:05:20
|
On 7/10/06, Michael Mauch <mic...@gm...> wrote: > Perhaps you could use udev to (re)start lircd and irexec. Hi Michael, I haven't had a chance to try this yet, but it looks promising. I just wanted to let you know that I appreciate your detailed response. Cheers! Andrew |