MythTV Ubuntu Installation Guide - Part 2

Article courtesy of Garry Parker at

Welcome to part 2 of Garry's guide on installing MythTV the easy way. It's assumed that you've followed part 1 and got the basic system working. Now we'll concentrate on some of the additional components.

Remote Control

Here we'll look at getting the remote control that comes with the Hauppauge Nova-T working using the LIRC package. Contrary to almost everything you'll read on the web, this can be done without compiling LIRC.

Kernel Drivers

The remote control should be recognised by the standard Ubuntu kernel. Check it by running:

cat /proc/bus/input/devices

Look for an entry like this one:

I: Bus=0001 Vendor=0070 Product=9002 Version=0001
N: Name="cx88 IR (Hauppauge Nova-T DVB-T"
P: Phys=pci-0000:00:0f.0/ir0
H: Handlers=kbd event2
B: EV=100003
B: KEY=108fc000 100822 0 0 0 0 18000 4180 4801 9e0000 7bb80 0 10000000

The important bit is the event2 line. This shows us which input device the remote is using. Test it by connecting your infra-red eye, running the following command (change the event device to match your system) and pressing some buttons on your remote:

sudo evtest /dev/input/event2


We now need to install lirc - this takes the events from the device and passes them on to the applications:

apt-get update
apt-get install lirc

As usual, we'll give it a quick test. Run the following command in one window...

sudo /usr/sbin/lircd -H dev/input -d /dev/input/event2 -n

...and the following command in another:


Press some buttons and you should see the events displayed in the lircd window.

LIRC Config

LIRC needs some config to tell it how to translate the events from the remote. Rather than re-invent the wheel, I found a config which works with my Hauppauge remote on Mark Longair's site:

Copy lircd.conf and hardware.conf into /etc/lirc. lircd.conf maps the keys from the Hauppauge remote into event strings. hardware.conf tells lirc which device to use (such as /dev/input/event2). Once these are installed, lirc should startup automatically after a reboot. irw should give a list of the translated events - run it and press some more buttons:

sudo /etc/init.d/lirc start
000000008001004f 00 1 hauppauge_nova_t_uk
0000000080010050 00 2 hauppauge_nova_t_uk
0000000080010051 00 3 hauppauge_nova_t_uk
000000008001001c 00 OK hauppauge_nova_t_uk
00000000800100ae 00 Back hauppauge_nova_t_uk
00000000800100cf 00 Play hauppauge_nova_t_uk

Now all we need to do is tell the applications how to interpret the lirc events. To do this, the lircrc files needs to be in two locations: ~/.lircrc and ~/.mythtv/lircrc. The best method is to use a symbolic link:

cp lircrc ~/.lircrc
cd ~/.mythtv
ln -s ../.lircrc lircrc

The included config has events for xine as well as mythtv. Run up mythfontend and try it out!

Note: If you have problems with the /dev/input/eventN device changing after each reboot, take a look at how to make the device static on my MythTV Tips page.


MythWeb is the web interface for MythTV. It's a great way to manage your recordings as the interface is much higher resolution than on your TV. I've even got my system setup so that I can connect to it across the internet and set things to record!

If you're expecting the installation of mythweb to be hard on Ubuntu, think again:

sudo apt-get install mythweb

Yes, that's it. This command resolves all of the dependencies and installs the apache2, libapache2-mod-php4, php4-mysql and mythweb packages... and, guess what? It just works. It never used to be this easy!


sudo apt-get install mythvideo

MythVideo is used for playing video files which were not recorded by MythTV, such as home videos and downloaded AVI files. It scans your video collection in /share/Movies/dvd, including all sub-directories. The default path can be changed in Utilities/Setup->Setup->Media Settings->Video Settings->General Settings.

The other useful setting is the movie player to use, found in Player Settings. This will probably be either mplayer or xine. I've had better results with xine and use the following command line:

xine -r 4:3 -f -I --no-splash %s

Go into Utilities/Setup->Video Manager to scan for new videos and they should appear under Media Library->Watch Videos.