PyVirtualDisplay is python wrapper for Xvfb, Xephyr and Xvnc.
Questions tagged [pyvirtualdisplay]
82 questions
44
votes
2 answers
easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help'] OSError=[Errno 2] No such file or directory
I'm trying to setup a display but it's telling me No such file or directory.
Traceback (most recent call last):
File "/var/www/envs/venv/proj/scripts/my_file.py", line 44, in click
display = Display(visible=0, size=(800,600))
File…

User
- 23,729
- 38
- 124
- 207
23
votes
2 answers
How to video-record selenium tests running headless inside a docker?
I am running python-selenium tests inside a docker using a headless firefox.
During these tests I am able to make screenshots with the selenium method for screenshots - but can I use something to 'video' record the virtual display during the whole…

Alex
- 41,580
- 88
- 260
- 469
16
votes
1 answer
Is there a Windows equivalent to PyVirtualDisplay
I have written a web scraper for a mate to save him time at work. It is written in Python, using Selenium and opening a Firefox browser.
I have written this code myself on a Linux machine I use PyVirtualDisplay so Firefox doesn't actually open…

HenryM
- 5,557
- 7
- 49
- 105
12
votes
3 answers
How to avoid hanging Xvfb processes [while using PyVirtualDisplay]?
Trying to find how to avoid hanging Xvfb processes in our Python application, when using PyVirtualDisplay. The essential problem is that calling display.stop() (see code sample below) does not seem to properly shut down the Xvfb…

Juan Carlos Coto
- 11,900
- 22
- 62
- 102
11
votes
1 answer
How I can attach the mouse movement (pyautogui) to pyvirtualdisplay with selenium webdriver (python)?
I am trying to automatize a website how have a SWF inside.
I cant move the mouse with selenium, because is a SWF,so to fix this I use the pyautogui library.
Everything works fine!, but! when I use pyvirtualdisplay to hide the navigator the mouse is…

nguaman
- 925
- 1
- 9
- 23
8
votes
1 answer
Display not working with pyvirtualdisplay: "XStartTimeoutError: Failed to start X on display ":1001" (xdpyinfo check failed)"
I am using macOS Mojave and trying to run the following:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import optim
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from…

hi15
- 2,113
- 6
- 28
- 51
8
votes
1 answer
Headless script crashes after a few runs
I have a script using a headless browser which I'm running using crontab -e. It runs fine the first few times and then crashes with the following Traceback:
Traceback (most recent call last):
File "/home/clint-selenium-firefox.py", line 83, in…

HenryM
- 5,557
- 7
- 49
- 105
7
votes
1 answer
Selenium Pyvirtualdisplay Hangs on starting
I have a selenium test which I am trying to run Headlessly on my ubuntu server. It uses pyvirtualdisplay and xephyr. Though the script is running fine in my local system, it hangs when I run it in the server. I have tried to clear memory and…

Saheb
- 1,666
- 3
- 18
- 24
7
votes
1 answer
Python XVFB error in windows
For virtual Framebuffer (headless testing) I'm using Xvfb with PyVirtualDisplay and it's working fine in Ubuntu but showing error in Windows7. here is part of code where problem is occurring.
from pyvirtualdisplay import Display
display =…

Gaurav Jain
- 1,549
- 1
- 22
- 30
6
votes
0 answers
"[WinError 2] The system cannot find the file specified" Error using pyvirtualdisplay in python
I'm getting the following error when i try to run this simple python code
from pyvirtualdisplay import Display
disp = Display()
disp.start()
Error:
Traceback (most recent call last):
File "C:\Users\Saeed\Desktop\disp.py", line 4, in
…

Saeed
- 63
- 2
6
votes
2 answers
Selenium with pyvirtualdisplay unable to locate element
I have a working script that logs into a site using selenium like this:
script.py
from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(1024, 768))
display.start()
browser =…

PepperoniPizza
- 8,842
- 9
- 58
- 100
6
votes
3 answers
Xvfb - Browser window does not fit display
I'm trying to run a web browser in a virtual display, using the Python library pyvirtualdisplay, which relies on Xvfb. The problem is that I need that browser to be maximized, something I'm not achieving. I start a display with a size of 1024x768,…

davids
- 6,259
- 3
- 29
- 50
5
votes
2 answers
Sending selenium chrome instance to the background using Python
I am trying to open a simple chrome instance using Python and selenium.
Please find my code below:
import time, datetime, sys, os
start_time = time.time()
from datetime import datetime
os.system("cls")
from selenium import webdriver
from…

Stan
- 227
- 5
- 13
4
votes
1 answer
Running Selenium without GUI : Status code 64
I'm trying to run Selenium in Headless mode in a Linux machine without GUI. The problem is that I'm getting a WebDriverException and I can't find anywhere what the status code 64 means.
Does anyone know where to find the status code definitions…

ortizbje
- 138
- 2
- 7
4
votes
1 answer
How to resolve XStartTimeoutError: Failed to start X on display ":1013" error
I want to run a pyvirtualdisplay on my Mac.
After installing all dependencies I installed X11 because
i needed Xvfb to run and changed some permission for some folder called ~/.Xauthority to 777.
Still, if I ran
display =…

ChrisDelClea
- 307
- 2
- 8