====== G15 Pidgin Script ====== ===== Description ===== I call a Logitech G15 my own and I want to have a little plugin to see all incoming messages from my buddies. Piding offers a nice interface with DBus and writing a Python script isn't that though so here is my solution. ===== Preparations ===== You need to have G15Daemon and the G15Tools with g15composer installed. Using Debian (lenny/testing) this shouldn't be a hindrance. Install the following packages: aptitude install g15daemon g15composer pyhton-dbus DBus should be installed already. When you have basic Debian installation. {{:code:python:keyboard.png?300|Sample Image}} ===== Code ===== ^Download |{{:code:python:g15pidgin.py|g15pidgin.py}} | ===== Usage ===== You need to have g15deamon and g15composer running. Start the G15 Daemon: invoke-rc.d g15daemon start Run g15composer: g15composer ~/.g15fifo-$(LOGNAME) Now you have to wait that someone sends you a message. Start the g15pidgin script: # if script has executable bit set (chmod +x g15pidgin.py) ./g15pidgin.py & # if not set as executable python g15pidgin.py & It could happen if you close the terminal where you have started the script, that the script terminates. To prevent this simply run one of the above commands to start the script, but put **nohup** before the command to ignore the signal. nohup ./g15pidgin.py & ===== Known Bugs ====== - Fixed: When receiving a Unicode or malformed message, the message queue gets messed up a bit. after four valid messages it should get back to normal - Catch SIGHUP ~~DISCUSSION~~