Install MythTV
Believe it or not, the hard part of the install is done. The majority of the rest of the work should be handled by debian packaging.
A backend will need to have mysql-server installed as well as mythtv-backend. Mythtv-backend doesn't depend on mysql-server since the mysql server can be located elsewhere on your network. Also, if this is a secondary backend, don't install mythtv-database or mysql-server. Just configure this backend to connect to the master backend instead.
- Install the mythtv software.
sudo apt-get install mythtv-frontend gdm ubuntu-artwork xterm openbox gnome-screensaver xserver-xorg gsfonts-x11 xfonts-100dpi xfonts-75dpi msttcorefonts xfonts-base mysql-server mythtv-backend mythtv-database usplash-theme-ubuntu
- Behind the scenes, a mythtv user will be created in PAM as well as mysql. The database will be installed into mysql and the initial configuration performed.
- You may be asked to configure postfix. Choose the "no configuration" option to skip this, as you won't need postfix for this machine.
- You will be asked for the password to the root account of mysql. By default, there is no password.
Now, we will create a session for the automatic mythtv login. Create the file /usr/share/xsessions/mythtv.desktop. Place these contents into that file:
[Desktop Entry] Encoding=UTF-8 Name=MythTV Comment=Use this session to run MythTV Exec=/usr/local/bin/mythtv.sh Icon= Type=Application
- Create a script, /usr/local/bin/mythtv.sh that will be spawned when you login to your MythTV session. Place these contents into that file:
gnome-screensaver mythfrontend& exec openbox
- If you are running lirc and using irexec for any of your key detection, you probably also want to add this section. It will be sure that if X is ever restarted, irexec doesn't spawn multiple instances
killall irexec irexec -d
- If you are running an nvidia graphics card, you should add:
nvidia-settings -l
- If you are planning on running the myth transcoding daemon for ripping dvds, you will want to add:
mtd -d
If you come up with anything else for your custom startup script, /usr/local/bin/mythtv.sh will be the place to add it.
Be sure to set /usr/local/bin/mythtv.sh to be executable.
sudo chmod +x /usr/local/bin/mythtv.sh
- Start gdm. Choose openbox for your session. The login is very quick, almost instantaneous. Be sure to login as your normal user, and not the mythtv user (The mythtv user is only used to run mythbackend).
sudo /etc/init.d/gdm restart
Right click the desktop and choose the terminal. Run gdmsetup to configure an automatic login for your main user name (in this case superm1) as well as a time delayed login if you logout. This will make the bootup a lot more streamlined (especially for HTPC use)
sudo gdmsetup
attachment:gdmsetup.png
- Add your main username (and any other users you want to have access) to the mythtv group. This will allow you to read the file /etc/mythtv/mysql.txt on mythfrontend startup
sudo nano /etc/group
Include(MythTV/Install/Server/BackendDesktop/run-mythtv-setup)
- Right click the desktop and log out of the openbox session. At the gdm screen, switch the session to Mythtv. Login. When asked if you want mythtv as the default, hit yes. Now, when restarting your machine, mythtv should come right up.