Skip to main content

python wrapper for Xvfb and Xephyr

Project description

PyVirtualDisplay is a python wrapper for Xvfb_ and Xephyr_



Possible applications:
* GUI testing
* automatic GUI screenshot

Basic usages

Start Xephyr::

from pyvirtualdisplay import Display
xephyr=Display(visible=1, size=(320, 240)).start()

Create screenshot of xmessage with Xvfb::

from easyprocess import EasyProcess
from pyvirtualdisplay.smartdisplay import SmartDisplay
disp = SmartDisplay(visible=0, bgcolor='black').start()
xmessage = EasyProcess('xmessage hello').start()
img = disp.waitgrab()



* install Xvfb_ and Xephyr_.
* install setuptools_ or pip_
* optional: pyscreenshot_ and PIL_ should be installed for :mod:`pyvirtualdisplay.smartdisplay`
* install the program:

if you have setuptools_ installed::

# as root
easy_install PyVirtualDisplay

if you have pip_ installed::

# as root
pip install PyVirtualDisplay


sudo apt-get install python-setuptools
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo easy_install PyVirtualDisplay
# optional
sudo apt-get install python-imaging
sudo apt-get install scrot
sudo easy_install pyscreenshot


# as root
pip uninstall PyVirtualDisplay

.. _setuptools:
.. _pip:
.. _Xvfb:
.. _Xephyr:
.. _pyscreenshot:
.. _PIL:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyVirtualDisplay, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size PyVirtualDisplay-0.0.3.tar.gz (36.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page