LIRCMD(8)
π LIRCMD β bestie edition π
okay so this is the <pink>lircmd</pink> manual page, from the System Administration Utilities corner of the world, and honestly? she's iconic. she translates infrared signals into mouse events. no cap. π¦
β¨ NAME β¨
lircmd β translate infrared signals into mouse events. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
lircmd [options] [config-file]
π DESCRIPTION π
okay so bestie, picture this: lircmd reads decoded buttonpress events from a lircd(8) output socket and converts them into mouse events. those events then get made available either on the lircmd output socket (by default /var/run/lirc/lircmd) or β and this is the glow-up β 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. and the way it works depends on a config file, which by default lives at /etc/lirc/lircmd.conf. that file is the main character fr β it determines which button from which remote causes a mouse move or a mouse button click. you can also define a special button that activates or deactivates the mouse mode. so many options, so much power. π
the normal usage is to configure X11 to use the events produced by lircmd as an input source. go look at SEE ALSO for that. iykyk. β¨
now, using the --uinput option, the user device created by the kernel has a dynamic name which typically changes after a reboot. annoying? yes. but the lirc distribution contains a udev rule which, if installed, creates a fixed link named /dev/lircmd which always can be used. slay. π«Ά
by default, using the --uinput option requires lircmd to run as root since the /dev/uinput device can be accessed only by root. but bestie, don't panic β 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. we love to see it. π
π OPTIONS π
-h,--helpβ display help message. bless. π-v,--versionβ display version.-n,--nodaemonβ don't fork to background. stay present. main character energy. β¨-s,--socket <socket path>β use an alternatelircdsocket path (this is thelircmdinput source, fyi). defaults to the output key in the[lircd]section of thelirc_options.confconfig 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--uinputoption will enable automatic generation of Linux input events.lircmdwill open/dev/input/uinputand inject the simulated mouse events into the Linux kernel rather than creating the/dev/lircmdevice. the kernel makes these events available to other applications on a/dev/inputdevice, just like any other kernel input device. that's the whole point, bestie. π₯-D,--loglevel=[level]β determine the amount of logging information.[level]can be a symbolic syslog level:'error','warning','info','notice'or'debug'.lircdalso 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'. spicy detail, keep it. πΆοΈ
π SOCKET PROTOCOL π
so the socket protocol contains undocumented parts. yes, really. 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. (yes, that's the actual instruction, bestie. go read the source. π)
IntelliMouse π
4 byte packets. please refer to the lircmd source code for details. same energy, different mouse. π
π FILES π
lircmd will use syslogd to output error messages. it depends on your system configuration where they will show up. so likeβ¦ they're out there somewhere. β¨
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. defaults-on-defaults, we love a layered situation. π
π DAEMONS π
lircmd is a daemon. she's built different. she 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. and important: lircmd has to be started after lircd as it connects to the socket lircd provides. order matters, bestie. don't come for me. π€
π 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. that's a real one, no cap.
the socket protocol is a documentation-wise mess. iconic honesty tbh. π
π SEE ALSO π
okay that's the whole page bestie, every single detail kept, nothing skipped, and you're now officially the lircmd expert. periodt. πβ¨
this has been lircmd version 0.10.2, last change Aug 2016 β love u, bye ππ
π¦ where this page comes from
- alpine 3.24: lirc-doc 0.10.2-r4 Β· GPL-2.0-only
- debian trixie: lirc 0.10.2-0.10 Β· GPL-2.0-or-later
- fedora 43: lirc-core 0.10.2-4.fc43 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 43: lirc-core 0.10.2-4.fc43 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 44: lirc-core 0.10.2-5.fc44 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 44: lirc-core 0.10.2-5.fc44 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- nixos 26.05: lirc 0.10.2
- nixpkgs unstable: lirc 0.10.2
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- ubuntu noble: lirc 0.10.2-0.8build1 Β· GPL-2.0-or-later
- ubuntu questing: lirc 0.10.2-0.10build1
- ubuntu resolute: lirc 0.10.2-0.10ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: lirc 0.10.2-0.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms