Lirc on Gentoo

This page descripes how to configure lirc on Gentoo supporting a imon knob remote control and using it to send commands to mplayer. This is not meant to convey generel lirc configuration on Gentoo.

Lirc installation

First you need to figure out which modules you'll need. Look at the possible modules by running:

# emerge -va lirc

Find the correct module and add it to /etc/make.conf:


Load the required modules into the kernel:

# modprobe lirc_dev
# modprobe lirc_imon

Copy from /usr/share/lirc/remotes a configuration that fits your device into /etc/lircd.conf

# cp /usr/share/lirc/remotes/imon/lircd.conf.imon-knob /etc/lircd.conf 

You can test the configuration by running

# mode2 --raw

It should show some kind of output when using the remote control.

Make sure that the modules autoloads at next boot, by adding the modules to /etc/modules.autoload.d/kernel-2.6


And finally add the lirc daemon to default runlevels:

# rc-update add lircd default


If you want to use mplayer then compile it with lirc support!

Then edit ~/.lircrc (look at mplayer manual chapter 3.3.2 and Lirc documentation)

An example with two specifications for mplayer (volume up and down) and one for irexec which executes a command.

  button = Play
  prog = irexec
  config = /home/nemo/bin/

  button = VolDown
  prog = mplayer
  config = volume -1
  repeat = 1

  button = VolUp
  prog = mplayer
  config = volume 1
  repeat = 1

lircgentoo/lirc_on_gentoo.txt · Last modified: 2009/03/18 11:34 by jsc
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki