X10 mouseremote / sendxevent / lirc
What's this page about?
Just some tips and info I collected to make my infrared remote work with lirc
to control mplayer, and also how to use my X10 mouseremote to control both the
mouse in X, and mplayer too (harder).
It also describes sendxevent to control any X app from the command line, and
the patched lircd to generate fake IR signals from the command line in order
to control lirc aware applications
What I used
This is a collection of programs and patches that I have found on the net
to use both
My main goal was to control mplayer, which can receive commands from lirc,
but from from a fifo or from the command line like xmms can (it can however
receive X events, which is where sendxevent comes in handy)
The sites I went to were:
I am currently using a gruesome hack (a patched lircd from Karl Bongers) where
(Eh, I warned you it was ugly)
If you don't have an infrared remote, and don't care about keeping your config
in one place, then you should probably just use
Tod Schmidt's patched sendxevent and control
mplayer (or whatever) like so: sendxevent "Key space MPlayer"
- multimoused reads from the serial port
- it generates mouse events into the /dev/mumse fifo
- it separates and sends keypresses (like DVD+1) to /dev/x10fifo
- MouseRemote reads from the fifo and executes commands as directed in
- MouseRemote.conf calls irsend, like so
irsend SEND_RELAY "0000000000001005 00 5" Hauppauge, which
tricks the patched lircd to think I used my IR remote to send this code
- mplayer, running in lirc mode, parses ~/.lircrc, receives the fake IR code, and
decides what to do with it
Configuration / Files
I am including my configuration files here and
all the files can be browsed here or downloaded in this
I was not able to use my X10 mouse in the PS2 port, so I used a serial port
I have the following in rc.local to launch the daemons:
mkfifo -m 666 /dev/mumse
mkfifo -m 666 /dev/x10fifo
/usr/local/sbin/multimoused -SX10 /dev/ttyS0
And here is the relevant portion of my XF86Config (you could also use
gpm or multimoused to read from your real mouse, and multiplex the event
into one fake mouse device than X can read from)
Identifier "Real Mouse"
Option "Device" "/dev/psaux"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Identifier "X10 Mouse"
Option "Device" "/dev/mumse"
Option "Protocol" "MouseSystems"
InputDevice "Generic Keyboard" "CoreKeyboard"
InputDevice "X10 Mouse" "CorePointer"
InputDevice "Real Mouse" "AlwaysCore"
Link to Home Page
2004/03/24 (23:55): Version 1.0. Initial version