lircmd - Translate infrared signals into mouse events.
Contents
Bugs
Since the device name used when registrating the --uinput device is fixed, only one instance of lircmd
using this option can run on a given system.
The socket protocol is a documentation-wise mess.
Daemons
lircmd is a daemon. It should be started in some system-dependent init script. Besides the systemd
setup which is installed by default there are also example scripts for other distros and init systems in
the contrib directory. lircmd has to be started after lircd as it connects to the socket lircd provides.
Description
lircmd reads decoded buttonpress events from a lircd(8) output socket and converts them to mouse events. These events are made available either on the lircmd output socket (by default /var/run/lirc/lircmd ) or, using the --uinput option, on a /dev/input device like /dev/input/event12 . This daemon can simulate a MouseSystems, IntelliMouse or IMPS/2 type mouse. The function depends on a configuration file, by default /etc/lirc/lircmd.conf . This file determines which button from which remote causes a mouse move or a mouse button click. Special button which activates or deactivates the mouse mode can also be defined. The normal usage is to configure X11 to use the events produced by lircmd as an input source. See SEE ALSO. Using the --uinput option the user device created by the kernel has a dynamic name which typically changes after a reboot. The lirc distribution contains a udev rule which, if installed, creates a fixed link named /dev/lircmd which always can be used. By default, using the --uinput option requires lircmd to run as root since the /dev/uinput device can be accessed only by root. The lirc distribution contains example udev rules and lircd-setup(8) configurations which can be used to make the device accessible by other users. In this way, lircmd can be run as a regular user.
Files
lircmd will use syslogd to output error messages. It depends on your system configuration where they will
show up.
The options file is by default /etc/lirc/lirc_options.conf; lircmd handles the values under the [lircmd]
section in this file. The location can be changed using the -O/--options-file command-line option or
using the environment variable LIRC_OPTIONS_PATH. The values here are used as defaults for any option
not present on command line.
Name
lircmd - Translate infrared signals into mouse events.
Options
-h--help
Display help message.
-v--version
Display version.
-n--nodaemon
Don't fork to background.
-s--socket <socketpath>
Use alternate lircd socket path (the lircmd input source). Defaults to the output key in the
[lircd] section of the lirc_options.conf config file, falling back to /var/run/lirc/lircd.
-O--options-file=file
Alternative default options file, usually defaults to /etc/lirc/lirc_options.conf.
-u--uinput
On Linux systems the --uinput option will enable automatic generation of Linux input events.
lircmd will open /dev/input/uinput and inject the simulated mouse events into the Linux kernel
rather than creating the /dev/lircm device. The kernel makes these events available to other
applications on a /dev/input device, just like any other kernel input device.
-D--loglevel=[level]
Determine the amount of logging information. [level] can be a symbolic syslog level:
'error','warning, 'info', 'notice' or 'debug'. lircd also defines three additional levels
'trace', 'trace1' and 'trace2' which gives even more messages ('trace2' bringing the most).
However, in the log these messages are marked as 'debug'.
See Also
http://lirc.org/html/configure.html#lircmd.conflircd(8)lircd-setup(8) lircmd 0.10.2 Last change: Aug 2016 LIRCMD(8)
Socket Protocol
The socket protocol contains undocumented parts. The data on the output socket is
MouseSystems
5 byte packets:
• Byte 1: Button information.
• Byte 2: X-axis change.
• Byte 3: Y-axis change.
• Byte 4 and 5: 0.
IMPS/2
4 byte packets. Please refer to the lircmd source code for details.
IntelliMouse
4 byte packets. Please refer to the lircmd source code for details.
Synopsis
lircmd [options] [config-file]
