Install MythTV

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.

  1. 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.
    • If you have a proprietary graphics card driver that you installed earlier, you will need to complete the installation for it right now.
      • Nvidia: sudo nvidia-glx-config enable

      • ATI: sudo aticonfig --initial

  2. 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]
      Comment=Use this session to run MythTV
  3. Create a script, /usr/local/bin/ that will be spawned when you login to your MythTV session. Place these contents into that file:
    • gnome-screensaver
      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/ will be the place to add it.

  4. Be sure to set /usr/local/bin/ to be executable.

    • sudo chmod +x /usr/local/bin/
  5. Start gdm.
    • sudo /etc/init.d/gdm restart

      At the bottom left, choose Options. Pick "Select Session".


      When Given a list of sessions, choose Openbox.


      Login as the user created at installation, NOT mythtv. The mythtv user is only used for the backend process.


      You will be given an option to make this default. Choose "Just For This Session".


  6. Right click the desktop and choose the terminal.
    • Right click the desktop and choose "Terminal Emulator".


  7. Run gdmsetup.
    • sudo gdmsetup

      Gdmsetup is used 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)


  8. Next, add yourself and any other users that need MythTV acces to the mythtv group.

    • To add users to the mythtv group, use this command:

    # sudo usermod -a -G mythtv USERNAME
    • Where USERNAME is the name of the user you are adding to the mythtv group.
  9. Next, you need to edit the mysql configuration to allow outside hosts to connect:

    $ sudo nano /etc/mysql/my.cnf

    Look for the line that reads:

    • bind-address=

    and comment out that line by placing a # at the beginning.

    Then, restart mysql:

    $ sudo /etc/init.d/mysql restart
  10. Now it's time to set up MythTV

  11. Filling the Database

    The last step before starting the backend, is to fill the database with program guide data.

    # sudo mythfilldatabase

    Depending on the number of channels, the server load and the speed of your internet connection, this may take a few minutes.

  12. Start the Backend Server

    When The database fill is complete, the backend will automatically restart. Check to be sure it is running and that it started correctly:

    To check that the backend in now running:

    $ ps -p `cat /var/run/mythtv/`

    If you don't see output like:

    •   PID TTY          TIME CMD
      30711 ?        00:00:00 mythbackend

    then there was an error.

    Next, check the backend log file for obvious errors:

    $ more /var/log/mythtv/mythbackend.log

    Also, see Troubleshooting for more help.

  13. Right click the desktop and log out of the openbox session.
    • Right click the desktop and choose "Exit".


  14. Set the newly created MythTV session to be the default. This will make sure that on the next reboot, MythTV comes up by default.
    • At the bottom left, choose Options. Pick "Select Session".


      When Given a list of sessions, choose MythTV.


      Login as the user created at installation, NOT mythtv.


      You will be given an option to make this default. Choose "Make Default".


    • Note: at least one user had difficulties logging out of the openbox session to return to the login screen. If you encounter similar issues, you should try to first restart GDM.
      • Switch to virtual terminal 1 (CTRL-ALT-F1)
      • Login
      • Restart GDM
        • sudo /etc/init.d/gdm restart
      • If restarting GDM didn't work, reboot your machine to see if GDM comes up after the fresh boot.

MythTV/Install/Server/Backend_Frontend (last edited 2008-06-27 10:14:51 by localhost)