MythTV 0.20 on Ubuntu Dapper


Introduction

Due to the six monthly release cycle of Ubuntu, it's not always going to include the latest version of MythTV. This means that you either have to install from an unofficial repository of compile it yourself. Probably the best way to guarantee the latest stable software is to compile it from the official source release. This guide shows how I got this working on Ubuntu Dapper 6.06.

The method involves installing the official MythTV 0.18 packages, removing them and installing the compiled version. Installing the packages is a good way to prepare your system for MythTV, as it creates the appropriate users and directories etc. Removing the packages without the --purge option leaves all of the config and scripts in place, making the switch to your compiled version very easy.

Preparation

Installing MythTV 0.18

First of all, we'll install MythTV and later upgrade to version 0.20. Follow this guide to install the official Ubuntu MythTV package. If you're already on 0.19 then that's fine.

Installing Build Dependencies

Once Myth 0.18 (or 0.19) is working, we'll install the files needed to compile 0.20. For this, we'll use the knm.org as a reference for build dependencies.

Add following to the end of your /etc/apt/sources.list

# Mythtv 0.19
deb http://knm.org/mythdebs/ binary/
deb-src http://knm.org/mythdebs/ source/

At this point, you could install 0.19 and stop there. Continue if you're interested in 0.20...

Automatically download all packages required to build Myth.

sudo apt-get build-dep mythtv

Make sure that /usr/include/GL/gl.h exists. If it does then you're fine, otherwise you have to remove and reinstall the mesa-common-dev package.

Download the Official 0.20 Source Release

Create a directory to hold the source code:

mkdir -p ~/src/mythtv
cd ~/src/mythtv

Download the 3 source packages from mythtv.org downloads.

Unpack the files:

tar xf mythtv-0.20.tar.bz2
tar xf mythplugins-0.20a.tar.bz2
tar xf myththemes-0.20.tar.bz2

Compile MythTV

Configure and compile using:

cd mythtv-0.20
./configure --prefix=/usr --enable-dvb
qmake mythtv.pro
make

If the compilation went smoothly, you're almost ready to install. Firstly, you'll need to backup your database.

mysqldump -u root mythconverg -c > mythconverg.dmp

Check what MythTV packages you have installed and remove them. Don't do --purge as we want to keep the config in place:

dpkg -l | grep myth

apt-get remove libmyth mythtv mythtv-backend mythtv-common mythtv-database mythtv-frontend mythtv-lcdserver

Now, we can install our compiled version:

sudo make install

You may have to update the database access permissions to match the password defined in ~mythtv/.mythtv/mysql.txt. The example shows setting the password to "mythtv":

mysql -u root mythconverg
set password for 'mythtv'@'%' = password('mythtv');
set password for 'mythtv'@'localhost' = password('mythtv');
flush privileges;

Run mythbackend to test. This will automatically upgrade your previous mythconverg database schema to the latest version:

sudo mythbackend

If mythbackend is running OK, test mythfrontend:

mythfrontend

If you have problems with mythfrontend starting, make sure you have libqt3-mt-mysql installed (thanks to Will Berriss):

sudo apt-get install libqt3-mt-mysql

Compiling MythThemes

This package gives us some nice additional themes. Note that it won't compile until you've installed MythTV because it references /usr/include/mythtv/mythconfig.mak.

cd ~/src/mythtv/myththemes-0.20
./configure --prefix=/usr
qmake myththemes.pro
make
sudo make install"If you have a pro

Compiling MythPlugins

This package gives you all of the major plugins including MythWeb, MythVideo, MythDVD and MythArchive.

If you want MythMusic to build, there are a few more dependencies which it needs:

apt-get install libmad0-dev libid3tag0-dev libflac-dev libcdaudio-dev libcdparanoia0-dev fftw3-dev
cd ~/src/mythtv/mythplugins-0.20a
./configure --prefix=/usr
qmake mythplugins.pro
make
sudo make install

Installing MythWeb

Note that the make install command doesn't install MythWeb. Do do this, run:

cd ~/src/mythtv/mythplugins-0.20a/mythweb
sudo cp -rp . /usr/share/mythtv/mythweb

sudo ln -s /usr/share/mythtv/mythweb /var/www

sudo chgrp www-data /usr/share/mythtv/mythweb/data
sudo chmod 775 /usr/share/mythtv/mythweb/data
sudo chmod +t /usr/share/mythtv/mythweb/data
ls -ld  /usr/share/mythtv/mythweb/data

Starting Automatically

If you have a problem with mythbackend not starting after a reboot, check out this post.

Feedback

As usual, any comments, insults, praise, corrections or suggestions can be emailled to Garry