# Ubuntu – Pencil export page as PNG does not work

firefoxfirefox-extensionspencil

I was trying to use the latest Pencil (version 2.0.3) in Ubuntu 12.04, but the PNG exporting does not work, with Pencil working both inside and outside Firefox (which is 19.0.2).

The export page as PNG dialog asks for where to put the file but fails silently after that, and the export document using any HTML template gets you this dialog stalled forever:

How can I fix it?

UPDATE: Before trying this workaround, you may want to try the latest version provided by this community fork: https://github.com/prikhi/pencil/releases

This is a bug filed several times, and a workaround is available at: http://code.google.com/p/evoluspencil/issues/detail?id=170

The workaround is to use plain xulrunner to run Pencil instead of Firefox, then the problem disappears. You can download xulrunner from here, extract it somewhere and use it to run Pencil like this:

xulrunner --app /usr/share/pencil/application.ini --no-remote


The --no-remote is for xulrunner not to try to reuse an existing Firefox instance running. You may need to change the path to pencil's application.ini, depending how you have it installed.

If you have installed Pencil with the official .deb provided by Evolus here, you can follow these quick steps:

1. Open a terminal and turn into root:

sudo -i

wget -O - http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/16.0.2/runtimes/xulrunner-16.0.2.en-US.linux-x86_64.tar.bz2 | tar xjf - -C /opt
sed -i '/application.ini/ { s|^/usr/bin/firefox|/opt/xulrunner/xulrunner|; s/\$/ --no-remote/; }' /usr/bin/pencil