You are not logged in.

#1 2018-02-27 07:55:00

Qama
Member
Registered: 2018-02-18
Posts: 4

Unable to run X server on a remote VPS server using xvfb

My app uses the library https://github.com/wkhtmltopdf/wkhtmltopdf which requires X server. Here's a workaround:


echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf -q $*' > /usr/bin/wkhtmltopdf.sh
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
wkhtmltopdf http://www.google.com output.pdf

I've installed xvfb via pacman and followed the steps in the link. However, nothing has changed: it still returns an error

      wkhtmltopdf http://www.google.com output.pdf

===>

     "qt.qpa.screen: QXcbConnection: Could not connect to display :0.0"

Last edited by Qama (2018-02-27 07:57:04)

Offline

#2 2018-02-27 08:07:36

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Unable to run X server on a remote VPS server using xvfb

Wayland?

loginctl session-status

Offline

Board footer

Powered by FluxBB