Difference between revisions of "Installing MythTV on Debian Etch"

From MythTV Official Wiki
Jump to: navigation, search
(Debian GNU/Linux 4.0 ('etch') ships IVTV 0.8.2, which is already outdated)
(IMDB Fetch Problems?)
 
(43 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
This is a Tutorial to install MythTV on a Debian GNU/Linux 4.0 ('etch') machine.
 
This is a Tutorial to install MythTV on a Debian GNU/Linux 4.0 ('etch') machine.
  
== Debian Install ==
+
== Debian GNU/Linux 4.0 ('Etch') Base System Installation ==
  
Download the netinst disk for your favourite platform from http://www.debian.org/CD/netinst/ or one of the mirrors.
+
Download the netinst disk for your favorite platform from http://www.debian.org/CD/netinst/ or one of the mirrors.
  
# Insert the Debian CD in the CD/DVD drive
+
# Boot the target PC from the Debian CD
# Reboot the target PC by pressing its reset button
 
 
# At the Debian Boot Screen, hit enter
 
# At the Debian Boot Screen, hit enter
# Choose language, Country or Region, Keyboard Layout
+
# Choose your preferred language, Country or Region, and Keyboard Layout
# Choose a servername and domain.
+
# Choose a servername and domain
 
# Accept automatic partition changes
 
# Accept automatic partition changes
 
# Install GRUB to the MBR
 
# Install GRUB to the MBR
 
# Reboot
 
# Reboot
# Debian start its post install configuration routine
+
# Debian starts its post install configuration routine
# For Time Zone, I chose Eastern
+
# Choose your Time Zone
 
# IMPORTANT: do not use the username "mythtv". The user "mythtv" is reserved for use by mythtv
 
# IMPORTANT: do not use the username "mythtv". The user "mythtv" is reserved for use by mythtv
# Enter your new root password and a new user account,
+
# Enter your new root password and the information for your new user account
 
# Add ftp.debian.org
 
# Add ftp.debian.org
# Uncheck Desktop;  Check Web Server, SQL Server, & File Server
+
# Make sure that only Base or Standard System is checked
# Configure the Mail Transfer Agent (MTA) by accepting the default settings
+
# The Debian Netinst installer should now leave you with a login screen
# The Debian Netinst installer should now leave you with a login screen.
 
  
== Installation and configuration ==
+
== MythTV Installation and Configuration ==
  
 
=== MySQL ===
 
=== MySQL ===
  
become root
+
Become root
  
   su -
+
   su
  
now at first we need the mysql server:
+
Install the mysql server:
  
 
  apt-get install mysql-server
 
  apt-get install mysql-server
  
now set the mysql root user password
+
Set the mysql root user password:
  
 
  mysqladmin -u root password yourpasswordhere
 
  mysqladmin -u root password yourpasswordhere
Line 40: Line 38:
 
=== Sound ===
 
=== Sound ===
  
For sound, I ran
+
Install [http://www.alsa-project.org/main/index.php/Main_Page '''ALSA''']:
 +
 
 +
apt-get install alsa-base alsa-utils libesd-alsa0
 +
 
 +
Configure your sound card by entering the command:
  
apt-get install alsa-base alsa-utils
 
 
  alsaconf
 
  alsaconf
  
 
=== [[IVTV|IvTV]] driver packages ===
 
=== [[IVTV|IvTV]] driver packages ===
  
If you need [[IVTV|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.)
+
This section is only necessary if you need [[IVTV|ivtv]] for your TV Tuner.
 +
First, edit your /etc/apt/sources.list file by adding 'contrib' to the end of each relevant source line, so that the lines look something like this:
  
   apt-get install ivtv-utils ivtv-modules-`uname -r` linux-source-2.6.18 linux-headers-`uname -r` module-assistant
+
   deb http://ftp.debian.org/debian etch contrib
 +
  deb-src http://ftp.debian.org/debian etch contrib
  
Note: If ivtv-utils is not found in apt, you may need to add the contrib packages to your sources.list file
+
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.  This can be verified by running the 'uname -r' command and noting the version displayed.)
  
   deb http://ftp.debian.org/debian etch contrib
+
   apt-get install ivtv-utils ivtv-modules-`uname -r` linux-source-2.6.18 linux-headers-`uname -r` module-assistant
  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
 
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
Line 68: Line 70:
 
Both are not explained in detail over here.
 
Both are not explained in detail over here.
  
=== Linux Infra Red Control (LIRC) ===
+
If you've configured your own, newer, kernel, you might benefit from this thread over at linuxquestions.org: [http://www.linuxquestions.org/questions/debian-26/mythtv-ivtv-modules-on-debian-635044/page2.html].
 
 
If you need to install LIRC in order to use an Infrared Remote, first run:
 
 
 
  apt-get install dialog
 
 
 
Then download lirc from www.lirc.org   , follow the instructions in the INSTALL file, then run these commands:
 
 
 
  modprobe lirc_i2c
 
  chmod 666 /dev/lircd
 
 
 
You will then need to start lircd (the first command checks to make sure the device files are there, and the second command may require you to add '-d /dev/lirc?' substituting the ? with a number, which will probably be 0)
 
  
  ls /dev/lirc*
+
=== Linux Infra Red Remote Control [[LIRC|lirc]] ===
  lircd
 
  
You will then need to get a lircrc file, and a lircd.conf file which will reside in /home/mythtv/.lircrc, /home/mythtv/.mythtv/lircrc, /etc/lircd.conf, and possibly (I forget) /etc/lircrc.  This link may help you: http://lircconfig.commandir.com/
+
Please see [[LIRC_on_Debian_Etch]].
  
 
=== Graphical User Interface (GUI): X.org ===
 
=== Graphical User Interface (GUI): X.org ===
Line 98: Line 88:
 
=== Out-of-the-box packages ===
 
=== Out-of-the-box packages ===
  
Add two more sources to /etc/apt/sources.list
+
Add the MythTV sources to /etc/apt/sources.list accordingly (please use a nearby mirror):
 +
 
 +
Architecture : alpha | amd64 | hppa | i386 | ia64 | powerpc | sparc
 +
 
 +
Australia
 +
deb http://deb.samad.com.au/multimedia/ stable main
 +
deb-src http://deb.samad.com.au/multimedia/ stable main
 +
Belarus
 +
deb http://ftp.mgts.by/debian-multimedia/ stable main
 +
deb-src http://ftp.mgts.by/debian-multimedia/ stable main
 +
 
 +
deb ftp://ftp.mgts.by/debian-multimedia/ stable main
 +
deb-src ftp://ftp.mgts.by/debian-multimedia/ stable main
 +
Belgium
 +
deb ftp://mirrors.powersource.cx/pub/debian-multimedia/ stable main
 +
deb-src ftp://mirrors.powersource.cx/pub/debian-multimedia/ stable main
 +
Brasil
 +
deb http://www.las.ic.unicamp.br/pub/debian-multimedia stable main
 +
deb-src http://www.las.ic.unicamp.br/pub/debian-multimedia stable main
 +
 
 +
deb http://linorg.usp.br/debian-marillat/ stable main
 +
deb-src http://linorg.usp.br/debian-marillat/ stable main
 +
 
 +
deb ftp://linorg.usp.br/debian-marillat/ stable main
 +
deb-src ftp://linorg.usp.br/debian-marillat/ stable main
 +
Canada
 +
deb http://debian.dc-uoit.net/debian-multimedia/ stable main
 +
 
 +
deb http://gulus.usherbrooke.ca/pub/distro/debian/debian-multimedia/ stable main
 +
deb-src http://gulus.usherbrooke.ca/pub/distro/debian/debian-multimedia/ stable main
 +
 
 +
deb ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main
 +
deb-src ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main
 +
Denmark
 +
deb http://debian.three-dimensional.net/debian-multimedia stable main
 +
deb-src http://debian.three-dimensional.net/debian-multimedia stable main
 +
El salvador
 +
deb http://debian.ues.edu.sv/debian-multimedia/ stable main
 +
deb-src http://debian.ues.edu.sv/debian-multimedia/ stable main
 +
France
 +
deb http://mirror.home-dn.net/debian-multimedia stable main
 +
deb-src http://mirror.home-dn.net/debian-multimedia stable main
 +
 
 +
deb http://debian-multimedia.gnali.org stable main
 +
deb-src http://debian-multimedia.gnali.org stable main
 +
 
 +
deb http://debian-multimedia.yolker.be stable main
 +
deb-src http://debian-multimedia.yolker.be stable main
 +
Germany
 +
deb http://debian-multimedia.dfoell.org/ stable main
 +
deb-src http://debian-multimedia.dfoell.org/ stable main
 +
 
 +
deb http://debian-multimedia.informatik.uni-erlangen.de/ stable main
 +
 
 +
deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia stable main
 +
deb-src http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia stable main
 +
 
 +
deb http://debian-mirrors.sdinet.de/debian-multimedia stable main
 +
 
 +
deb http://debian.netcologne.de/debian-multimedia.org stable main
 +
deb-src http://debian.netcologne.de/debian-multimedia.org stable main
 +
 
 +
deb ftp://debian.netcologne.de/debian-multimedia.org stable main
 +
deb-src ftp://debian.netcologne.de/debian-multimedia.org stable main
 +
 
 +
deb http://honk.physik.uni-konstanz.de/mirror/www.debian-multimedia.org stable main
 +
deb-src http://honk.physik.uni-konstanz.de/mirror/www.debian-multimedia.org stable main
 +
 
 +
deb http://debian.ids-services.de/debian-multimedia/ stable main
 +
deb-src http://debian.ids-services.de/debian-multimedia/ stable main
 +
 
 +
deb http://ftp.uni-kl.de/debian-multimedia/ stable main
 +
deb-src http://ftp.uni-kl.de/debian-multimedia/ stable main
 +
 
 +
deb ftp://ftp.uni-kl.de/debian-multimedia/ stable main
 +
deb-src ftp://ftp.uni-kl.de/debian-multimedia/ stable main
 +
Great Britain
 +
deb http://debian-multimedia.fx-services.com/ stable main
 +
deb-src http://debian-multimedia.fx-services.com/ stable main
 +
Greece
 +
deb ftp://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
 +
deb-src ftp://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
  
  deb http://www.debian-multimedia.org/ etch main  
+
  deb http://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
  deb-src http://www.debian-multimedia.org/ etch main
+
  deb-src http://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
  
Before we can use apt, we must import the gpg keys for the site
+
deb http://ftp.duth.gr/debian-multimedia/ stable main
 +
deb-src http://ftp.duth.gr/debian-multimedia/ stable main
  
  gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 1F41B907
+
  deb ftp://ftp.duth.gr/debian-multimedia/ stable main
  gpg --armor --export 1F41B907 | apt-key add -
+
deb-src ftp://ftp.duth.gr/debian-multimedia/ stable main
 +
Ireland
 +
deb http://floating3.ucd.ie/debian stable main
 +
  deb-src http://floating3.ucd.ie/debian stable main
  
now we can get the rest of the needed package to build myth via:
+
deb http://ftp.heanet.ie/mirrors/debian-multimedia/ stable main
 +
deb-src http://ftp.heanet.ie/mirrors/debian-multimedia/ stable main
 +
Italia
 +
deb http://mi.mirror.garr.it/mirrors/debian-multimedia stable main
 +
deb-src http://mi.mirror.garr.it/mirrors/debian-multimedia stable main
  
 +
deb ftp://mi.mirror.garr.it/mirrors/debian-multimedia stable main
 +
deb-src ftp://mi.mirror.garr.it/mirrors/debian-multimedia stable main
 +
Portugal
 +
deb http://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
 +
deb-src http://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
 +
 +
deb ftp://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
 +
deb-src ftp://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
 +
 +
deb http://neacm.fe.up.pt/debian-multimedia/ stable main
 +
deb-src http://neacm.fe.up.pt/debian-multimedia/ stable main
 +
 +
deb ftp://neacm.fe.up.pt/debian-multimedia/ stable main
 +
deb-src ftp://neacm.fe.up.pt/debian-multimedia/ stable main
 +
Russia
 +
deb http://debian.nsu.ru/debian-marillat/ stable main
 +
Slovakia
 +
deb http://ftp.tuke.sk/debian-multimedia/ stable main
 +
deb-src http://ftp.tuke.sk/debian-multimedia/ stable main
 +
 +
deb ftp://ftp.tuke.sk/debian-multimedia/ stable main
 +
deb-src ftp://ftp.tuke.sk/debian-multimedia/ stable main
 +
Sweden
 +
deb http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
 +
deb-src http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
 +
 +
deb ftp://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
 +
deb-src ftp://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
 +
 +
deb http://ftp.acc.umu.se/mirror/debian-multimedia stable main
 +
deb-src http://ftp.acc.umu.se/mirror/debian-multimedia stable main
 +
Taiwan
 +
deb http://ftp.tw.debian.org/debian-multimedia/ stable main
 +
deb-src http://ftp.tw.debian.org/debian-multimedia/ stable main
 +
 +
Architecture : i386 only
 +
France
 +
deb http://www.dedale.eu.org/mirror/debian-multimedia/ stable main
 +
deb-src http://www.dedale.eu.org/mirror/debian-multimedia/ stable main
 +
Switzerland
 +
deb http://debian.mxchange.org/debian stable main
 +
Ukraine
 +
deb ftp://ftp.linux.kiev.ua/pub/mirrors/www.debian-multimedia.org/ stable main
 +
deb-src ftp://ftp.linux.kiev.ua/pub/mirrors/www.debian-multimedia.org/ stable main
 +
Main Repository
 +
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
 
  apt-get update
 
  apt-get update
apt-get build-dep mythtv
 
  
Now you can get mythtv:
+
Now you can instal mythtv:
  
 
  apt-get install mythtv
 
  apt-get install mythtv
Line 123: Line 253:
 
=== Building from source ===
 
=== Building from source ===
  
If you really insist building yourself:
+
If you really insist on building MythTV yourself:
  
 
add your user to the staff group so you get write permission to usr/local
 
add your user to the staff group so you get write permission to usr/local
Line 166: Line 296:
 
   mythfilldatabase
 
   mythfilldatabase
  
[[Category:HOWTO]]
+
== Additional (and Optional) MythTV System Configuration ==
 +
 
 +
'''Can't watch tv?'''
 +
#Try <code>cat /dev/video0 >/tmp/somefile.mpg</code>
 +
#Try <code>cat /var/log/dmesg |grep tv</code>
 +
#Do you need to put the ivtv firmware in <code>/usr/lib/hotplug/firmware</code>
 +
#Check MySQL ports used by MythTV. Like the guides say, you will probably not need to change this. Don't worry that the ports listed in MySQL setup is different from the ones here.
 +
#Check MythTV directory permissions.
 +
#Did you change the '''mysql''' password for <code>root</code> or <code>mythtv</code>?
 +
##<code>rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf && rm /var/lib/.mythtv -rf</code>
 +
##<code>sudo dpkg-reconfigure mythtv-database</code>
 +
##<code>sudo dpkg-reconfigure mythtv-common</code>
 +
#Did you import the default table: <code>mysql -u root -p < /usr/share/mythtv/mc.sql</code>
 +
 
 +
==Reduce GRUB boot time==
 +
 
 +
Edit the file /boot/grub/menu.lst and find the section:
 +
 
 +
{{Code box|/boot/grub/menu.lst|
 +
<pre><nowiki>
 +
## timeout sec
 +
# Set a timeout, in SEC seconds, before automatically booting the default entry
 +
# (normally the first entry define).
 +
timeout 5
 +
</nowiki></pre>
 +
}}
 +
 
 +
and change this to read:
 +
 
 +
{{Code box|/boot/grub/menu.lst|
 +
<pre><nowiki>
 +
## timeout sec
 +
# Set a timeout, in SEC seconds, before automatically booting the default entry
 +
# (normally the first entry define).
 +
#timeout 5
 +
timeout 1
 +
</nowiki></pre>
 +
}}
 +
 
 +
===Auto Login===
 +
 
 +
NOTE: Newer (0.20.2 and later?) versions of MythTV seem to put the mythtv user's home directory in /var/lib/mythtv ... please check this (run 'pwd' immediately after logging in to note your current directory), and change the appropriate entries below accordingly.
 +
 
 +
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
 +
 
 +
to read
 +
 
 +
  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:
 +
 
 +
{{Code box|/home/mythtv/.profile|
 +
<pre><nowiki>
 +
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
 +
while [ 1 == 1 ]
 +
        do
 +
                startx
 +
                sleep 10
 +
        done
 +
fi
 +
</nowiki></pre>
 +
}}
 +
 
 +
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.
 +
 
 +
 
 +
 
 +
[[Category:Distribution_Specific_Install_Guides]]

Latest revision as of 18:58, 12 November 2009

This is a Tutorial to install MythTV on a Debian GNU/Linux 4.0 ('etch') machine.

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.

  1. Boot the target PC from the Debian CD
  2. At the Debian Boot Screen, hit enter
  3. Choose your preferred language, Country or Region, and Keyboard Layout
  4. Choose a servername and domain
  5. Accept automatic partition changes
  6. Install GRUB to the MBR
  7. Reboot
  8. Debian starts its post install configuration routine
  9. Choose your Time Zone
  10. IMPORTANT: do not use the username "mythtv". The user "mythtv" is reserved for use by mythtv
  11. Enter your new root password and the information for your new user account
  12. Add ftp.debian.org
  13. Make sure that only Base or Standard System is checked
  14. The Debian Netinst installer should now leave you with a login screen

MythTV Installation and Configuration

MySQL

Become root

 su

Install the mysql server:

apt-get install mysql-server

Set the mysql root user password:

mysqladmin -u root password yourpasswordhere

Sound

Install ALSA:

apt-get install alsa-base alsa-utils libesd-alsa0

Configure your sound card by entering the command:

alsaconf

IvTV driver packages

This section is only necessary if you need ivtv for your TV Tuner. First, edit your /etc/apt/sources.list file by adding 'contrib' to the end of each relevant source line, so that the lines look something like this:

 deb http://ftp.debian.org/debian etch contrib
 deb-src http://ftp.debian.org/debian etch contrib

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. This can be verified by running the 'uname -r' command and noting the version displayed.)

 apt-get install ivtv-utils ivtv-modules-`uname -r` linux-source-2.6.18 linux-headers-`uname -r` module-assistant

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

 modprobe ivtv

Please note: Debian GNU/Linux 4.0 comes with IVTV version 0.8.2. If for some odd reason you need newer IVTV drivers, then the two options are:

1) Grab the latest greatest out-of-the-box packages from 'sid'.

