lircd (8) - Linux Manuals

lircd: LIRC daemon decodes infrared signals and provides them on a Unix


lircd - LIRC daemon decodes infrared signals and provides them on a Unix domain socket.


lircd [options] [config file]


The main task of lircd is to decode the infrared signals and provide an uniform interface for client applications. Clients can connect to lircd through a Unix domain socket which is located in /var/run/lirc/lircd. Using this socket they will get the infrared codes received by lircd and they can send commands to lircd.


config file
The configuration file, by default /etc/lirc/lircd.conf. A relative path is interpreted from /etc/lirc.
The file is specific for the remote(s) that lircd should decode. The format is described in lircd.conf(5). Configuration files could be found using irdb-get(1) or lirc-setup(1). It's also possible to generate a config file using irrecord(1)


Common options:
-O, --options-file <path>
File containing default values for all options. A relative path is interpreted from current directory. See [FILES] below.
-d, --device <device>
Select the character device which lircd should read from. The default is currently /dev/lirc0 on most systems.
If you're using the devinput driver, you can use name=STRING or phys=STRING to select the device; lircd will look in /dev/input to find a device with a matching description. This is useful in case the device name isn't fixed. STRING may contain the '*' and '?' wildcards and '\' to mark them as literal. Use dmesg(1) to find the name and bus address (the names used under /dev/input/by-id are not always usable).
-H, --driver <driver>
The driver to use. Using --driver help lists all available drivers, see DRIVER LOADING below.
-h, --help
Displays short thelp message.
Other options:
-a, --allow-simulate
Enable the SIMULATE command which can be issued using irsend(1). This will allow simulating arbitrary IR events from the command line. Use this option with caution because it will give all users with access to the lircd socket wide control over you system. E.g. if you have configured your system to shut down by a button press on your remote control, everybody will be able to shut down your system from the command line.
-c, --connect [host[:port]][,[host[:port]]]
Allows you to connect to other lircd servers that provide a network socket at the given host and port number. The number of such connections is currently limited to 100. The connecting lircd instance will receive IR events from the lircd instance it connects to. To connect to multiple servers, add them with a comma separated list.
-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'.
The level can also be an integer in the range 3 (almost no messages) to 10.
-A, --driver-options key:value[|key:value...]
Set one or more options for the driver. The argument is a list of key:value pairs delimited by '|'. The key can not contain spaces, but such are allowed in the value part. Certain characters including '#' and ';' are used as comment markers in the config file and are not allowed anywhere.
-l, --listen [[address:]port]]
Let lircd listen for network connections on the given address/port. The default address is, which means that connections on all network interfaces will be accepted. The default port is 8765. No security checks are currently implemented. The listening lircd instance will send all IR events to the connecting lircd instances.
-L, --logfile <logfile path>
Select the lircd daemon log file. logfile is either the string 'syslog' indicating that syslog(1) should be used or a log file path. The default is to use syslog.
-o, --output <output socket>
Select Unix domain socket, which lircd will write remote key codes to. The default currently is /var/run/lirc/lircd.
-p, --permission
Gives the file permission of /var/run/lirc/lircd if it has to be created in octal representation. See chmod(1). If no --permission option is given when the socket is initially created the default is to give all users read and write permissions (0666 in octal representation). If /var/run/lirc/lircd already exists this option has no effect.
-p, --pidfile <path>
Select the lircd daemon pid file, defaults to /var/run/lirc/
-U --plugindir
The --plugindir option sets the directory from which lircd loads it's userspace drivers. These are *.so files, by default found as described under DRIVER LOADING.
-r, --release [suffix]
Enables automatic generation of release events for each button press. lircd will append the given suffix to the button name for each release event. If no suffix is given the default suffix is '_UP'.
-R, --repeat-max <limit>
Sets an upper limit to the number of repeats when sending a signal. The current default is 600. A SEND_START request will repeat the signal this many times. Also, if the number of repeats in a SEND_ONCE request exceeds this number, it will be replaced by this number.
-u, --uinput
Enable automatic generation of Linux input events. lircd will open /dev/input/uinput and inject key events to the Linux kernel. The key code depends on the name that was given a button in the lircd config file, e.g. if the button is named KEY_1, the '1' key code will be generated. You will find a complete list of possible button names in /usr/include/linux/input.h.
-Y, --dynamic-codes [EXPERIMENTAL]
Allows one to use codes which have been decoded for one remote but are not defined in lircd.conf. New codes are dynamically created with a default name. This feature is experimental and subject to all sorts of changes. It has not ben tested thoroughly.
-e, --effective-user <uid>
If started as user root, lirc drops it privileges and runs as user <uid> after opening files etc.


Main config file, see lircd.conf(5).

The options file. lircd handles the values under the [lircd] 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.


Plugin load path, se DRIVER LOADING
If set, enables debugging in early stages when the --debug parameter is yet not parsed.


Drivers are loaded dynamically. This is done from a traditional *ux ':'-separated path where each component in the path is searched (leading part first, trailing last).

The path used for this is determined by (falling priority):

The --plugindir option.
The 'plugindir' entry in the [lircd] section of the lirc_options.conf file.
The environment variable LIRC_PLUGINDIR.
A hardcoded default (usually /usr/lib[64]/lirc/plugins).


On receiving SIGHUP lircd re-reads the lircd.conf configuration file (but not lirc_options.conf) and adjusts itself if the file has changed.
On receiving SIGUSR1 lircd makes a clean exit.


lircd is a daemon. You should start it in some init script depending on your system. Besides the preferred systemd setup which is installed by default there are also example scripts for other distros and init systems in the contrib directory.