maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
653 stars 162 forks source link

No X server has been found and the xvfb-run binary could not be found, please install xvfb on your system #70

Closed DucNgn closed 3 years ago

DucNgn commented 3 years ago

Issue

I got an error when trying to run something simple just as webscreenshot -v google.fr

The error is:

❯ webscreenshot -v google.fr
webscreenshot.py version 2.94

[INFO][General] 'google.fr' has been formatted as 'http://google.fr:80' with supplied overriding options
[+] 1 URLs to be screenshot
[ERROR][http://google.fr:80] No X server has been found and the xvfb-run binary could not be found, please install xvfb on your system
[+] 0 actual URLs screenshot
[+] 1 error(s)
    http://google.fr:80

I verified that xvfb was installed on my system by doing:

❯ xvfb -help
use: X [:<display>] [option]
-a #                   default pointer acceleration (factor)
-ac                    disable access control restrictions
-audit int             set audit trail level
-auth file             select authorization file
-br                    create root window with black background
+bs                    enable any backing store support
-bs                    disable any backing store support
-c                     turns off key-click
c #                    key-click volume (0-100)
....

I'm running the python script inside a virtual environment. How should I fix this?

More information:

OS: MacOS Catalina

maaaaz commented 3 years ago

Hello, webscreenshot without an X server looks for xvfb-run https://github.com/maaaaz/webscreenshot/blob/16e5c2a7448a9cb3248074de287c30a86c6974b6/webscreenshot.py#L109

I don't know MacOS and I never tried webscreenshot on it.

You need to find a way to have xvfb-run on your system.