2) Build the IVTV drivers from source as described on the IVTV wiki page

Both are not explained in detail over here.

If you've configured your own, newer, kernel, you might benefit from this thread over at linuxquestions.org: [1].

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.

Getting MythTV

Out-of-the-box packages

Add the MythTV sources to /etc/apt/sources.list accordingly (please use a nearby mirror):

Architecture : alpha | amd64 | hppa | i386 | ia64 | powerpc | sparc

Australia

deb http://deb.samad.com.au/multimedia/ stable main
deb-src http://deb.samad.com.au/multimedia/ stable main

Belarus

deb http://ftp.mgts.by/debian-multimedia/ stable main
deb-src http://ftp.mgts.by/debian-multimedia/ stable main
deb ftp://ftp.mgts.by/debian-multimedia/ stable main
deb-src ftp://ftp.mgts.by/debian-multimedia/ stable main

Belgium

deb ftp://mirrors.powersource.cx/pub/debian-multimedia/ stable main
deb-src ftp://mirrors.powersource.cx/pub/debian-multimedia/ stable main

Brasil

deb http://www.las.ic.unicamp.br/pub/debian-multimedia stable main
deb-src http://www.las.ic.unicamp.br/pub/debian-multimedia stable main
deb http://linorg.usp.br/debian-marillat/ stable main
deb-src http://linorg.usp.br/debian-marillat/ stable main
deb ftp://linorg.usp.br/debian-marillat/ stable main
deb-src ftp://linorg.usp.br/debian-marillat/ stable main

