Skip to main content

pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc

Links:
Features:
  • python wrapper

  • supported python versions: 2.6, 2.7, 3.2, 3.3

  • back-ends: Xvfb, Xephyr, Xvnc

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

Metadata

Release files for PyVirtualDisplay 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyVirtualDisplay 0.1.5
File Size Uploaded Provenance Actions
PyVirtualDisplay-0.1.5.tar.gz 18.3 kB Without provenance Details for PyVirtualDisplay-0.1.5.tar.gz

Release files / PyVirtualDisplay-0.1.5.tar.gz

Download URL PyVirtualDisplay-0.1.5.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aa6aef08995e14c20cc670d933bfa6e70d736d0b555af309b2e989e2faa9ee53
BLAKE2b-256 checksum
How to use checksums
e6f069a401cffb5ce7b5f03890404bf541869c0db64084cf916d260d175c7414
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyVirtualDisplay 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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