Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications


What do most people have in common? They watch TV! In fact, if you're like most people you probably watch TV a lot. For this you need a pleasant and effective way to know in advance what's on TV, at what time and on which channel. This is a very common need, and different people use different solutions: the newspaper, a TV magazine or even some fancy applications running in their satellite decoder. You're different though, you use Linux. Therefore there's no reason why you should get your TV schedule the way everybody does. And you'll be happy to know that there is an easy way to set up your Linux box to do just that.

XMLTV

XMLTV is a great project. Just look at the name, "XML-TV", it's like a combination of one of the most geeky technologies and one of the most common things on Earth. In a way, it brings your imagination close to that fantasy shared among all computer enthusiasts: the use of domotics and intelligent appliances to automate everything you need in your house. But let's keep our feet on the ground, XMLTV is only going to do one thing for you, it'll bring you the TV schedule, and it's not going to make you coffee right? With that in mind, let's have a closer look at it.

At present XMLTV can grab TV listings for the following regions: Australia, Belgium and Luxembourg, Brazil, Britain and Ireland, Denmark, Estonia, Finland, France, Germany, Hungary and Romania, Iceland, Italy, Japan, Netherlands, North America, Norway, Portugal, Reunion Island (France), South Africa, Spain, Sweden, and Switzerland.

If "xmltv" is not present in your distribution's repositories you can find the source code as well as RPM and DEB packages for it on the project's website: http://xmltv.org/wiki/

Once installed on your system, you can use the scripts to download the TV listings for the geographical region you're interested in. XMLTV provides a collection of scripts which name starts with "tv_". The most important scripts are the one called "tv_grab_" and they are suffixed with the name of the region. For instance the script which grabs the TV listings for the UK is called "tv_grab_uk_rt". These scripts download the listings from the Internet and output the result in XML.

Before you can use tv_grab, you need to configure it. In this article we'll assume you're interested in the UK region. In a terminal, type the following:

tv_grab_uk_rt --configure

The script will present you the available TV channels from that region and you'll have to answer for each one whether or not you want to see the listings for this channel. Once you've gone through all the channels, it will save the configuration in ~/.xmltv/tv_grab_uk_rt.conf.

Once this is done, and tv_grab knows which channels you're interested in, you can use it to download the listings and save them as an XML file:

tv_grab_uk_rt > tv.xml

The resulting XML file contains your TV schedule in XMLTV format. All you need now is a GUI application to show you that data in a nice and pleasant way.

Maxemum TV-Guide

There are a few GUI applications on the Internet which are able to read XMLTV files. One of them is Maxemum TV-Guide (MTVG), which you can download as a TGZ archive, an RPM or DEB package from here: http://mtvg.sourceforge.net/

MTVG is developed in C++, based on Qt and it is the perfect solution if you use KDE. Alternatively, if you're using Gnome you can have a look at another XMLTV GUI application called OnTV: http://johan.svedberg.com/projects/coding/ontv/

Once you've installed and run MTVG you should see a screen like this one:

Press the "Preferences" button and fill the "Update" section to tell MTVG where to find the XML file and how to update its content:

As you can see in the above screenshots, you can tell tv_grab to run in quiet mode (for debug information not to be shown). Also, if you use the --days option you can tell tv_grab to only get the listings for a certain number of days. By default, tv_grab gets as much information as it can from its Internet source, so updates will be faster if you specify a number of days. Finally, check the "Auto Update" option to tell MTVG to update the listing automatically.

Press "Done", and "Update Now...". Once MTVG has finished updating the listings, the information appears on the screen:

By clicking on the adequate column you can sort the listings by time, title or channel. If you select an item, you'll see its description in the bottom pane. The two right panes allow you to filter by type of programs and by channel.

MTVG is also full of nice little features. For instance, it shows you which programs are already started and how long you have left until they finish. For instance, in the above screenshot, the "RTE Racing" program is 40% finished and there's only 1h33 left of it.

You can also search for programs and add them in your "favorite" list. When one of your "favorite" program is about to start MTVG notifies you with a popup dialog box or by running a command of your choice.

Conclusion

MTVG and XMLTV represent the perfect solution to get an updated TV schedule under Linux. It's fast, it's easy to configure and thanks to MTVG it's easy to browse and to use. You get notified for things you don't want to miss, the listings get updated automatically and, thanks to the way KDE sessions work, you can just take advantage of the MTVG system tray icon, have the application always run in the background and never think of it until you need it.

Rate This Article: poorexcellent
 
Comments about this article
TV Guide under Linux
writen by: Willie Buyoff on 2006-11-08 12:15:11
I guess this is a neat little application. I wouldn't really have much use for it. I really don't care what's on TV anywhere other than North America. Besides, if I really wanted to know what's on tv, why not go to tvguide.com?
RE: TV Guide under Linux written by Willie Buyoff:
TV Guide under Linux
writen by: Willie Buyoff on 2006-11-08 12:16:57
RE: TV Guide under Linux written by Willie Buyoff:
Settings for Japan
writen by: Alain on 2006-11-25 19:11:14
RE: Settings for Japan written by Alain:
HFGID
writen by: HDGFEF FHJDYFDFL on 2007-02-22 20:59:53
RE: HFGID written by HDGFEF FHJDYFDFL:
American Forces Network?
writen by: 67comet on 2007-08-14 03:58:04
I also live in Japan, but I use AFN (Armed Forces Network) provided by the US Mil and Mediatti Broadmand (Japanese Company). I can get the TV schedule off the internet, but it is in XML format only. May I convert that to XMLTV or similar so I can use my Media Linux Box and it's dormant PVR card to do more than record DVD/VCR stuff? Cheers, Justin
RE: American Forces Network? written by 67comet:
Isn't it well written!
writen by: lugoteehalt on 2008-12-13 04:25:17
The piece reads like something out of a magazine. For some reason I find this disconcerting. This is no critisism, I just don't quite know what to make of it all.
RE: Isn't it well written! written by lugoteehalt:

Comment title: * please do not put your response text here