wkhtmltopdf wkhtmltoimage: cannot connect to X server

13,636

I think you need to install xvfb (Virtual Framebuffer 'fake' X server):

apt-get install xvfb

Then in the terminal:

xvfb-run wkhtmltoimage --format png --quality 100 --no-debug-javascript --height 800 http://facebook.com/ fb.png
Share:
13,636

Related videos on Youtube

Jonas
Author by

Jonas

Updated on September 18, 2022

Comments

  • Jonas
    Jonas over 1 year

    I compiled wkhtmltopdf from source on Ubuntu 64bit server 10.04 as described in manual. When I try to convert it exits with an error message:

    wkhtmltoimage: cannot connect to X server
    

    There is X server installed but not running. If I download already built version it is working but sometimes throws "Segmentation fault" exception.

    So how to make compiled from source version work?