I'm trying to find a Ubuntu operating system, version of xorg, and version of xvfb that are compatible. Can anyone help me with directions to install xvfb without getting a hang on Initializing build-in extension GLX
So far I've tried the following
Ubuntu 13 Server(No graphics card) sudo apt-get install xorg sudo apt-get install xvfb sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
I run the command xvfb :10
and it hangs on
Initializing build-in extension GLX
Are there specific versions I could download that will work or a operating system that would be compatible?
Xvfb (short for X virtual framebuffer) is an in-memory display server for UNIX-like operating system (e.g., Linux). It enables you to run graphical applications without a display (e.g., browser tests on a CI server) while also having the ability to take screenshots.
Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output.
Install Xvfb or Xephyr or Xvnc. Also install pyvirtualdisplay python module. This is for Ubuntu 14.04 and tested on 16.04 as well.
sudo apt-get install python-pip sudo apt-get install xvfb xserver-xephyr vnc4server sudo pip install pyvirtualdisplay # optional sudo apt-get install python-pil scrot sudo pip install pyscreenshot
Now you can start Xvfb from your python script. It will start Xvfb when your script will be executed. Add the following lines to your code.
from pyvirtualdisplay import Display display = Display(visible=0, size=(1366, 768)) display.start()
Here is the example code.
from pyvirtualdisplay import Display from selenium import webdriver display = Display(visible=0, size=(1366, 768)) display.start() browser = webdriver.Firefox() browser.get('http://www.google.com') print browser.title browser.quit() display.stop()
Here is what I do:
apt install xvfb
Xvfb&
xvfb-run someprogram
Source: http://realtechtalk.com/using_Xvfb_on_virtual_remote_ssh_server_to_have_X_graphical_programs_work-2287-articles
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With