Installing Xvfb in Centos 6-7

Xvfb, or X virtual frame buffer is needed by selenium and chromedriver or gekodriver, so it can srun via cron with your PC locked, or without your script taking focus from the user section

The Xvfb, or "X virtual frame buffer" will allow scripts and apps to run, within their own virtual x windows session. It allows you to write chromedriver scripts to do cool things on the web, and run them without them stealing focus in your local session.

# yum install -f chromedriver chromium xorg-x11-server-Xvfb
Example Python utilizing a virtual framebuffer:
#!/usr/local/bin/python
...
from selenium import webdriver  
from pyvirtualdisplay import Display  
display = Display(visible=0, size=(800, 800))  
display.start()  
---
#
outputdir = "/tmp"  
options = webdriver.ChromeOptions()  
options.binary_location = '/bin/google-chrome'  
service_log_path = "{}/chromedriver.download_tax_rates.log".format(outputdir)  
service_args = ['--verbose']  
driver = webdriver.Chrome('/bin/chromedriver',  
        chrome_options=options,
        service_args=service_args,
        service_log_path=service_log_path)

#open connection
# driver = webdriver.Chrome()
#open chrome to first page
driver.get('https://www.reiners.io')  
driver.close()  
display.stop()