In order to install MythTV 0.25 on Debian squeeze, backports must be included. These instructions mostly mimic installing MythTV 0.24, with some subtle changes. MythTV 0.25 is the last version of MythTV that is supported in Debian squeeze.
System should be prepared as described in Prepare Debian Base Install for MythTV
Modify apt sources
$ sudo nano /etc/apt/sources.list
Add a mirror to deb-multimedia to your apt sources list
/etc/apt/sources.list
...
deb http://<mirror/address> squeeze main
deb http://<mirror/address> squeeze-backports main
...
$ sudo aptitude update
$ sudo aptitude install deb-multimedia-keyring
$ sudo aptitude update
$ sudo aptitude dist-upgrade
If needed, place channel changer script in /usr/local/bin and test it
Install mythtv-frontend or mythtv; I also install xine, mplayer, and vlc, though you certainly may omit
$ sudo aptitude install <mythtv-frontend mythtv-themes|mythtv mythweb> mythtv-perl \
libcdio-utils libudf0 \
xine-ui vlc mplayer-gui
If you only installed mythtv-frontend, install the plugins that you want
$ sudo aptitude install mytharchive mythbrowser mythgallery mythgame mythmusic mythnetvision \
mythnews mythvideo mythweather mythzoneminder
If you want all of the plugins, simply invoke
$ sudo aptitude install mythplugins
For a slave backend, after installing mythtv, you will want to remove the mythconverg database.
$ mysql -u root
mysql> drop database mythconverg;
mysql> exit
Add appropriate users to mythtv group for proper access
$ sudo adduser <user> mythtv
Logout and logon again for group membership to be reflected
Run MythTV Setup (also available from the application menu)
$ mythtv-setup
1. General
2. Capture Cards
3. Video Sources (master backend only)
4. Input Connections
6. Storage Directories
Get listing data and channels for a couple of days
$ mythfilldatabase --max-days 2
Return to mythtv-setup and set starting channel
Start backend
$ sudo /etc/init.d/mythtv-backend restart
Check log file to ensure backend started
$ tail /var/log/mythtv/mythbackend.log
Install lircrc
$ cd .mythtv
$ cp <location of valid lircrc> ./lircrc
$ cd ..
$ ln -s .mythtv/lircrc .lircrc
Load channel icons
$ channel_icons.pl --find-missing
Start frontend (also available from the application menu)
$ mythfrontend
Setup system
Utilities/Setup -> Setup
Quit mythfrontend
Add key bindings - could run mythwelcome instead of mythfrontend
For lxde:
$ nano ~/.config/openbox/lxde-rc.xml
~/.config/openbox/lxde-rc.xml:
...
<keybind key="A-m">
<action name="Execute">
<command>mythfrontend</command>
</action>
</keybind>
<keybind key="A-x">
<action name="Execute">
<command>lxterminal</command>
</action>
</keybind>
<keybind key="C-A-BackSpace">
<action name="Execute">
<command>pkill xinit</command>
</action>
</keybind>
<keybind key="C-A-m">
<action name="Execute">
<command>pkill mythfrontend</command>
</action>
</keybind>
...
For openbox:
$ sudo nano /etx/xdg/openbox/rc.xml
/etc/xdg/openbox/rc.xml:
...
<keybind key="A-m">
<action name="Execute">
<command>mythfrontend</command>
</action>
</keybind>
<keybind key="A-x">
<action name="Execute">
<command>roxterm</command>
</action>
</keybind>
<keybind key="C-A-BackSpace">
<action name="Execute">
<command>pkill xinit</command>
</action>
</keybind>
<keybind key="C-A-m">
<action name="Execute">
<command>pkill mythfrontend</command>
</action>
</keybind>
...
Set autostart
For lxde:
$ cd ~/.config
$ mkdir autostart
$ cd autostart
$ ln -s /usr/share/applications/mythtv.desktop
For openbox:
$ nano ~/.config/openbox/autostart.sh
~/.config/openbox/autostart.sh:
# Run the system-wide startup script
. $GLOBALAUTOSTART
# launch mythfrontend; could run mythwelcome instead
( sleep 2 && mythfrontend > ~/.mythtv/mythfrontend.log 2>&1 ) &
Logout of X
If running gdm, start gdm config
- Security tab: enable automatic login
If not running gdm, install and configure rungetty, and create .xinitrc and .profile
$ sudo aptitude install rungetty
$ sudo nano /etc/inittab
/etc/inittab:
...
1:2345:respawn:/sbin/rungetty tty1 --autologin <user>
...
You will need to create an xinitrc. Two are provided here: a simple one which uses the X server as configured; the other automatically sets the resolution to 720p.
$ nano ~/.xinitrc
~/.xinitrc:
#!/bin/bash
# Simple xinitrc
xset -dpms
xset s off
exec openbox-session
~/.xinitrc:
#!/bin/bash
# Set resolution to 720p before starting openbox
TEMPFILE=/tmp/xrandr
xrandr --query > $TEMPFILE
XOUTPUT="$( cat $TEMPFILE | grep ' [Cc]onnected' | sed 's/\(.*\) [Cc]onnected.*/\1/' )"
[ -z "$( grep 1280x720 $TEMPFILE )" ] && {
xrandr --newmode "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
xrandr --addmode $XOUTPUT "1280x720"
}
rm $TEMPFILE
xset -dpms
xset s off
xrandr --size 1280x720
exec openbox-session
$ chmod +x ~/.xinitrc
$ nano ~/.profile
~/.profile:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
while [ 1 == 1 ]
do
startx
sleep 5
done
fi
Restart gdm or reboot to test