Archive for June, 2011

How I installed Songbird 1.9.3 on Natty

Tuesday, June 7th, 2011

I used to use iTunes as my music player, and I guess when I first switched to Ubuntu in 2008 (running Hardy) I wanted to migrate my iTunes library rather than just starting from scratch (so I wouldn’t lose my play counts and such).  I ended up stumbling upon Songbird, and managed to migrate my iTunes library through a convoluted process of copying my iTunes library from my Mac to Windows, migrating that library to Songbird, and then copying that library to Ubuntu.  I think I had to do some SQL magic to get the file paths updated (Songbird on Windows notably made all the paths lowercase in the SQLite database, so part of this process involved renaming all of my music to be entirely lowercase.)

I recently built my Natty machine and wanted to keep my metadata alive, and here is how I managed to migrate my Songbird library from 0.7.0 to 1.9.3.

To get Songbird

Add getdeb to repositories (

wget -q -O - | sudo apt-key add -
sudo sh -c ‘echo “deb natty-getdeb apps” >> /etc/apt/sources.list.d/getdeb.list’

Then install songbird

sudo apt-get update
sudo apt-get install songbird

Migrating the database from 0.7.0 to 1.9.3

I doubt there are many people who want to do this, but if you’re one of the few who are in this situation, hopefully this will help you out.

This will involve the old Ubuntu installation, the new Ubuntu installation, and a Windows machine.

Open Songbird 1.9.3 to get a fresh database on the new machine.
On the 0.7.0 machine, the database is located in ~/.songbird2/xxxxxxxx.default/db
Unfortunately, copying that db folder directly to 1.9.3 on the new machine didn’t work; it gave an error while attempting to upgrade but didn’t give any details

I was able to upgrade by dropping it into a Windows version of Songbird 1.9.3. After installing Songbird, copy the db folder from the old Ubuntu machine to the Songbird data folder on the Windows machine. (On Windows XP, the database is stored at C:\Documents and Settings\username\Application Data\Songbird2\Profiles\xxxxxxxx.default\db\) Run Songbird on the Windows machine - after running the upgrade wizard the music should be listed (it probably won’t play because the paths will be wrong, but that’s not necessary to make this work).

Once upgraded by Windows, close out of Songbird and go back to the new Ubuntu machine running Songbird 1.9.3.

Go to the ~/.songbird2/xxxxxxxx.default directory and rename the db directory to something else (like db_bak). Copy over the upgraded db directory from the Windows installation.

There are a couple more tweaks that needed to be done to make Songbird happy.

Install sqlitebrowser if you don’t already have it:

sudo apt-get install sqlitebrowser

It will be found in Applications > Programming.

Open the fresh 1.9.3 songbird database (db_bak/, go to the Browse Data tab, and in the library_media_item table, copy the text in the guid field.

Open the upgraded database with your data (db/, go to the Browse Data tab:

  • in the library_media_item table, double click on the GUID entry and replace it with the one you copied.
  • in the library_metadata table, in the record with name=’resource-guid’, replace the “value” with the GUID you copied
  • Save the database.

Finally, in the db directory, delete I found that if this wasn’t done songbird will lock up.

At this point I was able to open Songbird and see my library. While I was trying to figure this out I did do one more thing which may or may not have been necessary, so don’t do this if it’s already working. It looks like playlists in the media_items contain the old GUID in the content_url field, so I replaced them on the Execute SQL tab with:

UPDATE media_items SET content_url = replace(content_url, ‘old-guid‘, ‘new-guid‘) WHERE content_url LIKE ‘%old-guid%’;

Where old-guid is the GUID from the old database and new-guid is the GUID you copied from the fresh database.

Unfortunately I still haven’t found a way to get minimizing to the notification area to work with Songbird 1.9.3 on Natty, which I had working with Firetray on my Hardy installation. (The latest version of Firetray appears to work with Firefox but not Songbird 1.9.3 - it seems that all of the hide on minimize/close functionality works except for actually showing the icon in the notification area.)  Songbird also doesn’t integrate with the volume control in the default indicator applet, so it’s not as friendly as using a music player that does. Hopefully I’ll figure out how to do it soon and post about it when that happens.

Mounting internal disks

Tuesday, June 7th, 2011


List disks/partitions:

sudo fdisk -l

List UUIDs

sudo blkid

Automatically mounting a drive on startup

Open fstab:

sudo gedit /etc/fstab

To mount my ext2 drive I pulled from my other computer, I added:

UUID=UUID_FROM_blkid /MOUNTPOINT ext2 relatime 0 2

Where UUID_FROM_blkid is the UUID retrieved using sudo blkid and MOUNTPOINT is the directory where you want the drive mounted.

Installing TrueCrypt on Natty

Tuesday, June 7th, 2011

I downloaded the standard 7.0a tar file from, extracted it and simply ran the script it contained.  TrueCrypt then appears in Applications > Accessories.

For reference, this note was displayed during setup:

Uninstalling TrueCrypt:

To uninstall TrueCrypt, please run ‘’

Getting embedded PDFs to work in Firefox

Tuesday, June 7th, 2011

The first post in this thread clearly explains it:

Though the post says you shouldn’t have to, I had to restart Firefox to get it to work, but that might have been because I had Firefox open when i installed mozplugger (best guess I have). Not a big deal at all.

I’ve noticed this sometimes shows the PDF embedded in the browser and sometimes opens a new evince window. Not a problem at all, but just strange.

Installing the Canon MG5220 printer/scanner

Tuesday, June 7th, 2011


Download drivers from
Extract, open a terminal window to extracted directory and run:

sudo ./

Caveat: I imagine this should work, but for some reason I didn’t actually do it this way. I actually manually installed the cnijfilter-common and cnijfilter-mg5200series packages for amd64.

Then plug the printer in and turn it on.

If it doesn’t automatically install:

Go to System > Administration > Printing
You may have to wait for a few seconds to it to show up.
Click the MG5220 and keep clicking next, it should find the drivers and install.

For scanning:
Download ScanGear MP from
Extract, open a terminal window to extracted directory and run:

sudo ./

Run “scangearmp” to execute

Disabling the annoying update manager popup

Tuesday, June 7th, 2011


If the update manager window is popping up, here’s how to restore it to the old, less annoying, behavior of showing an icon in the notification area:

gconftool -s --type bool /apps/update-notifier/auto_launch false

Switch workspaces when dragging a window to the edge of the screen

Tuesday, June 7th, 2011

With compiz installed:

System > Settings > CompizConfig Settings Manager
Desktop > Desktop Wall > Edge flipping tab
Edge Flip Move: should be checked

Enable numlock at startup

Tuesday, June 7th, 2011


It’s really annoying when NumLock isn’t turned on.  Of course, by default it is disabled on startup.  Here’s how to fix that:

Install numlockx by this command in terminal(Applications/Accessories/Terminal):

sudo apt-get install numlockx

edit /etc/gdm/Init/Default with your favourite editor:

sudo gedit /etc/gdm/Init/Default

add following above the last line which says exit 0:

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on

Installing desktop effects (compiz) in Natty

Tuesday, June 7th, 2011


sudo apt-get install compizconfig-settings-manager compiz-plugins-extra