However, even going down to looking at the scancodes, I couldn't detect any status changes in the switch when pressed. I initially thought I was going to have to hack a driver out of a generic USB mouse driver, which as I don't know C would have been hard.

Fortunately, Google threw up links to this page, which is a perl module to interface with the button. Obviously, this means that somewhere that I was missing, the kernel was detecting the button presses. Rather than re-inventing the wheel, it was obvious that I should use this module to do my work.

On my Ubuntu 8.10 (Intrepid Ibex) machine, I first had to install libinline-perl (and libyaml-perl to stop some CPAN warnings), and then the module in CPAN.

$ sudo aptitude install libinline-perl libyaml-perl

$ sudo cpan
### If this is your first use of CPAN, you'll need to let it run it's configuration process.
### Accepting defaults for this should be fine.
install Device::USB::PanicButton

Now we're ready to use our button via the perl script on the PanicButton.pm pagelinked to earlier.

I got the "big red button" from Dream Cheeky.
lsusb says: Bus 004 Device 004: ID 1d34:000d
With the mentioned lib from freshmeat it does not work, not after changing the vendor_id and product_id to the given values.
usb_set_configuration(pbdev, 1) fails -> busy
usb_claim_interface(pbdev, 0) fails -> nomem

Anyone knows what the difference is and how to use this button?

It appears under /dev/usb/hiddev1, but nothing to see on a cat and pressing the button..

I've been trying to get this implementation to work for some time, and keep getting a segmentation fault every time when I get to the 'use Device::USB::PanicButton;' I also get the error message that I must be running as root if i trying to kick off the script when not sudo'ed in. Has anyone run into this issue before? Are these two related? I appreciate the support!

At work I have to, frequently but irregularly, run a script that releases newly committed code from our developers to our testing platform. I've hooked this button up so that it runs that bash script, and now it's no effort whatsoever for me to do so, and makes me giggle with childlike glee each and every time.