Monday, June 29, 2009

Installing and tuning the Mumbles notifier in Ubuntu Jaunty

Ubuntu 9.04 is working very well on my MacBook but I like to experiment. I came across Mumbles in this Lifehacker post and decided to try it out.
Actually, it seems that you must use mumbles-0.4.2 or later in Jaunty and the plugins must be compiled using Python 2.6.
This version is available here as a SVN checkout and requires no further setup or configuration.
Unfortunately, very few plugins seem to be available for Mumbles and these include much that I don't use such as Rhythmbox, Evolution and Pidgin.
However, there is a plugin for Twitter and I found one for Gmail here. Because the deb package was compiled with Python 2.5, it won't work in Jaunty. So, you need to download the source and build the plugin within Jaunty. This will provide GmailMumbles-0.1-py2.6.egg which you then must copy (or move) to ~/mumbles0.4-branch/src/plugins.
Next grab the script called gmail.py from the untarred package here, make it executable and open it in a text editor to change the Gmail user and password in the Options section of the script.
You can now run the script with this command

python gmail.py

and if you send yourself an email, you should get (within 2 minutes) a pop-up notification.
To get this to startup at boot, I wrote a small bash script to include in Ubuntu's Startup Applications and this works fine. The script is:
#!/bin/bash
cd /home/paul
sleep 30
python gmail.py

Note that the script didn't work for me without the 30 second delay although perhaps it would have been better to put the sleep before the cd command.
Then I came across a patch that allows the notifications to be accompanied by a sound which is actually very useful. The patch is available here (download link using "Save Linked Content as.."
Then move it to ~/mumbles0.4-branch/src and apply the diff file as a patch using
patch -p1 <mumbles_notification_sounds.diff

Now restart mumbles and you should see a Enable Sound box in the Preferences dialog. If you remembered to install python-pgame as explained in the forum post and you've enabled sound, the next time you get an email you'll here a short but pleasant sound.
So now mumbles is starting to look good. However, one thing I don't like about the Gmail notification is that you need to be at your computer to know if you've got mail or not. If you come back after being away for a while there's no persistent indication of new mail as there is with Gmail-Notifier. So, you'll need to open Gmail to see if you've got any new mail.
Another thing is that Gmail-Notifier allows you to click on the tray applet which then shows you who the new mail is from. The mumbles version doesn't provide this facility.
I've also tried to get the mumbles Twitter notifier working but without much success up to now. Well, it works but it seems to grossly overestimate the number of new tweets. I think I know why but I'm not sure how to fix it.
But as it's getting late here I'm going to write about this tomorrow.

No comments:

Post a Comment