Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

RadioTray icon applet is pretty neat and comes with a variety of predefined radio stations ordered by categories. To those I also added some additional local (Israeli) radio stations and ended up with few dozen.

In preparation for the coming Precise and the need to have one player for all, I would like to migrate this list to Rhythmbox.

The only thing I figured out so far is that the radio stations of Radio Tray are being kept in an XML file at @HOME/.local/share/radiotray/bookmarks.xml.

Any ideas how to import RadioTray stations into Rhythmbox?

share|improve this question
up vote 4 down vote accepted

enter image description here

The image shows the default RadioTray radio stations imported into Rhythmbox

How did I do that?

RadioTray holds its radio-stations in an XML file located in:


Rhythmbox holds all of its data similarly in an XML file located in:


If you examine both files its pretty obvious that the XML format (its defined structure) is very different.

One solution is to transform the Radiotray XML format to something that Rhythmbox can understand.


You can use the structured XML translation language XSLT to perform this conversion.

To install:

sudo apt-get install python-4suite-xml

Next copy the contents below into a new gedit file

Save in a file (create the folder xml if necessary) called ~/xml/style

Next, copy the RadioTray XML file to the same folder ~/xml

Finally, copy the Rhythmbox XML file to the same folder ~/xml

Drop to a terminal:

cd ~/xml
4xslt bookmarks.xml style > test.xml

This will reformat the RadioTray into the XML that can be read by RhythmBox

Next we need to add this new data to Rhythmbox.

Now open both test.xml and rhythmdb.xml

Copy the contents of test.xml EXCEPT for the first line into the rhythmdb.xml file. Note - you paste the contents at the end of the file i.e.


*****paste test.xml here*****



Backup the old rhythmdb.xml file and then copy over the new rhythmdb.xml file.

Fire up Rhythmbox

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">

<xsl:template match="/">

      <xsl:for-each select="bookmarks/group/group/bookmark">
      <entry type="iradio">
        <title><xsl:value-of select="@name"/></title>
        <genre><xsl:value-of select="translate(../@name,'','')"/></genre>
    <location><xsl:value-of select="@url"/></location>

share|improve this answer

Well, it is possible. But, it's not going to be a quick nor fun process.

You'll want to open bookmarks.xml with any program you want (I personally would use gedit) and open Rhythmbox as well. With Rhythmbox open, you'll want to right click "Radio" on the left panel and "New Internet Radio Station". You'll want to copy and paste the url of every radio station that you want to put into Rhythmbox. Then, you can rename them whatever you want to.

You'll have to do this for every one of the urls. It won't take too long, but it's tedious. :(

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.