Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python wrapper for Xvfb, Xephyr and Xvnc
Python

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
pyvirtualdisplay
tests
.gitignore
CHANGES.rst
LICENSE.txt
MANIFEST.in
README.rst
TODO
pavement.py
paver-minilib.zip
setup.py

README.rst

PyVirtualDisplay is a python wrapper for Xvfb and Xephyr

home: https://github.com/ponty/PyVirtualDisplay

documentation: http://ponty.github.com/PyVirtualDisplay

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()
xmessage.stop()
disp.stop()
img.show()

Installation

General

if you have setuptools installed:

# as root
easy_install PyVirtualDisplay

if you have pip installed:

# as root
pip install PyVirtualDisplay

Ubuntu

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

Uninstall

# as root
pip uninstall PyVirtualDisplay
Something went wrong with that request. Please try again.