Getting Canon PIXMA MP540 working in Ubuntu 12.04

Man, this has been a struggle. Getting the PIXMA MP540 to work for every new version of Ubuntu has been a lot of hit and miss. Now, with Ubuntu 12.04, the problem is back, even though Ubuntu appears to have built-in drivers. These do however print gibberish and we are still in the need of downloading Canon's official drivers. The downside with the official drivers is that they are outdated. Why can't they just open source them instead?

UPDATE: My previous method was not persistent and didn't behave nice with Apt. The method which solved it for me is found in this forum post.

In addition I had to push the following commands to set the correct permissions for the cups files:

sudo chown -hR root /usr/lib/cups/backend
sudo chown -hR root /usr/lib/cups/filter
sudo chgrp -hR root /usr/lib/cups/backend
sudo chgrp -hR root /usr/lib/cups/filter