Have you try to use ?

export QT_QPA_PLATFORM=offscreen and and export QT_QPA_FONTDIR=/usr/share/fonts

Just add it in /usr/bin/phantomjs and I can run phantomjs headlessly.

On Sat, 19 Nov 2016 22:53:00 +0000 Ximin Luo <infini...@debian.org> wrote:
> There is more information here:
>
> https://github.com/ariya/phantomjs/issues/14240
>
> "If you compiled PhantomJS with X11 enabled, it will use XCB (X11) platform in runtime, which is not supported in headless environment. Instead of that you must build PhantomJS without X11 headers (dev packages installed)"
>
> Perhaps one solution would be to have the Debian QT/Webkit package offer a headless version, that this phantomjs package could link against?
>
> X
>
> Stéphane Railhet wrote:
> > Thanks about this explanation, hope this will be solved by upstream in
> > future releases.
> >
> > Best Regards,
> >
> > Stéphane Railhet
> > > On Wednesday, 9 March 2016 6:35:08 PM AEDT Stéphane Railhet wrote:
> > >> PhantomJS cannot run if there is no X server available whereas it should be
> > >> able to work headless since version 1.5.
> > > Unfortunately it can not be fixed in Debian. To achieve headless-ness
> > > upstream statically link with customised QT + Webkit. We don't want to ship > > > forks of those projects. It would be great to eventually convince upstream to
> > > use standard libraries.
> > >
> > > Meanwhile you can use "xvfb-run" from "xvfb" package.
> > >
> > > I'll update README.Debian to include a note about that.
> > >
> >
> >
> >
>
> --
> GPG: ed25519/56034877E1F87C35
> GPG: rsa4096/1318EFAC5FBBDBCE
> https://github.com/infinity0/pubkeys.git
>
>

--
David GUGLIELMI
Smile Outsourcing / Open Wide Outsourcing

Reply via email to