Manage headless displays with Xvfb (X virtual framebuffer)
How to install xvfb on Ubuntu 16.04 (Xenial Xerus) Install xvfb Installing xvfb package on Ubuntu 16.04 (Xenial Xerus) is as easy as running the following command on terminal.
Info:
- Dev: https://github.com/cgoldberg/xvfbwrapper
- Releases: https://pypi.org/project/xvfbwrapper/
- Author: Corey Goldberg - 2012-2019
- License: MIT
About xvfbwrapper:
xvfbwrapper is a python module for controlling virtual displays with Xvfb.
What is Xvfb?:
Xvfb (X virtual framebuffer) is a display server implementing the X11 display server protocol. It runs in memory and does not require a physical display. Only a network layer is necessary.
Xvfb is useful for running acceptance tests on headless servers.
Install xvfbwrapper from PyPI:
System Requirements:
- X11 Windowing System
- Xvfb (sudo apt-get install xvfb, yum install xorg-x11-server-Xvfb, etc)
- Python 2.7 or 3.4+
Examples
Basic Usage:
Basic Usage, specifying display geometry:
Basic Usage, specifying display number:
Usage as a Context Manager:
Testing Example: Headless Selenium WebDriver Tests:
This test class uses selenium webdriver and xvfbwrapper to run test cases on Firefox with a headless display.
- virtual display is launched
- Firefox launches inside virtual display (headless)
- browser is not shown while tests are run
- conditions are asserted in each test case
- browser quits during cleanup
- virtual display stops during cleanup
Look Ma', no browser!
(You can also take screenshots inside the virtual display to help diagnose test failures)
Latest version Released:
run headless display inside X virtual framebuffer (Xvfb)
Project description
Manage headless displays with Xvfb (X virtual framebuffer)
Info:
- Dev: https://github.com/cgoldberg/xvfbwrapper
- Releases: https://pypi.python.org/pypi/xvfbwrapper
- Author: Corey Goldberg - 2012-2016
- License: MIT
About xvfbwrapper:
![How To Install Xvfb On Windows How To Install Xvfb On Windows](/uploads/1/2/6/3/126315529/712820167.png)
xvfbwrapper is a python wrapper for controlling Xvfb.
About Xvfb:
Xvfb (X virtual framebuffer) is a display server implementing the X11 display server protocol. It runs in memory and does not require a physical display. Only a network layer is necessary.
Xvfb is especially useful for running acceptance tests on headless servers.
Install xvfbwrapper from PyPI:
pip install xvfbwrapper
System Requirements:
- Xvfb (sudo apt-get install xvfb, or similar)
- Python 2.7 or 3.3+
Examples
![Install Install](https://www.howtoforge.com/images/chrome_remote_sharing_desktop_feature/big/9.png)
Basic Usage, specifying display geometry:
Testing Example: Headless Selenium WebDriver Tests:
The test class above uses selenium and xvfbwrapper to run each test case with Firefox inside a headless display.
- virtual display is launched
- Firefox launches inside virtual display (headless)
- browser is not shown while tests are run
- conditions are asserted in each test case
- browser quits during cleanup
- virtual display stops during cleanup
Look Ma’, no browser!
(You can also take screenshots inside the virtual display for diagnosing test failures)
Release historyRelease notifications
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size xvfbwrapper-0.2.9.tar.gz (5.6 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for xvfbwrapper-0.2.9.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | bcf4ae571941b40254faf7a73432dfc119ad21ce688f1fdec533067037ecfc24 |
MD5 | 3f3cbed698606f4b14e76ccc7b5dd366 |
BLAKE2-256 | 57b64920eabda9b49630dea58745e79f9919aba6408d460afe758bf6e9b21a04 |