Canada

deb http://debian.dc-uoit.net/debian-multimedia/ stable main
deb http://gulus.usherbrooke.ca/pub/distro/debian/debian-multimedia/ stable main
deb-src http://gulus.usherbrooke.ca/pub/distro/debian/debian-multimedia/ stable main
deb ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main
deb-src ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main

Denmark

deb http://debian.three-dimensional.net/debian-multimedia stable main
deb-src http://debian.three-dimensional.net/debian-multimedia stable main

El salvador

deb http://debian.ues.edu.sv/debian-multimedia/ stable main
deb-src http://debian.ues.edu.sv/debian-multimedia/ stable main

France

deb http://mirror.home-dn.net/debian-multimedia stable main
deb-src http://mirror.home-dn.net/debian-multimedia stable main
deb http://debian-multimedia.gnali.org stable main
deb-src http://debian-multimedia.gnali.org stable main
deb http://debian-multimedia.yolker.be stable main
deb-src http://debian-multimedia.yolker.be stable main

Germany

deb http://debian-multimedia.dfoell.org/ stable main
deb-src http://debian-multimedia.dfoell.org/ stable main
deb http://debian-multimedia.informatik.uni-erlangen.de/ stable main
deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia stable main
deb-src http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia stable main
deb http://debian-mirrors.sdinet.de/debian-multimedia stable main
deb http://debian.netcologne.de/debian-multimedia.org stable main
deb-src http://debian.netcologne.de/debian-multimedia.org stable main
deb ftp://debian.netcologne.de/debian-multimedia.org stable main
deb-src ftp://debian.netcologne.de/debian-multimedia.org stable main
deb http://honk.physik.uni-konstanz.de/mirror/www.debian-multimedia.org stable main
deb-src http://honk.physik.uni-konstanz.de/mirror/www.debian-multimedia.org stable main
deb http://debian.ids-services.de/debian-multimedia/ stable main
deb-src http://debian.ids-services.de/debian-multimedia/ stable main
deb http://ftp.uni-kl.de/debian-multimedia/ stable main
deb-src http://ftp.uni-kl.de/debian-multimedia/ stable main
deb ftp://ftp.uni-kl.de/debian-multimedia/ stable main
deb-src ftp://ftp.uni-kl.de/debian-multimedia/ stable main

