Installing MythTV on Debian Etch
This is a Tutorial to install MythTV on a Debian GNU/Linux 4.0 ('etch') machine.
- 1 Debian GNU/Linux 4.0 ('Etch') Base System Installation
- 2 MythTV Installation and Configuration
- 3 Getting MythTV
- 4 Starting MythTV
- 5 Additional (and Optional) MythTV System Configuration
Debian GNU/Linux 4.0 ('Etch') Base System Installation
Download the netinst disk for your favorite platform from http://www.debian.org/CD/netinst/ or one of the mirrors.
- Boot the target PC from the Debian CD
- At the Debian Boot Screen, hit enter
- Choose your preferred language, Country or Region, and Keyboard Layout
- Choose a servername and domain
- Accept automatic partition changes
- Install GRUB to the MBR
- Debian starts its post install configuration routine
- Choose your Time Zone
- IMPORTANT: do not use the username "mythtv". The user "mythtv" is reserved for use by mythtv
- Enter your new root password and the information for your new user account
- Add ftp.debian.org
- Make sure that only Base or Standard System is checked
- The Debian Netinst installer should now leave you with a login screen
MythTV Installation and Configuration
now at first we need the mysql server:
apt-get install mysql-server
now set the mysql root user password
mysqladmin -u root password yourpasswordhere
For sound, I ran
apt-get install alsa-base alsa-utils alsaconf
IvTV driver packages
If you need ivtv for your TV Tuner, then run (NOTE: The following command is one line long. The `uname -r` part is placing your specific linux kernel version, so you may run into trouble if you have compiled your own kernel, in which case you should run 'apt-cache search ivtv' and find the correct modules for your system. You will also need to keep an eye on the 'linux-source-2.6.18' package, and be sure that you are getting the correct version.)
apt-get install ivtv-utils ivtv-modules-`uname -r` linux-source-2.6.18 linux-headers-`uname -r` module-assistant
Note: If ivtv-utils is not found in apt, you may need to add the contrib packages to your sources.list file
deb http://ftp.debian.org/debian etch contrib deb-src http://ftp.debian.org/debian etch contrib
If you are using a Hauppauge PVR-150 TV Tuner, then get latest pvr-150 firmware from http://dl.ivtvdriver.org/ivtv/firmware/ and put the *.fw files (except the usb-related files, indicated by their filenames) in /lib/firmware, then run
1) Grab the latest greatest out-of-the-box packages from 'sid'.
Both are not explained in detail over here.
Linux Infra Red Remote Control lirc
Please see LIRC_on_Debian_Etch.
Graphical User Interface (GUI): X.org
In order to run X, I ran (The last entry, fluxbox, is the window manager. It is up to you to decide which window manager you want to run.)
apt-get install xfonts-base xbase-clients xserver-xorg xfonts-75dpi fluxbox
After installing X, you will need to modify your /etc/X11/xorg.conf file.
Add the MythTV sources to /etc/apt/sources.list accordingly
deb http://www.debian-multimedia.org etch main deb-src http://www.debian-multimedia.org etch main
Before we can use apt, we must import the gpg keys for the site by installing the debian-multimedia-keyring package. The "apt-get update" command will give a warning about missing GPG key. Type 'yes' if prompted to install "untrusted" package for the "apt-get install" command:
apt-get update apt-get install debian-multimedia-keyring
Now we can get the rest of the needed package to build myth via:
apt-get build-dep mythtv
Now you can get mythtv:
apt-get install mythtv
and if you want extras you can search for them with
apt-cache search mythtv
Building from source
If you really insist building yourself:
add your user to the staff group so you get write permission to usr/local now after logging in as a user (DON'T USE ROOT) do this:
This creates a folder called mythtv where the actual sources are in.
and compile it with something like:
./configure --prefix=/usr/local --arch=athlon-xp --enable-dvb --enable-dvb-eit make make install
The configure line above is only an example. In this example, the installation is configured to be under /usr/local. If you want to put it somewhere else, you can alter the --prefix argument. Run ./configure --help to see what options are available and necessary for you.
You will probably want to be root to run the "make install" part, though, because that target invokes ldconfig to set up shared library paths, and usually nobody but root can do this.
Set the mythtv user's password:
Log in as the mythtv user, then start an X session:
Open up XTerm and run the MythTV Setup program:
After configuring MythTV, you can start the MythTV Backend:
sudo /etc/init.d/mythtv-backend start
You will then need to pull your channel information:
Additional (and Optional) MythTV System Configuration
If you would like the mythtv user to automatically log in, but don't want to use gdm, then follow these simple instructions. First you will need to install rungetty which will allow you to enable the automatic login of the mythtv user.
apt-get install rungetty
Then, you will set the first screen to automatically log the mythtv user in, instead of displaying a login prompt and waiting for user input. To do this you will edit the /etc/inittab file to change the line:
1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/sbin/rungetty tty1 --autologin mythtv
You will then need to set up the mythtv user account to automatically start X, and also automatically restart X in the event of any type of exit. To do this you will modify the file /home/mythtv/.profile to read:
At this point, X will start, but it will just sit there waiting for user input. In order to automatically start mythfrontend when X starts, you will need to edit /home/mythtv/.xinitrc to something like:
exec irexec & exec xset s off & exec fluxbox & wmpid=$! exec mythfrontend 2>> /home/mythtv/MYTHERRORS & wait $wmpid
A few notes on the above suggestion:
- The irexec line is starting the IR interpreter program. This is useful if you have edited your lirc configuration files to allow button presses on your remote to operate things outside of MythTV. This line is optional according to whether or not you use irexec.
- The xset line is disabling your screen saver and/or screen blanking. This is completely optional.
- The fluxbox line is starting the chosen window manager (Fluxbox, in this case), and noting its pid. The window manager that you choose is optional, however the 'wmpid=$!' is not optional without reworking this file.
- The mythfrontend line is starting mythfrontend, and appending the MYTHERRORS file with any errors that would normally be lost in the console. This might be helpful for debugging, but please note that it appends to this file, meaning it will continue to grow and should be watched over. The '2>> /home/mythtv/MYTHERRORS' part is optional (the & is NOT optional).
- The wmpid line is waiting for Fluxbox to close. This line is not optional without reworking this file.
IMDB Fetch Problems?
The original source of this section is (this is more or less a word-for-word copy): http://fauxzen.com/2007/04/03/mythtv-020-02ubuntu2-imdb-fetch-problems/
If you have trouble with the getting all of a movie's information pulled from IMDB (plot, director, ratings, etc), then follow these steps to correct the issue.
First create a backup of the original script
sudo cp /usr/share/mythtv/mythvideo/scripts/imdb.pl /usr/share/mythtv/mythvideo/scripts/imdb.pl-orig
Download the SVN Copy
Rename the script
mv imdb.pl\?format\=raw imdb.pl
Replace the old script with the new one
sudo cp imdb.pl /usr/share/mythtv/mythvideo/scripts/imdb.pl