utiso/dorkbot

Add instructions to README to run headless

BBerastegui opened this issue · 2 comments

Hi!

It's a common error that when trying to run this tool in a completely headless environment such as a VPS, people is getting the following errors from PhantomJS:

qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
Traceback (most recent call last):
  File "/usr/local/bin/dorkbot", line 11, in <module>
(...)

You may want to add the following to the README:

export QT_QPA_PLATFORM=offscreen

This will allow PhantomJS to run without the need to be attached to a display :D

jgor commented

Thanks for this information. This sounds like it may be a package-specific issue for certain distributions of phantomjs? We operate this in headless RHEL within docker python:3-slim containers, a pretty barebones environment, using the official tarball from the phantomjs site and have not encountered this error.

Maybe it's just affecting specific packages, but I'm not sure, sorry :/

Hope I helped at least the people looking for the same errors! Cheers!