sbvirtualdisplay
A customized pyvirtualdisplay for SeleniumBase.
What it is and what it does
sbVirtualDisplay is a thin wrapper around PyVirtualDisplay customized for SeleniumBase test automation. It creates a virtual X11 display on headless systems, allowing browser tests to run in a graphical environment even when no physical display is present. This is useful when browser headless modes are insufficient—for instance, Chrome's headless mode does not support extensions, so if you need to test with extensions on a headless Linux machine, a virtual display lets you run the browser in normal (non-headless) mode.
The package is pure Python with no runtime dependencies, making installation straightforward. It supports Python 3.8 through 3.13 and works on Linux, macOS, and Windows (though Xvfb, the underlying X11 virtual framebuffer, is the critical system requirement). Maintenance is dormant but stable; the codebase is marked Production/Stable.
Use it for:
- Running Selenium tests with Chrome extensions on a headless Linux CI/CD server where headless mode is not an option.
- Automating browser interactions in a containerized environment without a display manager.
- Testing browser UI behavior that requires a full graphical context rather than a headless rendering mode.
- Integrating with SeleniumBase test suites that need virtual display support for complex automation scenarios.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a virtual display wrapper for running browser automation tests in headless environments, particularly when browser headless modes are insufficient (e.g., for Chrome extensions).
Yes, if you need to run browser tests with extensions or require a full graphical context on a headless system and Xvfb is available. The low install friction, permissive license, and stable codebase make it a safe choice for this specific use case. Not necessary if your browser's native headless mode meets your needs or if you lack Xvfb on your target platform.
Install
sbvirtualdisplay on PyPI
pip
pip install sbvirtualdisplayuv
uv add sbvirtualdisplaypoetry
poetry add sbvirtualdisplayInstalling sbvirtualdisplay
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant, though the repository remains active with a recent commit on 2024-12-16. Suitable for stable, established use cases.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution. Safe for commercial and proprietary projects.
Quickstart
from sbvirtualdisplay import Display
display = Display(visible=0, size=(1440, 1880))
display.start()
# Run browser tests
display.stop()
# Or as context manager:
with Display(visible=0, size=(1440, 1880)):
# Run browser tests
Xvfb must be installed on the system (typically available on Linux; not native to macOS or Windows).
Verify before relying
- Whether Xvfb availability on macOS and Windows is practical or if this is Linux-only in practice despite classifier claims.
- Performance overhead of virtual display versus native headless browser modes in typical test scenarios.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 606 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 754,768/month — #5,142 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sbvirtualdisplay-1.4.0-py3-none-any.whl
Keywords: Xvfb, Xephyr, Virtual, Display, Linux, SeleniumBase
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
PyVirtualDisplayWraps Xvfb, Xephyr, and Xvnc to create virtual…
permissive · top 5,000 on PyPI
xvfbwrapperManages headless X11 virtual displays using…
permissive · top 5,000 on PyPI
pytest-xvfbA pytest plugin that automatically runs tests…
permissive · top 15,000 on PyPI
pyppeteerAutomates headless Chrome/Chromium browser…
permissive · top 5,000 on PyPI
vncdotoolvncdotool is a command-line VNC client that…
permissive · top 15,000 on PyPI
mycdpMyCDP provides autogenerated Chrome DevTools…
permissive · top 15,000 on PyPI
selenium-stealthModifies a Selenium Chrome WebDriver to evade…
permissive · top 15,000 on PyPI
seleniumbaseSeleniumBase is a browser automation framework…
permissive · top 5,000 on PyPI
zendriverZendriver is an async-first web automation…
agpl · top 15,000 on PyPI
seleniumSelenium provides Python bindings to automate…
permissive · top 1,000 on PyPI