MythTV Ubuntu Installation Guide



Introduction

Ubuntu Linux is a great basis for a general purpose MythTV Media Centre and has the latest version of MythTV (0.21) ready to install from its software repositories.

This guide focuses on terrestrial DVB-T in the UK (Freeview), but much of it should be applicable to anybody installing Myth. If you're using satellite, see the Freesat Guide.

The instructions are for the latest release of Ubuntu 9.04 (Jaunty Jackalope), but should also be applicable to the four previous versions, Intrepid 8.10, Hardy 8.04, Gutsy 7.10 and Feisty 7.04.

Hardware

A MythTV system consists of backends, for recording and storing TV, and frontends, for watching the TV. These can be on multiple computers or combined onto a single PC.

I use a completely silent combined backend/frontend system with dual Hauppauge tuners. Take a look here for more details. I also have frontends on a PC in the study and on my laptop.

Installation

You have two choices when installing MythTV on Ubuntu. You can either install from the standard Ubuntu, Kubuntu or Xubuntu CD and then add the additional packages or try the ready made Mythbuntu distribution.

Mythbuntu contains all the packages you need for Ubuntu and MythTV on one CD. It is especially recommended for beginners when installing from scratch. However, it uses the Xfce desktop which, in my opinion, is not as polished as the standard Gnome desktop. For this reason I prefer to install from the standard Ubuntu CD and then load the MythTV packages on top. That's the method in this guide.

You can download the Ubuntu Jaunty CD image from here. The Desktop Edition is probably the one to go for. This is a live CD, so may take a while to boot up before you can click the "install" icon on the desktop. Here are a few pointers for the installation:

Software Repositories

Ubuntu enables all the required software repositories by default, so you should already have access to all the packages needed for the installation. If you're not sure, please see the following instructions to confirm that you have the "universe" and "multiverse" repositories selected:

Tuner Cards

Many tuner cards are supported by the standard Ubuntu kernel, so will "just work". Others need firmware to be loaded and some newer cards need drivers to be compiled. Good resources for checking how well your card is supported are:

A quick way to check the status of your card is to view the logs:

grep -i 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)...

Hauppauge Nova-T Cards

I tend to use Hauppauge Nova-T DVB cards for receiving terrestrial DVB broadcasts. There have been a number of different models over the years and some require firmware and others do not. The following guide details what needs to be done for various cards, including single tuner cards with Conexant chipset and the new dual tuner Nova-T 500:

Testing The DVB Card

At this point, you can optionally check to see if your card is working before we install MythTV. If you're feeling brave, skip this part and come back if you have problems tuning later on:

Installing MythTV

MythTV Packages

To install MythTV , simply click on the following link: Install MythTV

...this installs MythTV and all other required packages, including the MySQL database.

Alternatively, you can install by hand:

sudo apt-get update
sudo apt-get install mythtv

Either way, it will take a few minutes to download and install. Recently, there have been a number of improvements to the installation process. It now pops up a few dialogues:

MythTV Setup

To configure Myth, you run the mythtv-setup utility and step through the options. Select it from the menu: System->Administration->MythTV Backend Setup

Important: the first time this is run, it will complain that your user is not in the mythtv group. This is required so that your user can run and confgure MythTV components. It will offer to add him to the group. Click OK to do this and follow the prompts to log out and back in again.

Once you have logged in again, run MythTV Backend Setup once more. Click OK to stop the mythbackend process and and the mythtv-setup utility should run.

General

Change the TV format and channel frequency table based on your location. I changed the TV format 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.

If you have two cards or a dual tuner, repeat this step, changing the DVB Card Number to 1.


Video Source

This defines the source of the schedule listings. There are two options in the UK - the EIT data which is transmitted with the DVB signal and the XMLTV feed gathered over the Internet. They both have their pros and cons, but we'll choose EIT because it is much easier to get working. See MythTV DVB Scheduling Setup for more information.

Select (New video source). Enter a video source name of "EIT". Set the Listings grabber to "Transmitted guide only (EIT)". That's it. The listings will be populated automatically once we have scanned for the channels.


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, "EIT".

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. It will ask you if you want to run mythfilldatabase. Answer NO because we're using the EIT.

Now run a MythTV Frontend from the menu: Applications->Sound & Video->MythTV Frontend

At this point you should finally be able to watch some TV! Note that when mythfrontend is running, you can still switch between applications by pressing ALT+TAB.


MythTV Settings

Once you have mythfrontend up and running, you will find that there are hundreds of settings under the Utilities/Setup menu option. You can spend hours tweaking these to get a perfect system, but here are a few suggestions:

Ubuntu Desktop Settings

There are a number of settings which must be changed in order for MythTV to run smoothly on the Ubuntu desktop.

Log in Automatically

To log in automatically on startup, change your /etc/gdm/gdm.conf-custom file:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=mythtv

Run MythTV Frontend Automatically

mythfrontend can be run automatically by adding it to your .gnomerc file. If this file exists in your home directory, it is run on login. Create the file:

gedit /home/mythtv/.gnomerc

Add the following lines:

sleep 10 && mythfrontend > /tmp/mythfrontend.log 2>&1 &

Save the script and make it executable:

chmod 755 .gnomerc

TV Out

MythTV isn't going to change your life unless it's connected to your TV. The most important factor here is your graphics card. nVidia cards are the most widely used and best supported. Historically the 5200 has always been a good buy, but I've also used newer 6200 and 7100 cards with no problems. It is pretty essential that you use the proprietary drivers, but on Gutsy this is very easy...

Configuring TV-Out

If you have an LCD or plasma TV with a HDMI input, a DVI->HDMI cable should give you a fantastic picture.

If your TV only has a SCART input, an S-Video to SCART cable can be used. These are available with additional audio connectors so that you'll be able to use your TV's remote control to adjust the volume. With my Panasonic TV, all I have to do is connect the cable and the TV picture is displayed. Tweaks to overscan settings can be made using the nvidia-settings utility. I find that a 1024x768 resolution gives a decent TV picture while keeping the desktop useable for Firefox and other applications.

Debugging

The best way to debug problems is to check the output of the backend and frontend tasks:

To check the backend for error messages:

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

To check the frontend for errors, run it from the command line. You can ALT+TAB to see the output in the terminal window while the frontend is running:

mythfrontend

Additional Features

Check out part two to find out how to get the additional features of Myth installed.

Links

Comments, Questions and Feedback

You can post comments about this page on my blog:

Alternatively, feel free to drop an email to Garry if you have any comments, suggestions or just want to chat. Cheers.


Leave a comment.