Great Britain

deb http://debian-multimedia.fx-services.com/ stable main
deb-src http://debian-multimedia.fx-services.com/ stable main

Greece

deb ftp://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
deb-src ftp://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
deb http://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
deb-src http://ftp.hol.gr/pub/mirror/debian-multimedia.org stable main
deb http://ftp.duth.gr/debian-multimedia/ stable main
deb-src http://ftp.duth.gr/debian-multimedia/ stable main
deb ftp://ftp.duth.gr/debian-multimedia/ stable main
deb-src ftp://ftp.duth.gr/debian-multimedia/ stable main

Ireland

deb http://floating3.ucd.ie/debian stable main
deb-src http://floating3.ucd.ie/debian stable main
deb http://ftp.heanet.ie/mirrors/debian-multimedia/ stable main
deb-src http://ftp.heanet.ie/mirrors/debian-multimedia/ stable main

Italia

deb http://mi.mirror.garr.it/mirrors/debian-multimedia stable main
deb-src http://mi.mirror.garr.it/mirrors/debian-multimedia stable main
deb ftp://mi.mirror.garr.it/mirrors/debian-multimedia stable main
deb-src ftp://mi.mirror.garr.it/mirrors/debian-multimedia stable main

Portugal

deb http://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
deb-src http://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
deb ftp://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
deb-src ftp://ftp.eq.uc.pt/software/unix/Linux/debian-multimedia/ stable main
deb http://neacm.fe.up.pt/debian-multimedia/ stable main
deb-src http://neacm.fe.up.pt/debian-multimedia/ stable main
deb ftp://neacm.fe.up.pt/debian-multimedia/ stable main
deb-src ftp://neacm.fe.up.pt/debian-multimedia/ stable main

