Skip to main content

pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc

Links:
Features:
  • python wrapper

  • back-ends: Xvfb, Xephyr, Xvnc

  • supported python versions: 2.5, 2.6, 2.7, 3.1, 3.2, PyPy

Known problems:
  • only a few back-end options are supported

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
with SmartDisplay(visible=0, bgcolor='black') as disp:
    with EasyProcess('xmessage hello'):
        img = disp.waitgrab()
img.show()

Installation

General

  • install Xvfb or Xephyr or Xvnc.

  • install pip

  • optional: pyscreenshot and PIL should be installed for smartdisplay submodule

  • install the program:

    # as root
    pip install pyvirtualdisplay

Ubuntu

sudo apt-get install python-pip
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo apt-get install tightvncserver
sudo pip install pyvirtualdisplay
# optional
sudo apt-get install python-imaging
sudo apt-get install scrot
sudo pip install pyscreenshot
# optional for examples
sudo pip install entrypoint2

Uninstall

# as root
pip uninstall pyvirtualdisplay

Download files

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

Source Distribution

PyVirtualDisplay-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file PyVirtualDisplay-0.1.1.tar.gz.

File metadata

File hashes

Hashes for PyVirtualDisplay-0.1.1.tar.gz
Algorithm Hash digest
SHA256 59630f194dbba072ce425e6c7c45d7d841b923fac4d45dce9c9e726cea77f59b
MD5 eee08cbfb959513bc5c376dbef13048b
BLAKE2b-256 b31414e725fff25c705627ff3082f1dbe82541b386a7dc8c57b6cf2519701131

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0

2 files

2.2

2 files

2.1

2 files

2.0

2 files

1.3.2

2 files

1.3

2 files

1.1

2 files

1.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.1

1 file

0.2

1 file

0.1.5

1 file

0.1.3

1 file

0.1.2

1 file

This release

0.1.1 This release

1 file

0.1.0

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

0.0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page