Run Pencil on Ubuntu 12.04 / 12.10

Pencil is simply the best (open) sketchy mockup solution on Ubuntu. However, as described on its download page, you cannot install it as a Firefox extension because it’s not compatible with the Firefox 18.x that comes with Ubuntu 12.04. The standalone version runs okay but some features such as export as PNG fails silently because of the same compatibility issue.

Turns out you don’t need to install the deb package provided on its website. Simply download the latest tar ball from the download page on google code, then download xulrunner (Mozilla runtime) from ftp.mozilla.org. I used the latest supported version: 16.0.2.

Now extract these to a preferred place, then add a file called pencil anywhere in your $PATH with the following content:

1
exec <somewhere>/xulrunner/xulrunner --app "<somewhere>/pencil-2.0.4/usr/share/pencil/application.ini"

then chmod +x pencil, done.