Russia

deb http://debian.nsu.ru/debian-marillat/ stable main

Slovakia

deb http://ftp.tuke.sk/debian-multimedia/ stable main
deb-src http://ftp.tuke.sk/debian-multimedia/ stable main
deb ftp://ftp.tuke.sk/debian-multimedia/ stable main
deb-src ftp://ftp.tuke.sk/debian-multimedia/ stable main

Sweden

deb http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
deb-src http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
deb ftp://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
deb-src ftp://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia stable main
deb http://ftp.acc.umu.se/mirror/debian-multimedia stable main
deb-src http://ftp.acc.umu.se/mirror/debian-multimedia stable main

Taiwan

deb http://ftp.tw.debian.org/debian-multimedia/ stable main
deb-src http://ftp.tw.debian.org/debian-multimedia/ stable main

Architecture : i386 only France

deb http://www.dedale.eu.org/mirror/debian-multimedia/ stable main
deb-src http://www.dedale.eu.org/mirror/debian-multimedia/ stable main

Switzerland

deb http://debian.mxchange.org/debian stable main

Ukraine

deb ftp://ftp.linux.kiev.ua/pub/mirrors/www.debian-multimedia.org/ stable main
deb-src ftp://ftp.linux.kiev.ua/pub/mirrors/www.debian-multimedia.org/ stable main

