Rhythmbox 3.0 and getting plugins to work

Rhythmbox 3 has been released and brings much needed changes around stability.

saucy ubuntu [Running] - Oracle VM VirtualBox_002

RB3 has been fully updated with python 3 but more importantly has dropped gstreamer 0.10 support in favour of gstreamer1.0

In english – this means, dropping the old buggy music media layer for the newer well maintained music layer.  Hurray and about time!

There is a but though – almost all the external plugins that were available will not work out of the box.

If you are an aspiring python developer here is your chance.  Some tips to get plugins working.

First things first:

Look for the .plugin file  – edit the file and change the line that reads “Loader=python” and change it to read “Loader=python3”.  What this does is force rhythmbox to recognise its a python3 plugin and hence try to run it.  For simple plugins, this is likely to be the only thing you need to do.

Converting to python3:

If the above doesnt work (the plugin will not activate successfully), then its likely due to be a python2 issue.  Again, help is on hand.

Within the plugin folder, run the following:

2to3 -w *.py

What this does is run through all the code looking for common python2 incompatibilities and converts them to python3 equivalents.

More advanced stuff:

Start rhythmbox from a terminal and deactivate all plugins except the plugin you are  interested in. Shutdown and restart.  Examine the terminal for errors (if necessary, you may have to continually reactivate the plugin).  Often you will see what the error is.  Most issues I found were around using unicode and iterator lists.

I have written a compatibility API layer for Coverart-browser which has been used by several developers.  It contains several python2 to python3 functions – if you change the incompatible code to use these functions, then the plugin becomes both python2 & python3 compatible i.e. your plugin can remain compatible with older RB versions as well as the latest.

Grab a copy from my Github repo – give the file a unique name i.e. dont call it “coverart_rb3compat.py” !

Common issues are explained in this fantastic porting guide.  This link is also a valuable reading material.

Good luck – lets get those legacy plugins converted.


10 thoughts on “Rhythmbox 3.0 and getting plugins to work

  1. I’m using 3.3, in Linux Mint 18, and can’t enable your plugins.

    The error is:

    (rhythmbox:8295): libpeas-WARNING **: Error initializing Python Plugin Loader: PyGObject initialization failed
    ImportError: could not import gobject (error was: ImportError(“No module named ‘gi'”,))

    (rhythmbox:8295): libpeas-WARNING **: Please check the installation of all the Python related packages required by libpeas and try again

    (rhythmbox:8295): libpeas-WARNING **: Loader ‘python3’ is not a valid PeasPluginLoader instance

    I don’t see why I would need to run this 2to3 command, given that I’m using the xenial list to get your plugins. I can’t figure out if my problem is due to a problem with my python install. I have 2.7, 3.4, and 3.5 installed (3.4 was installed when I was using Linux Mint 17.3, and when I upgraded to 18 it installed python3.5 but didn’t remove 3.4…). I’ve tried reinstalling a bunch of python, python3, and libpeas packages, but nothing is working. Any clue?

    • Looks like you messed up your python installation – I’m surprised not more of your desktop is broken. Check that python3-gi is installed – try a force reinstall “sudo apt install –reinstall python3-gi”

      • Thanks. Yeah, it does seem that way. But in every other respect, python is still fine on my system. It’s pointing to the default version (which I guess is still 2.7 for linux mint 18).

        If I install gi using pip3, it installs it in python3.5/site-packages. But then rhythmbox produces a different error, relating to syntax in the __init__.py file (which I think is a way of saying that it’s a 2.x file sitting in a 3.x directory). So, clearly something is a little futzed! I’ll keep hammering at it.

  2. Man O Man, exactly what I was looking for.. I recently updated to Fedora 20 and was dejected to find my private plugin not starting up. I’m yet to try what you’ve suggested but thanks for clearing things up.

  3. Pingback: How to install Rhythmbox 3.0 in Saucy | xpress-ubuntu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s