How to run
Installation on Debian Whezzy
apt-get install wkhtmltopdf
wkhtmltopdf --title "$SUBJECT" -q $SOURCEFILE $OUTPUTFILE
QXcbConnection: Could not connect to display
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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...