Main Repository

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
apt-get update

Now you can instal 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 on building MythTV 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:

svn co http://cvs.mythtv.org/svn/trunk/mythtv

This creates a folder called mythtv where the actual sources are in.

cd mythtv

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.

Starting MythTV

Set the mythtv user's password:

 passwd mythtv

Log in as the mythtv user, then start an X session:

 startx

Open up XTerm and run the MythTV Setup program:

 mythtv-setup

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:

 mythfilldatabase

Additional (and Optional) MythTV System Configuration

Can't watch tv?

  1. Try cat /dev/video0 >/tmp/somefile.mpg
  2. Try cat /var/log/dmesg |grep tv
  3. Do you need to put the ivtv firmware in /usr/lib/hotplug/firmware
  4. Check MySQL ports used by MythTV. Like the guides say, you will probably not need to change this. Don't worry that the ports listed in MySQL setup is different from the ones here.
  5. Check MythTV directory permissions.
  6. Did you change the mysql password for root or mythtv?
    1. rm ~/.mythtv -rf && rm /home/mythtv/.mythtv -rf && rm /var/lib/.mythtv -rf
    2. sudo dpkg-reconfigure mythtv-database
    3. sudo dpkg-reconfigure mythtv-common
  7. Did you import the default table: mysql -u root -p < /usr/share/mythtv/mc.sql

Reduce GRUB boot time

Edit the file /boot/grub/menu.lst and find the section:


Script.png /boot/grub/menu.lst

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry define).
timeout 5

and change this to read:


Script.png /boot/grub/menu.lst

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry define).
#timeout 5
timeout 1

Auto Login

NOTE: Newer (0.20.2 and later?) versions of MythTV seem to put the mythtv user's home directory in /var/lib/mythtv ... please check this (run 'pwd' immediately after logging in to note your current directory), and change the appropriate entries below accordingly.

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

to read

 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:


Script.png /home/mythtv/.profile

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
while [ 1 == 1 ]
        do
                startx
                sleep 10
        done
fi

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:

  1. 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.
  2. The xset line is disabling your screen saver and/or screen blanking. This is completely optional.
  3. 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.
  4. 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).
  5. The wmpid line is waiting for Fluxbox to close. This line is not optional without reworking this file.