5.5. The lircin Driver

The lircin driver enables you to use any IR remote control that works with LIRC to control the LCDproc server (LCDd) and/or clients that can handle input.

Of course you need a working LIRC setup. Refer to http://www.lirc.org for more information on LIRC itself.

5.5.1. Checking Your LIRC Setup

Basically all you need is a running lircd. And of course you have to start lircd as root.

Also, make sure that the permission of /dev/lircd are correct.

5.5.2. Build LCDd with the lircin Driver

You need to add lircin to the --enable-drivers=... list.

Then simply run make.

5.5.3. Configure LCDd to Use the lircin Driver

First of all you need to activate the driver by adding a Driver=lircin line to your LCDd.conf

Example 5-1. LCDd.conf: Activate the lircin driver


Driver=mtxorb
Driver=lircin

This activates the mtxorb driver as the output driver and the lirc driver as the input driver.

Then you have to modify the [lircin] section of your LCDd.conf.

5.5.3.1. LCDd.conf: The [lircin] Section

The [lircin] section of the LCDd.conf contains the settings for the lircin LCDproc driver.

lircrc=

Normally all LIRC clients scan the file ~/.lircrc. However, you might want to have a separate file to configure the LCDproc lircin driver only.

This option enables you to specify the file you want the lircin driver to scan.

prog=

All LIRC keys are assigned to a program using the prog=... option in the ~/.lircrc (or the file you have specified with lircrc=...).

The prog=... line must be the same as in your ~/.lircrc (or the file you have specified with lircrc=...).

5.5.4. Modify Your ~/.lircrc

As mentioned above you can either modify the ~/.lircrc or use a separate file for the lircin LCDproc driver (See above for details).

No matter which file you use, you have to add at least the following lines to the file:

Example 5-2. ~/.lircrc: Specify the keys for the lircin driver


begin
        prog = lcdd
        button = 2
        config = A
end

begin
        prog = lcdd
        button = 4
        config = B
end

begin
        prog = lcdd
        button = 6
        config = C
end

begin
        prog = lcdd
        button = 8
        config = D
end


Which buttons you specify here depends on your RC and your LIRC configuration. Anyways, config=A/B/C/D is neccessary to control the server menu of LCDd. Of course you can define other keys. Those keys will not be handled by the server but sent to a client. Refer to the documentation of the client you want to use, to find out which keys are neccessary for that client.