is a Free Open Source software digital video recorder (DVR) project distributed
under the terms of the GNU GPL.
Building MythTV on Linux
Why go to the trouble of building MythTV from source when it is available as
a package? The short answer is customisation. The longer answer is:
- Compilation optimised for your CPU giving a faster UI and smoother TV.
- Using a later version of MythTV with extra features.
- Applying patches to fix problems or add features.
- Custom configuration of MythTV to add or remove features.
- Build with specific library versions to fix bugs or add features.
- Debug build of MythTV and/or dependent libraries to track down bugs.
If this is for you then read on. There's a lot of compiling to do so you'll
need a fast, fat Linux box:
- At least 10 GB free space on a fast disk.
- At least 2 GB, preferably 4 GB physical memory.
- A recent multi-core CPU; or lots of patience.
- A fast internet connection >= 2 MB/s.
You will need to install the following tools:
This can be achieved using a package manager like apt-get, yum, rpm etc..
Download the build script
It is highly recommended that you download
this build script to
automate the build process. If you want to do the build manually then
look at the Step by step guide first and use the
'.diff' files from the
as a guide to making the necessary changes.
At a terminal type:
chmod +x mythbuild.sh
NB the script and patches were designed to build MythTV 0.24, released on 11 Nov 2010,
but will also build MythTV 0.23.1 and the current git master (v0.25pre-1070-g9590973).
Using the build script
At a terminal enter:
to list the options available for the build process.
To start the build simply type:
The script will display the type of build selected and prompt you to
continue. Pressing return will start the process of downloads and builds which
can take some time - around 30-60 minutes on recent multi core systems.
Hopefully everything built OK and we ended up with an installation archive.
If not then follow the Step by step guide to
resolve the problem.
Running MythTV for Linux
Now that we have built MythTV we're anxious to try it. We have 2 choices:
- With VirtualBox on a Linux, Mac or Windows system.
- On a live Linux system.
For testing then VirtualBox comes into its own. It's
simple to have a number of canned systems ready to run and it's
easy to re-start from known configurations.
Ultimately though, the intent is to run on real hardware.
MythTV settings are by default saved in ~/.mythtv which could conflict
with a current installation. This location can be changed by setting the
shell variable MYTHCONFDIR before running any MythTV program.
It is preferable, initially, to start MythTV programs from a terminal
which allows viewing log output. Assuming that MythTV was installed in the
default mythinstall directory then type:
mythinstall/bin/mythfrontend -p -w -geometry 800x600
The -p option forces a manual database configuration, the remaining options force
mythfrontend to run inside a managed window (in case of problems).
Select your country and language and press Save to proceed to the MythTV servers
page. Using the tab key, select Manual then press [return]. Proceed to the
Setup page, select General and proceed to the database settings page. Fill in
the details to match your backend configuration.
NB the database is version dependent. So if you building a different version
of MythTV to that installed then you should create a new database.
Once the database has been upgraded to a newer schema version it will not work
with a previous version of MythTV.
MythTV can be installed onto another Linux system by copying the MythTV archive
just built to the target system and then typing:
mkdir -p $MYTHTV/ && tar -jxf mythtv-<version>.tar.bz2 -C $MYTHTV/
The path /home/mythtv can be changed to suit.
To run mythfrontend on the target system type:
Note the definition of the shell variables LD_LIBRARY_PATH and QT_PLUGIN_PATH on
the command line. This allows the Linux loader and the Qt library to find the
built shared libraries and plugins.
To remove the MythTV just installed type:
rm -rf $MYTHTV/