On current Ubuntu versions (Edgy Eft and higher), the remote control on SAA7134 based TV-cards is automatically recognised by the kernel, and added as an event-device to /dev/input. This means that LIRC itself is not needed anymore, which is great because it’s not very easy to configure. The inputlirc daemon can be used instead to autodetect the device, handle the events and present them to any LIRC-compatible programs. My TV-card is a cheap Medion MD2819 I bought a few years ago at Aldi (although the card is actually manufactured by Avermedia). However, these instructions should work for all remote control devices (SAA713x-based or otherwise) that are recognised by the kernel as an input device. Check your dmesg output to be sure. Also, you may need a different lircrc file for devices that are not SAA7134-based.
Install the inputlirc deamon, and the LIRC utilities:
sudo apt-get install inputlirc lirc
Add the line
to your /etc/rc.local file (e.g. using gksudo gedit), before the line that says “exit 0”
Add the command
to your startup session (using the GNOME desktop menu: System->Preferences->Sessions).
Create a LIRC configuration file at /etc/lircrc or \~/.lircrc, for example this one.
You can use the command
to see if the remote control works.
On my Ubuntu 7.04 system I left out steps 2 and 3, and it still seems to work.