About this chapter
This chapter describes how to build and install LIRC. Note that LIRC is packaged for all major linux distributions. If you just want to use lirc, you should be able to install it like any other package. This way, you don’t have to look at the dependencies, build and installation description found here.
The ./configure script is the ultimate source as to what libraries and tools LIRC requires. The list here is not complete in any way, being focused on things to install before building.
Dependencies
Mandatory dependencies
There are a few mandatory dependencies, all of which packaged on most (all?) Linux distributions.
- Building directly from the git source tree requires autoconf,automake and libtool.
- Compilation and linking requires the GNU toolchain including make, gcc, g++ and ld.
- python3
- Building requires modinfo, often in the package kmod. Without modinfo, all kernel drivers are excluded from the build.
- Building requires pkg-config.
- Building requires kernel headers, often in the kernel-headers package.
- xsltproc
Optional dependencies
If these are missing, ./configure can cope with it and still build LIRC in a more or less limited way.
- Several scripts need the python3 PyYaml at http://pyyaml.org/wiki/PyYAML. Some distributions includes a python3-yaml package. There is also a pypi package at https://pypi.python.org/pypi/PyYAML. Building without this is possible but not recommended.
- Generating the HTML manpages requires man2html.
- Generating the API documentation requires Doxygen.
- The lirc-setup GUI configuration tool needs python3-gi and thus also the Gtk libs and icons. These are not required for the build, though.
- Building the X11 GUI tools like irxevent and xmode2 requires the X11 header files.
- The audio drivers needs the alsa and portaudio libs (libraries and headers).
- The ftdi and ftdix drivers require libftdi from http://www.intra2net.com/de/produkte/opensource/ftdi/
Kernel
As of 0.9.0+, lirc uses the kernel modules from the kernel. Some of these are formerly lirc modules which are now part of the kernel. Thus, building lirc does not involve building any kernel modules (as it used to).
Some of the former lirc modules are part of the official kernel and should be available on any reasonably updated system. However, some are in the staging area; if they are part of your kernel depends on the distro you use (unless of course if you compile your own kernel).
There are example and test kernel modules in the drivers/ directory. None of these are required for regular LIRC use, but they are supposed to be helpful while testing or writing drivers.
Compile and Install
Since 0.9.1+ , lirc loads drivers dynamically. This means that that the build system is redesigned to always build all drivers. The former setup.sh script is dropped in favor of a standard ./configure, make, make install sequence.
When building directly from git, a first required step to create ./configure and some other files is
Whether using git sources or just using a distributed tarball, the next steps are the canonical
./configure make sudo make install
- When running the configure script, please pay attention at its output. Specifically, at the very end it prints a list of the enabled functionality.
- Running configure without options will install lirc in /usr/local according to GNU standards. However, many examples in this manual as well as other documentation are assuming that ./configure ran with the —prefix=/usr option, installing in /etc/lirc, /usr/bin etc.
- The build system supports VPATH builds which does not clutter the source tree. To use this do something like:
mkdir _build; cd _build; ../configure make sudo make install
Checking the build
Since the dynamic drivers are not linked during the build, it’s recommended to check that the expected drivers are built and can be loaded using
cd tools; ./lirc-lsplugins -U ../plugins/.libs
Is some cases, lirc-lsplugins will crash on missing libraries e. g., liblirc.so.0. If so, you need to add the path where lirc installs it’s libraries (by default, /usr/local/lib) to the runtime linker path. Refer to generic ld.so(1) documentation.
With working paths lirc-lsplugins will create a list of the all drivers available, and also possible link errors not revealed during the build. lirc-lsplugins has a -h option providing help, and nroff -man ../doc/man/lirc-lsplugins.1 | more provides more complete info.
Configuration
Formerly, lirc was configured during build where the setup.sh script was used to select driver, configuration file, etc. Also, there was little support for starting and running the services from boot. From 0.9.1+ the configuration is instead done after the build. The configuration steps for the main lircd program involves:
- In some cases e. g., serial devices setting up kernel module options in /etc/modprobe.d or using udev rules.
- Selecting the driver and kernel device for your capture device.
- Selecting configuration file for your remote.
- Configuring and using systemd to run the services.
- Creating lircrc files for your applications.
Uninstall
- Remove the installed artifacts:
Updating from older versions
The NEWS file describes the changes since last version. Normally, upgrading from a previous version should not be too painful. However, if you have to update a really old version it’s probably better to make a fresh install.
What is LIRC ?
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
Recent linux kernels makes it possible to use some IR remote controls as regular input devices. Sometimes this makes LIRC redundant. However, LIRC offers more flexibility and functionality and is still the right tool in a lot of scenarios.
The most important part of LIRC is the lircd daemon which decodes IR signals received by the device drivers and provides the information on a socket. It also accepts commands for IR signals to be sent if the hardware supports this.
The user space applications allows you to control your computer with your remote control. You can send X11 events to applications, start programs and much more on just one button press. The possible applications are obvious: Infra-red mouse, remote control for your TV tuner card or CD-ROM, shutdown by remote, program your VCR and/or satellite tuner with your computer, etc. Using lirc on Raspberry Pie is quite popular these days.
Supported remote controls
There are some config files for remote controls at the remotes database. This is about 2500 devices and counting. These devices should work with the general drivers or (if it lacks timing info) the driver used to create them.
If you can’t find your remote control here it does not mean that your remote control is not supported. It’s just that there is no config file for it yet. All remote controls that are supported by learning remote controls i.e., almost any, should also work with LIRC.
Supported capture devices
Besides a remote control you also need a capture device to read the data from the remote. Former versions focussed on home-brew capture hardware connected to the serial or parallel port. Descriptions how to build such hardware can be found here. Current versions of LIRC also support a broad range of other hardware. As a starter, you can use the kernel built-in support for many USB dongles and similar. Besides this LIRC supports basically any conceivable way to capture your data including serial devices, parallel ports, sound input etc. You can see the complete list in the left pane.
News
- [04-Oct 2022] lirc-0.10.2 released.
- [28-May 2017] lirc-0.10.0rc1 released.
- [2-Feb 2017] lirc-0.9.4d released. [22-Oct 2016]
TV tuner cards get more and more popular these days. There is already very good Linux support for cards with bt848 chips. Some of these cards come with a remote control. If you have some information how these remote controls are working, contact me. I hope that there will be support for these devices in LIRC some day. (The remote controls from AnimaX are already supported.)
Last modified by Christoph Bartelmus: 05-Oct-2022
What is LIRC ?
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
Recent linux kernels makes it possible to use some IR remote controls as regular input devices. Sometimes this makes LIRC redundant. However, LIRC offers more flexibility and functionality and is still the right tool in a lot of scenarios.
The most important part of LIRC is the lircd daemon which decodes IR signals received by the device drivers and provides the information on a socket. It also accepts commands for IR signals to be sent if the hardware supports this.
The user space applications allows you to control your computer with your remote control. You can send X11 events to applications, start programs and much more on just one button press. The possible applications are obvious: Infra-red mouse, remote control for your TV tuner card or CD-ROM, shutdown by remote, program your VCR and/or satellite tuner with your computer, etc. Using lirc on Raspberry Pie is quite popular these days.
Supported remote controls
There are some config files for remote controls at the remotes database. This is about 2500 devices and counting. These devices should work with the general drivers or (if it lacks timing info) the driver used to create them.
If you can’t find your remote control here it does not mean that your remote control is not supported. It’s just that there is no config file for it yet. All remote controls that are supported by learning remote controls i.e., almost any, should also work with LIRC.
Supported capture devices
Besides a remote control you also need a capture device to read the data from the remote. Former versions focussed on home-brew capture hardware connected to the serial or parallel port. Descriptions how to build such hardware can be found here. Current versions of LIRC also support a broad range of other hardware. As a starter, you can use the kernel built-in support for many USB dongles and similar. Besides this LIRC supports basically any conceivable way to capture your data including serial devices, parallel ports, sound input etc. You can see the complete list in the left pane.
News
- [12-Aug 2017] lirc-0.10.0 released.
- [21-Jun 2017] lirc-0.10.0-rc3 released.
- [13-Jun 2017] lirc-0.10.0-rc2 released.
- [28-May 2017] lirc-0.10.0rc1 released.
- [2-Feb 2017] lirc-0.9.4d released. [22-Oct 2016]
TV tuner cards get more and more popular these days. There is already very good Linux support for cards with bt848 chips. Some of these cards come with a remote control. If you have some information how these remote controls are working, contact me. I hope that there will be support for these devices in LIRC some day. (The remote controls from AnimaX are already supported.)
Last modified by Christoph Bartelmus: 26-May-2016