How to run
Installation on Debian Whezzy
apt-get install wkhtmltopdf
wkhtmltopdf --title "$SUBJECT" -q $SOURCEFILE $OUTPUTFILE
QXcbConnection: Could not connect to display
This is a bug, and the fix hasn't been brought to the Debian repositories. Quoting ashkulz (who closed the bug report) :
You're using the version of wkhtmltopdf in the debian repositories, which does not support running headless.
So you can either...
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?