MythTV Ubuntu Installation Guide

Article courtesy of Garry Parker at


With the release of Ubuntu 6.10 (Edgy Eft), installing MythTV is now easier than ever. Ubuntu is a great basis for a general purpose MythTV box and now comes with the latest version of MythTV (0.20) in its standard packages. This guide focuses on DVB in the UK (Freeview), but much of it should be applicable to anybody installing Myth.

The old Ubuntu Dapper guide can be found here.


I use a completely silent combined backend/frontend system with dual Hauppauge tuners. Take a look here for more details.


You can download the Ubuntu Edgy CD image from here. The desktop version is probably the one to go for. It installed perfectly on my admittedly generic hardware. The only things to watch are:

  • When asked to enter a username, don't put mythtv. I've heard that this causes problems later on as he's created my the mythtv packages. We'll begin with your username and switch to the mythtv user later.
  • Disk partitions. I've just gone with the default config of a single swap and big root partition. This is simple and flexible. If you want to be clever you can use Linux Volume Management or you could have a separate XFS partition to store your recordings.

APT Configuration

To get to the packages we want, we'll need to add some repositories. Here's my /etc/apt/sources.list. It's just the standard Ubuntu config with the universe and multiverse repositories added.

Testing the DVB Card

Kernel Modules

I use Hauppauge Nova-T cards. These, and many others, are autodetected by the standard Ubuntu kernel:

grep DVB /var/log/messages [4294707.185000] cx88[0]: subsystem: 0070:9002, board: Hauppauge Nova-T DVB-T [card=18,autodetected] [4294708.036000] DVB: registering new adapter (cx88[0]). [4294708.036000] DVB: registering frontend 0 (Hauppauge Nova-T DVB-T)...

You can check if your card is supported at the LinuxTV V4L Wiki.

Install the Test Software

We're now going to test the card by viewing some output. For this, we'll need some DVB utilities and a movie player. As everything is so easy with Ubuntu, why not try out both xine and mplayer...?

 sudo apt-get update  sudo apt-get install dvb-utils dvbstream  sudo apt-get install gxine mplayer    

Watch Some TV

First, you need to search for channels in your area using the scan utility. The scan program doesn't do frequency scans, so it needs initial tuning data for at least one transponder/channel in your area. For my Winter Hill transmitter, I use the following (this is done as the root user using sudo -s):

sudo -s -H mkdir /root/.tzap scan /usr/share/doc/dvb-utils/examples/scan/dvb-t/uk-WinterHill > /root/.tzap/channels.conf

Note: The scan will fail if you have an old Nova-T with a TDA1004x chipset and have not loaded any firmware. See this howto before going any further.

Once you have the channel data, you can use tzap to tune into one of the frequencies:

sudo -s -H tzap -r "BBC ONE"

It's best to leave this going while we use dvbstream and xine or mplayer to view an actual mpeg stream:

dvbstream -o -ps 600 601 -qam 16 -cr 3_4 | mplayer - dvbstream -o -ps 600 601 -qam 16 -cr 3_4 | gxine stdin://mpeg2

Installing Myth TV


Now we're almost ready to install MythTV. However, we'll install the MySQL database package first.

sudo apt-get install mysql-server

Myth TV

Now we can finally install MythTV itself:

sudo apt-get install mythtv mythtv-themes

It will ask you for the root database password. Hit enter if you haven't changed it.

The installation will have created a mythtv user. We'll login as him from now in, so set his password:

sudo passwd mythtv

It also makes sense to grant access rights to the mythtv user. To do this, edit the file /etc/group and mythtv to all groups that your original user is in. This will allow him to use sudo, access the cdrom etc. For example:

. admin:x:106:garry,mythtv .

Note that mythtv gets created with the default shell as /bin/sh. If you want /bin/bash, then set this in the /etc/passwd file.

Now, logout of your X session and login as mythtv at the GDM screen.

Myth TV Setup

To configure Myth for the first time, you run the mythtv-setup utility and step through the options:


Note that I've cheated and used the MythCentre theme for the screenshots, which isn't the default... it just looks so much nicer!


All I changed was the TV standard to PAL and the channel-frequency-table to europe-west.

Capture Card

Select (New capture card). For a DVB card, change the Card Type to "DVB DTV capture card (v3.x)". It should detect it and show your card details.

Video Source

This defines the source of the schedule listings. We'll be using the 14 day radio times guide, which is downloaded via the internet. There's also a guide transmitted over Freeview, but it's only 7 days and contains much less programme information.

Select (New video source). Enter a video source name of "uk_rt". Select XMLTV listings grabber to be "United Kingdom alternative". Pressing "Finish" will display an error message. Don't worry, we'll sort this out later.

Input Connections

This associates our DVB card with the video source. A good "Display Name" would be "Freeview". Set the Video source to the one we've just defined, "uk_rt".

Hit "Scan for channels" and set the correct country. Hopefully, this will find a load of channels and radio stations.

Channel Listings

Go here and check you have all the channels you need. If there are any you don't want, uncheck the "Visible" box.

Testing the Configuration

Now you can exit the setup utility and start the backend. Note that this will start automatically when the system is rebooted.

sudo /etc/init.d/mythtv-backend start

Check for error messages:

tail -f /var/log/mythtv/mythbackend.log

Now run the frontend as the mythtv user:


At this point, you should be able to watch TV, but the schedules won't quite work. See the next section for fixing this.

Fixing Channel Data

So, we've got our channels configured and our schedule listing feed set up, but there's one last step. We need to configure the channels table to associate the correct xmltvid and icon with each channel.

Instructions for updating the channel table can be found here:

Additional Features

Check out part 2 to find out how to get the remote control and web interfaces working:


The End

So, that's the basic system installed.