OK, I've been asked several times for help with installing MythTV on OpenSUSE. So, here's a rough guideline on the method I've used to get it up and running. This was written for MythTV 0.19 originally, I've modified it for the 0.20 release. This also assumes you've gotten the Smart package manager up and running.
Installing the SoftwareFirst we'll need to install MythTV and MySQL (see my
earlier post on installing smart)
Assuming you have the packman channel working and updated, all you need to do is run
smart install mytharchive mythbrowser mythcontrols mythdvd mythflix mythgallery mythgame mythmusic mythnews mythphone mythplugins myththemes mythtv mythtv-backend mythtv-frontend mythtv-setup mythtv-themes mythvideo mythweather mythweb
I've listed all the available packages here. Some may have pre-requisite packages which you may or may not be able to install. Adjust the list as needed.
Configuring MySQLOK. Now that they're installed, you'll need to configure MySQL (which should be installed as a pre-req, if it's not already installed). Of course, if you've already configured MySQL, continue on to the database setup.
First of all we'll enable the MySQL service as it needs to be running on boot. We do so by issuing the command
sudo /sbin/chkconfig mysql on
and then we start it ourselves (unless you really want to reboot) by running
sudo /etc/init.d/mysql start
At this point it suggest that you setup some passwords. It's a really good idea to do so, so follow the on screen prompts.
Configuring the databaseThis bit is pretty easy, but it took me a while to find it in the docs as I found it easy to overlook. Just remember, when prompted for a password, you'll need to use the MySQL password you set above. You will now need to run
mysql -u root -p < /usr/share/doc/packages/mythtv/database/mc.sql
There, that's it. Wasn't so hard, was it.
Creating the directoriesI prefer to run most of my stuff out of /opt. It's personal preference but this is how I've done it. I've set up the following directories
/opt/mythtv
/opt/mythtv/recordings
/opt/mythtv/music
/opt/mythtv/pictures
/opt/mythtv/games
/opt/mythtv/posters
/opt/mythtv/temp
/opt/mythtv/video
For those not familiar with the Linux command line, this is done by running these commands
sudo mkdir -p /opt/mythtv/{recordings,music,pictures,games,posters,dvd,temp,video}
sudo chown -R mythtv:users /opt/mythtv
sudo chmod g+ws /opt/mythtv
sudo chmod g+ws /opt/mythtv/*
This allows the directories and any files created in them to be read by all users and written to by the mythtv user. (OK, so users can write as well, it's easier that way)
Creating a channels.confUnfortunately in MythTV 0.19, the channel scanning was somewhat, broken. At least with my setup I couldn't reliably get any channel information into myth without resorting to the following method. This is fixed in MythTV 0.20 so you probably won't need to worry about it, but, I'll keep the information here just incase it's needed by someone.
If the dvb package is not installed already, install it now
smart install dvb
Now run the following command, substituting your au-canberra with your location.
dvbscan /usr/share/dvb/scan/dvb-t/au-canberra > /opt/mythtv/channels.conf
MythTV SetupThe time has arrived, now you actually get to run a MythTV command. Took long enough.
PLEASE NOTE: These are pretty much copy and paste instructions made for MythTV 0.19. Version 0.20 has changed a little. If there's enough interest, I may update these to make it a bit clearer for the newer version. At this point in time, the only things I can remember I've changed are the GL rendering options and using the inbuilt channel scanner to find the channels. These are the settings I've used for here in Canberra, Australia. Other areas/countries may require different settings.
To start the setup, just run
mythtvsetup
When prompted, select your language
Change the database settings if necessary (worked straight away for me). The settings are in the 1. General section
1. GeneralThe first general screen shows the database configuration, make any necessary changes and select next
Set the directory to hold the recordings (/opt/myth/recordings)
click next
Change TV format to PAL
Change VBI format to PAL teletext
change channel frequency table to australia
click next
click next
click next
Change the number of jobs to 4 (just guessing, but gotta be better than one)
click next
set start auto-commercial flagging jobs to on
click next
setup any other jobs you want
click finish
2. Capture CardsSelect New Capture Card
Change card type to DVB DTV capture card (v3.x)
You should see the Frontend ID display the card
Adjust time outs if necessary (I've set mine to 1000, 5000)
Select Recording Options
Check Open DVB card on demand (This will allow the card to be used by other applications when not in use by myth)
3. Video SourcesSelect New Video Source
Enter the name
Select the XMLTV Listings Grabber (Australia/tv_grab_au)
Select Finish
You will see an error regarding the listings. Ignore this for now as it's not installed yet.
4. Input connectionsSelect the DVB device setup in step 2
Set the name
Select the source created in step 3
click scan for channels
NB: you should be able to do a full scan now, if it doesn't work use the method below.
change the scan type to import channels.conf
enter the location of the channels.conf created above (/opt/mythtv/channels.conf)
click next
click finish
select a starting channel if you wish
click finish
5. Channel EditorLeave this until we've got the XMLTV stuff working. This took me a little while to get sorted, but now I've done it, it's pretty simple. However, this will be the subject of another article.
At this point, if you try starting the backend, you'll get an error. You'll need to get the empty configuration file ready (aaarrrgh!)
sudo mkdir /etc/mythtv
sudo touch /etc/mythtv/mythbackend
sudo /etc/init.d/mythbackend start
Now you should be able to run mythfrontend and try it out...
I hope this has helped someone.