Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import logging
from pyvirtualdisplay.abstractdisplay import AbstractDisplay
log = logging.getLogger(__name__)
PROGRAM = "Xvfb"
class XvfbDisplay(AbstractDisplay):
"""
Xvfb wrapper
Xvfb is an X server that can run on machines with no display
hardware and no physical input devices. It emulates a dumb
framebuffer using virtual memory.
"""
def __init__(
self,
size=(1024, 768),
color_depth=24,
bgcolor="black",
use_xauth=False,
# check_startup=False,
fbdir=None,
import logging
from pyvirtualdisplay.abstractdisplay import AbstractDisplay
log = logging.getLogger(__name__)
PROGRAM = "Xephyr"
class XephyrDisplay(AbstractDisplay):
"""
Xephyr wrapper
Xephyr is an X server outputting to a window on a pre-existing X display
"""
def __init__(
self,
size=(1024, 768),
color_depth=24,
bgcolor="black",
use_xauth=False,
# check_startup=False,
randomizer=None,
retries=10,
extra_args=[],
import logging
from pyvirtualdisplay.abstractdisplay import AbstractDisplay
log = logging.getLogger(__name__)
PROGRAM = "Xvnc"
class XvncDisplay(AbstractDisplay):
"""
Xvnc wrapper
"""
def __init__(
self,
size=(1024, 768),
color_depth=24,
bgcolor="black",
use_xauth=False,
# check_startup=False,
rfbport=5900,
rfbauth=None,
randomizer=None,
retries=10,
extra_args=[],