Ubuntu Dapper Installation
From MythTV
This page contains instructions for installing and configuring MythTV on Ubuntu Dapper 6.06 LTS.
| See Ubuntu Installation Guides for installing on other Ubuntu versions. |
This Howto is currently incomplete and a work in progress. Please help to fill in the gaps.
Overview
This HOWTO assumes that you are building a dedicated MythTV box and that you are not planning on dualbooting. It also assumes that you are reasonably familiar with installing an Ubuntu Linux distribution.
This HOWTO is geared towards a minimal, server installation. Ubuntu and Kubuntu run xorg X Server and use Gnome or KDE window managers. You have the option to install a full-fledged desktop version, in which case many of the packages to install may already be installed.
Setting 'root' password
The majority of the commands in this HOWTO must be run as root. For Ubuntu, this means prefixing each with 'sudo'. To open a shell as root and avoid typing 'sudo' repeatedly, type
sudo -i
Alternatively, if you insist on logging in as root, you can get root access by setting the root password:
sudo passwd
It will first ask for your user password and then you can change the 'root' password
From now on you can log in by typing 'root' as user and the password you just added, you can also get 'root'-rights when your loged in as 'user' by typing the command
su
Then it will ask for the 'root' password, so you never need to type 'sudo' before a command to get admin-rights.
Alternatively, you can enter into a root shell by typing
sudo -s
Enter your user password, and you have a root shell, without having to set a root password.
Install Ubuntu Dapper Server
The Server edition is a minimal system without X Windows and associated GUI applications. There is no point in dedicated MythTV boxes having unused applications, they take up space and waste network bandwidth when performing system updates (security fixes etc). We will add those packages that MythTV requires and little more.
Harddisk Partitioning
Below is a possible partition scheme you could choose (based on a 300Gb Harddisk):
| Mount point | Size | Filesystem |
| / | 10Gb | ext3 |
| /swap | 1.5Gb | swap |
| /home | 270Gb | XFS |
Obviously you don't have to follow this and could stick with the default Ubuntu partition scheme. To do this just choose “Erase entire disk” when installing Ubuntu. This will give you a root “/” partition formatted as ext3 and a swap partition.
XFS has been HIGHLY recommended as a filesystem as it is capable of deleting massive files in under a second. This is desirable for deleting recordings which are likely to be Gigabytes in size. By default a half hour recording is going to be approximately 1Gb!
If you are having trouble partitioning your HDD to create a similar partition scheme it is possible to install Ubuntu accepting the defaults and then boot off the LiveCD again and use the Gnome Partition Editor, gparted, (System --> Administration) to create a new partition by stealing space from / and formatting as XFS. Once MythTV is installed you will need to make sure that the user mythtv can write to and read from a directory on this partition.
The following steps are just a guide to installing Ubuntu Server:
- Install to the hard disk
- Choose a language: English
- Choose a location: Australia
- Your keyboard is: American English
- Hostname: ubuntu
- Disk space to partition: Manually partition
- Create new 4.0G partition for "/" of type "ext3" and bootable
- Create new 1.0G partition for swap (twice your RAM size)
- Create new partition using the remaining space for "/home" of type "xfs"
- Select a city in your time zone: <your city>
- Is the system clock set to UTC?: Yes
- Full name for the new user: <your name>
- Username for your account: <your login> (Do not use "mythtv")
- Choose a password for the new user: <secure password>
Install dependencies and required software
Before installing MythTV we need make some changes and add some other packages. Be prepared to add 'sudo' before all of the following commands, or log in and then open a root shell
sudo -i
First change the sources.list, its found in /etc/apt/sources.list.
nano /etc/apt/sources.list
Remove the # before the servers (deb, deb-src) for the dapper, dapper-updates, and dapper-security for each of the main, restricted, universe, and multiverse servers. You should have the following lines (these can be split among many individual lines):
deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse deb http://security.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse deb-src http://security.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse
Note: The clocks on the Great Britain servers are set to Greenwich Mean Time (UTC 0). If you get an HTTP 404 error while accessing them around 5:00 in the afternoon US Eastern Time (UTC -5), chances are they're going through their nightly maintenance scripts.
Note: Because of the RIAA/MPAA gestapo, several critical packages are unavailable on the US mirror. You can still get these packages from the Great Britain server by adding these lines:
deb http://gb.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
Finally, we'll need to have access to the Penguin Liberation Front repositories if we want to watch DVDs or other proprietary format media.
For more information about PLF packages, visit their website for details, http://plf.zarb.org/about.php
Note: As of 3/2/07, the PLF has temporarily stopped distributing the Ubuntu packages. The following mirror still contains most of the needed packages, but may or may not go down at any time.
## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.) deb http://medibuntu.sos-sts.com/repo/ dapper free non-free deb-src http://medibuntu.sos-sts.com/repo/ dapper free non-free
Packages in the PLF repository can be GPG authenticated. The key that is being used for signing the packages is 12B83718. You can enter this key into the APT trusted keys database with the following command:
wget http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -
CTRL+O saves the file CTRL+X closes nano.
Update the packages list and upgrade the system to make sure everything is current.
apt-get update apt-get upgrade apt-get dist-upgrade
This may be the time to change over to use the non server version of the linux kernel which is optimised for user interface and media playback.
apt-get install linux-image-686 (or linux-image-386 or linux-image-k7 or linux-image-am64-generic)
Do not create a user account called mythtv at this point. The installation of MythTV will do this for you at a later stage.
Install a window manager
Install XOrg and a small and fast window manager like Ratpoison. If you are building a dedicated Myth box, then you don't need a full blown desktop - otherwise you would not have installed the Ubuntu Server version - and it helps to have a window manager with remote-controlled key hooks to replace a mouse!
apt-get install xserver-xorg xinit xvattr apt-get install ratpoison xterm
Configure Xorg for your graphics card and monitor
dpkg-reconfigure xserver-xorg
Allow anybody to run X Windows
dpkg-reconfigure x11-common
Install services: Apache, Openssh
This software is important for the proper function of MythTV, and is available in stable packages. If you have installed a full-blown desktop, the Synaptic package manage will make short work of finding and installing them. Otherwise, apt-get away!
Install openssh-server so that you can connect to your MythTV box from other machines. This also enables you to connect using Windows boxes using PuTTY.
apt-get install openssh-server
MythTV supports a web-interface, which requires Apache
apt-get install apache2 libapache2-mod-php5 libapache2-mod-auth-mysql /etc/init.d/apache2 restart
The Network Time Protocol (ntp) will help keep the system clock on time
apt-get install ntp ntp-simple
Mplayer is used for video playback
apt-get install mplayer
Optional software
Most of this software is not large or heavy. If you are unsure about it, install it to be on the safe side.
Install usplash if you want the nice copper-colored Ubuntu boot-up screen.
apt-get install usplash
Install the DVB software for channel tuning and manual testing.
apt-get install dvbstream dvb-utils
For creating DVD movies from an MPEG-2 stream
apt-get install dvdauthor
For watching copyrighted DVD movies and videos with proprietary codecs (Illegal in some countries, including US)
apt-get install libdvdcss2 w32codecs
Install XINE as an alternative to Mplayer (XINE handles some codecs better)
Note: Most, if not all of these packages should work under Dapper, but the next snippit comes pretty much verbatim from the Multimedia section of the Edgy Starter guide at UbuntuGuide.org
apt-get install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base\ gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse\ gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs gxine\ xine-ui libxine1 libxine-main1
Other software to install
apt-get install dialog
Install Fonts
apt-get install gsfonts-x11 msttcorefonts xfonts-base apt-get install tcsh fc-cache -f -v
Frontend
This subsection is only necessary if you are builing a Frontend-only MythTV box. Download all deb Files from the link above.
# aptitude install libqt3-mt-mysql libqt3c102-mt-mysql # dpkg -i libmyth_0.19-5_i386.deb mythtv-common_0.19-5_all.deb mythtv-frontend_0.19-5_i386.deb
Install further plugins if needed...
Install Graphics Card Drivers
Install NVIDIA drivers
If you have an NVIDIA graphics card you need to install the drivers.
lspci | grep nVidia
You should get the output similar to the following:
0000:01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200LE] (rev a1)
If the card is there, install:
apt-get install nvidia-glx linux-restricted-modules-686 nvidia-glx-config enable
The second line should modify your /etc/X11/xorg.conf file to use the closed source 'nvidia' driver instead of the open source 'nv' driver. Check this by typing
nano -w /etc/X11/xorg.conf
Search (Ctrl-W) for “NVIDIA”. The 'Driver' should appear as below:
Section "Device"
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200LE]"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Restart your X-server.
/etc/init.d/gdm restart
If all is OK, reboot your machine, then continue to the next section. If you have problems follow the instructions at NVIDIA Binary Driver Howto.
Install ATi drivers
If you have an ATi graphics card download and install the ATi driver from http://easyubuntu.freecontrib.org. This section requires input from anyone with an ATi card. Jono Bacon's blog posting at http://www.jonobacon.org/?p=579 has more information on an ATi setup.
Install and Configure MySQL
Note: The current (Aug2006) mythtv installation appears to require a null MySQL root password for it to run. So if you change the password now -- *before* installing mythtv -- the mythtv installation will fail. I think it prompts to change the MySQL root password during installation or mythtv-setup (can't remember). If not, change the MySQL password (as below) after that.
MythTV relies heavily on MySQL. Install the mysql packages:
apt-get install mysql-server phpmyadmin
Now that it is installed you must change the MySQL root password. Note that this is not your system root password. Run the following command:
mysqladmin -u root password PassW0rd
Obviously substitute PassW0rd with a more normal password. Remember it as we are required to enter the MySQL root password during the MythTV installation. Now let's test that it works:
mysql -u root -p
Enter password: (the new mysql root password you just created above). You should see:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 to server version: 5.0.22Debian_0ubuntu6.06log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> quit Bye
Hauppauge 150 / 250 / 350 / 500MCE
To use a Hauppauge TV capture card you will need to install the ivtv driver and card firmware. Ivtv is not yet available as a package, so install it from source.
Set up a build environment for IVTV
Our Ubuntu server install does not yet have a compiler or other build utilities, so get them
apt-get install build-essential gcc
Now we must create a build environment. First find your kernel version and tag:
uname -r
You should get an output similar to 2.6.15-26-686. Make a note of this number. From this point on where you see $KVER substitute your Kernel version. In my case it was 2.6.15. The tag is the -26-686.
This line should will set a environment variable to simplify the process to follow:
KVER=`uname -r | cut -c 1-6`
Get the correct kernel source for your current kernel:
apt-get install linux-source-$KVER linux-headers-`uname -r` tar xvjf /usr/src/linux-source-*.tar.bz2 -C /usr/src/ ln -s /usr/src/linux-source-$KVER /usr/src/linux ln -s /usr/src/linux /lib/modules/`uname -r`/build
Recall what your “tag” is (mine was -26-686). Yours may differ.
nano -w /usr/src/linux/Makefile
Comment out the default line starting with EXTRAVERSION (approximately fourth line down) by preceding the line with a #. Add your tag. Mine looks like this:
VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 15 EXTRAVERSION = -26-686 #EXTRAVERSION = .7ubuntu1 NAME=Sliding Snow Leopard
Now set up the build environment
cd /usr/src/linux cp /boot/config-`uname -r` /usr/src/linux/.config make oldconfig make prepare0 make scripts ls -l /lib/modules/`uname -r`/build
If this symbolic link points to /usr/src/linux, we don't have to do anything. However, if it does not, manually delete it and make the link yourself:
rm /lib/modules/`uname -r`/build ln -s /usr/src/linux /lib/modules/`uname -r`/build
Compile and Install IVTV driver
Download and install the IVTV drivers. IVTV requires a driver and firmware for the PVR card. The firmware is not something written to the card, but rather something loaded every time IVTV is envoked.
DO NOT just blindly grab the latest driver by choosing the version with the largest version number. As of this writing, there are multiple actively developed versions of the ivtv driver. The correct choice for you depends on what version of the Linux kernel you have installed.
For the default kernel version in Dapper (2.6.15), you want the latest from the 0.4.x series of ivtv releases. If you have a 2.6.16 or higher kernel version, you want something from the 0.6.x or 0.7.x series.
The version you need is now kernel dependent See http://ivtvdriver.org. for the package for you! then
cd /usr/src mv /path/to/downloaded/driver/ivtv-*.tar.gz . tar xvfz ivtv-0.*.tar.gz cd ivtv-0.your-version make make install
This will install the driver and ivtv utilities. If you see any line ending with HIDE in the output of make install, you will need to run the command(s) that it suggests. Then, execute this command:
depmod -a
Repeat until the output of depmod is silent.
Check that you have the following files:
ls /lib/modules/`uname -r`/ivtv cx25840.ko ivtv-fb.ko ivtv.ko saa7127.ko tda9887.ko tuner.ko tveeprom.ko
If any of the above files are missing, we will need to undo the symbolic link we created earlier, and recompile. First we'll need to clean out the files from the failed compile run with the following commands:
rm -r /lib/modules/`uname -r`/ivtv make clean
Once those are gone, restore the original link, and recompile:
rm /lib/modules/`uname -r`/build ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/build make make install
Once again, if there are any lines ending with HIDE, run the command(s) that make suggests, then redo
depmod -a
At this point, you should have all seven files.
Now install the firmware. For ivtv 0.4.7, you need only to download the files and put them in /lib/firmware. The easiest place to get it is from the IVTV site:
wget http://dl.ivtvdriver.org/ivtv/firmware/firmware.tar.gz tar zxvf firmware.tar.gz cp v4l-c* /lib/firmware
From this location, the linux hotplug can find the firmware and use it.
If for some reason this does not work, read the ivtv firmware wiki. Otherwise, skip ahead to enabling the ivtv drivers.
An alternative way to manually extract the firmware. You can find the firmware on the driver CD that comes with te card, or download the following files
cd utils/ wget ftp://ftp.shspvr.com/download/wintv-pvr_150-500/inf/pvr_2.0.24.23035.zip wget ftp://ftp.shspvr.com/download/wintv-pvr_250-350/inf/pvr_1.18.21.22254_inf.zip unzip pvr_2.0.24.23035.zip
You should see:
Archive: pvr_2.0.24.23035.zip replace ReleaseNotes.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: ReleaseNotes.txt inflating: hcwECP.ax inflating: HcwFalcn.rom inflating: HcwMakoA.ROM inflating: HCWPP2.inf inflating: hcwPP2.sys inflating: hcwPrxA2.ax inflating: hcwutl32.dll inflating: hcwxds.dll inflating: hcwCCnv2.ax
Then run:
./ivtvfwextract.pl pvr_1.18.21.22254_inf.zip cp HcwMakoA.ROM /lib/firmware/v4l-cx25840.fw cp HcwFalcn.rom /lib/firmware/v4l-cx2341x-enc.fw mv /lib/modules/ivtv-fw-dec.bin /lib/firmware/ mv /lib/modules/ivtv-fw-enc.bin /lib/firmware/ cp ../v4l-cx2341x-init.mpg /lib/firmware/ ln -s /lib/firmware/ivtv-fw-dec.bin /lib/firmware/v4l-cx2341x-dec.fw ls -ltra /lib/firmware/
Load IVTV on boot
Now lets tell Ubuntu that we have ivtv modules and they should be loaded at boot time. Add an instance to the /etc/modules file:
echo "ivtv" |sudo tee -a /etc/modules
Also edit /etc/modprobe.d/aliases:
nano -w /etc/modprobe.d/aliases
Find the 'alias char-major-81-*' line and replace it with the following two lines:
alias char-major-81 videodev alias char-major-81-0 ivtv
Save and close. If you have a second PVR card or a PVR-500, then add "alias char-major-81-1 ivtv" to the list. Now load the ivtv driver:
depmod modprobe ivtv dmesg |grep ivtv
If you get output detailing IVTV and your card without any errors then it has worked. If not look over the steps above carefully.
Testing IVTV
cat /dev/video0 > /tmp/test.mpg (let it run for about 1 minute)
Ctrl -C to stop recording. Open mplayer: Applications --> Sound and Video --> Mplayer Movie Player. Right click on the window --> Open File --> /tmp/test.mpg. If you see grey snow you're in business!
Alternatively, you can stream the video directly to Mplayer using:
mplayer /dev/video0
Lirc
Unless you're using one of the MCE edition cards, chances are you'll want to run MythTV using your remote. To do this, you'll need to Install LIRC
Install MythTV
MythTV from Source
Create a directory to hold the source code:
mkdir -p ~/src/mythtv cd ~/src/mythtv
Get the source tarball from the MythTV download page
or
this page gave me the following instructions that downloads via svn and installs via command-line --> way faster install
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.
apt-get build-dep mythtv apt-get install subversion qt3-dev-tools
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
If you'd like to get the stable 0.20 branch, do this instead:
svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/mythtv svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/mythplugins svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/myththemes
If you want the latest-and-greatest, bleeding edge release type:
svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/mythplugins
svn co http://svn.mythtv.org/svn/trunk/myththemes
Once you have a checkout, you can just do a svn update at any time to update it to the most recent revision.
Compile MythTV
You might like to change some of the default options. You can either edit the configure file (which could get overwritten by a newer version if you checkout a later version of the code) or you could
./configure --help
Then note which flags you'd like to change from the default ones (for example, to enable DVB-T or XvMC).
Assuming you're installing mythtv-0.20: 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
AMD-64 issues (skip if you not on AMD-64)
There are a few minor issues that have cropped up when using a 64-bit AMD processor. Here are some fixes for the more common ones:
32-bit codecs won't decode on AMD-64
The win32codecs package is not available in 64-bit format for obvious reasons. To view M$ encoded movies, you'll need to manually download and install the packages. Download the package using this command:
wget http://medibuntu.sos-sts.com/repo/pool/dapper/non-free/i386/w32codecs_20061022-0medibuntu1_i386.deb
Then install it with:
dpkg -i --force-architecture w32codecs_20061022-0medibuntu1_i386.deb
Even after doing a force-architecture install, the 32-bit codecs don't work properly with the 64-bit version of mplayer. Fortunately, there's a workaround package for it:
apt-get install mplayer32
Once this is installed, start the MythTV frontend and make the following change:
Under Utilities/Setup -> Setup -> Media Settings -> Videos Settings -> Player Settings, change the line
mplayer -fs -zoom -quiet -vo xv %s
to
mplayer32 -fs -zoom -quiet -vo xv %s
Flaky DTS Decoding on AMD-64 (only needed for DVB)
There is a problem with the libdts-dev package on AMD-64. There are two ways to solve it. One is to disable DTS support so the command looks like:
./configure --prefix=/usr/local --disable-dts
The other is to build as normal, but first shuffle around the DTS libraries:
mv /usr/lib/libdts.a /usr/lib/libdts.a_nonpic
mv /usr/lib/libdts_pic.a /usr/lib/libdts.a
Whatch out for previous installations
Check what MythTV packages you have installed and remove them. Don't do --purge if you want to keep the config
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:
make install
After Installation
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:
mythbackend
If mythbackend is running OK, test mythfrontend:
mythfrontend
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. (qmake if you don't know what qmake is don't worry i didn't either Synatpic says this about it's parent package: Qt3 development tools
This package contains all tools that are necessary to build programs that are written using Qt3. These are: qmake, uic and moc. For Qt3 development, you most likely want to install this package.
This does mean that you don't *techinically* have to do qmake but chances are it might work better.
cd ~/src/mythtv/myththemes-0.20 ./configure --prefix=/usr qmake myththemes.pro make sudo make install
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
As we've got all of the config and startup scripts in place, we shouldn't have to do anything here. Unfortunately, the mythtv-backend startup script doesn't seem to start the compiled version after a reboot. I'd love to know why. THere is a patched version here: mythtv-backend
Again this is heavily based from a tut on this page
MythTV 0.20 Packages
MythTV packages currently reside in the multiverse repository, so do not receive review or update from the Ubuntu security team. Installing MythTV from source is the recommended method.
Available packages for those who do not wish to install from source: Ubuntu Edgy has the MythTV 0.20 packages in its multiverse repository. Add the following lines to your /etc/apt/sources.list:
deb http://us.archive.ubuntu.com/ubuntu/ edgy multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ edgy multiverse
Alternatively, you can use unofficial, third party packages. To do so, add the following lines at the bottom of /etc/apt/sources.list:
## (Unofficial) MythTV packages for 0.20 deb http://home.eng.iastate.edu/~superm1 dapper main deb-src http://home.eng.iastate.edu/~superm1 dapper main
MythTV 0.19 Packages
Add the following lines at the bottom of sources.list: Note: The following binary packages have disappeared from the site and no longer available. Will update later with a site which contains correct packages.
## MythTV packages for 0.19 deb http://knm.org/mythdebs/ binary/ deb-src http://knm.org/mythdebs/ source/
Another repository I found:
- Mythtv 0.19
deb http://knm.org/mythdebs/ binary/ deb-src http://knm.org/mythdebs/ source/
MythTV 0.18 Packages
Ubuntu Dapper 6.06 has packages for MythTV 0.18 in the multiverse repository (0.18.1-5ubuntu3). Although these packages install fine there is a problem with regards to MythTV 0.18 and MySQL 5. For more information look at the Ubuntu MythTV bug report. MySQL seems to drop connections after a certain period of time. Neither installing mysql-server-4.1 nor setting connect_timeout in /etc/mysql/my.cnf seems to fix this. It is recommended that the MythTV 0.18 packages be avoided.
Install and Configure MythTV
I used Synaptic Package Manager so that I had instant access to the version number I wanted (0.19) and package descriptions. System --> Administration --> Synaptic Package Manager. Search for mythtv. The version number should be 0.19. Select and apply the following:
mythtv mythbrowser mythdvd mythgallery mythnews mythvideo mythweather
Then apply:
mythweb mythtv-doc mythgame mythphone mythtv-debug
Then apply:
mythcontrols myththemes
mythmusic needs a little help to install. It depends on libcdaudio0.
wget http://security.ubuntu.com/ubuntu/pool/universe/libc/libcdaudio/libcdaudio0_0.99.9-2ubuntu0.2_i386.deb
Then on your desktop (or wherever this has been saved to) double click the libcdaudio0 .deb file that has been saved there. Make sure that Synaptic Package Manager is not running. Click on install and grant permission for the installation by inputting your password. Once installed close the window and go back to Synaptic Package Manager. Search for mythtv, select mythmusic and apply. You install libcaudio0 from terminal with "dpkg -i <package>.deb" , after that type:
apt-get install mythmusic
To enable the mythtv user to sudo commands, add him or her to the admin group:
nano -w /etc/group
Search for the line that starts with "admin", and add ",mythtv" to the end of that line, no spaces (note the comma preceding mythtv). Perform the same operation on the lines that start with "cdrom" and "plugdev". This gives the mythtv user access to the optical disks (DVDROM, CDROM, etc) and any pluggable storage devices such as USB sticks.
The mythtv install that you just ran automatically created a "mythtv" user. We need to change its password to something that we can remember:
passwd mythtv
Automatic frontend start
In case you don't have it configured, make X Windows start automatically on boot by adding this line to the end of /etc/inittab
myth:2:respawn:/bin/su - mythtv -c "/usr/bin/startx"
Edit the mythtv users x startup file ~mythtv/.xinitrc and add the following line
/usr/bin/ratpoison& # xterm /usr/bin/mythfrontend --logfile /var/log/mythtv/mythfrontend.log
Log file rotation
Set up log rotation for the Frontend logs, otherwise you might run out of disk space. Put the following into a new file called /etc/logrotate.d/mythtv-frontend
/var/log/mythtv/mythfrontend.log {
daily
rotate 7
notifempty
copytruncate
size 20M
}
This will wait until the log reaches 20M before rotating, checking daily.
Refer to Log_File_Rotation for more information and examples.
Create location for saving video files
Log out from your current X session, and log back in as the mythtv user. At this point, do not open a "sudo -i" shell.
By default MythTV saves files in /mnt/store. If this directory does not exit you must create it and change the ownership of this directory to the user mythtv. If you choose to use the partition scheme similar to the one in the table above you may want to store your video files in the /home/mythtv directory. As user mythtv:
cd ~/ mkdir mythtv mkdir mythtv/store
To test you can write to this directory as user mythtv:
touch /home/mythtv/mythtv/store/test.txt ls -lh /home/mythtv/mythtv/store/ total 4.0K -rw-r--r-- 1 mythtv mythtv 2 2006-07-22 14:07 test.txt
Now create the directories for holding recordings and live TV buffers:
mkdir /home/mythtv/mythtv/store/recordings mkdir /home/mythtv/mythtv/store/buffers
Note: As of version 0.19, MythTV no longer uses a seperate directory for Live TV Buffers.
Alternatively, If you are going to stick with the default store location you may need to create the directories below. Again, make sure that they are writeable by the user mythtv otherwise your recordings will fail. If user mythtv does not have write permissions to /mnt than you may need to precede these commands with sudo as well as "chown mythtv" the directories once created.
mkdir /mnt/mythtv mkdir /mnt/mythtv/store mkdir /mnt/mythtv/store/recordings mkdir /mnt/mythtv/store/buffers ls -lh /mnt/mythtv/store total 12K drwxr-xr-x 2 mythtv mythtv 4.0K 2006-07-09 09:48 buffers drwxr-xr-x 2 mythtv mythtv 4.0K 2006-07-09 09:48 recordings
When you run (or re-run) the MythTV setup program, you will need to adjust the storage directories from their default locations to these directories.
MythTV SVN Packages
Since we are running a Debian based system, wouldn't it be nice to build packages that you can just install and remove using apt. Refer to the Building_DEBs_from_SubVersion for details.
An alternative that I am trying is (not yet actually working):
To get the dependencies, add the following to your /etc/apt/sources.list
deb http://www.kiberpipa.org/~gandalf/ubuntu/dapper/mjpegtools/ ./
Then get all the dependant packages:
sudo -i apt-get update apt-get install subversion kdelibs4-dev x11proto-gl-dev libdvdread3-dev fftw-dev libvorbis-dev libflac-dev libmad0-dev libcdaudio-dev libcdparanoia0-dev libid3tag0-dev libsdl1.2-dev liblame-dev libfaad2-dev libexif-dev libtiff4-dev libfaac-dev libavc1394-dev libxxf86vm-dev libiec61883-dev libdvb-dev libmysqlclient15-dev liblircclient-dev libdts-dev x11proto-xf86misc-dev libdvdnav-dev libjack-dev libxvmc-dev
Install XMLTV
If you are planning on using XMLTV then install the following application.
apt-get install xmltv-util
DVB Cards
The Twinhan_MiniTer_DVT_PCI card works when the correct modules are loaded. Add this line to the /etc/modules file:
dvb-bt8xx
Configuration
To configure MythTV run
mythtv-setup
After setting the appropriate options
Now, run
mythfilldatabase
This will populate your database with listings. This generally takes around five minutes. Now for the moment of truth
mythbackend & mythfrontend
Misc Utilities
Remove Blue Borders
To remove the blue lines around the TV image requires the following package:
sudo apt-get install xvattr
Edit the file /home/mythtv/.xinitrc and add the following line:
xvattr -a XV_COLORKEY -v 1
Fan Speed Control
It is possible to reduce the noise from you PC by dynamically controlling the speed of the cooling fans. Fans with 3-wires connected to the motherboard are usually controllable using lmsensors.
To get this to work on Dapper, we need to create the i2c device files before they can be used.
sudo apt-get install lm-sensors cd /dev sudo mknod -m 0660 i2c-0 c 89 0 cd sudo sensors-detect
This should detect what sensor chips the motherboard has and add the required modules to the /etc/modules file so that they get loaded on boot. On my ASUS board I use these modules: i2c-viapro, i2c-isa, eeprom, w83627hf.
So that you don't have to reboot, load these modules by hand:
sudo modprobe i2c-viapro ...
Now you should be able to list the features exposed in the /sys filesystem (xxxx-xxxx is dependant on your h/w configuration):
ls /sys/bus/i2c/devices/xxxx-xxx/
Auto Mounting and Ejecting CDROMS
If you have a dedicated system for the living room, then you really don't want to have to ssh into the box just to mount or un-mount a CDROM containing video files. This will ensure the WAF remains high. These instructions enable the automounting of media, including cdroms, and lets you use the eject button on the CDROM drive.
sudo apt-get install ivman
Edit /etc/rc.local and add the following line just above the "exit 0" line
/usr/bin/ivman
Change the user that the daemon runs under to "mythtv" by editing the file /etc/ivman/IvmConfigBase.xml
<ivm:Option name="user" value="mythtv" />
To start it up without having to reboot, run the following command
sudo /etc/init.d/rc.local start
