Esempio n. 1
0
 def __init__(self, size=(1024, 768), color_depth=24, bgcolor='black'):
     '''
     :param bgcolor: 'black' or 'white'
     '''
     self.color_depth = color_depth
     self.size = size
     self.bgcolor = bgcolor
     self.screen = 0
     self.process = None
     self.display = None
     AbstractDisplay.__init__(self)
Esempio n. 2
0
 def __init__(self, size=(1024, 768), color_depth=24, bgcolor='black', rfbport=5900):
     '''
     :param bgcolor: 'black' or 'white'
     :param rfbport: Specifies the TCP port on which Xvnc listens for connections from viewers (the protocol used in VNC is called RFB - "remote framebuffer"). The default is 5900 plus the display number.
     '''
     self.screen = 0
     self.size = size
     self.color_depth = color_depth
     self.process = None
     self.bgcolor = bgcolor
     self.display = None
     self.rfbport = rfbport
     AbstractDisplay.__init__(self)
Esempio n. 3
0
 def __init__(self, size=(1024, 768), color_depth=24, bgcolor='black', fbdir=None):
     '''
     :param bgcolor: 'black' or 'white'
     :param fbdir: If non-null, the virtual screen is memory-mapped
         to a file in the given directory ('-fbdir' option)
     '''
     self.screen = 0
     self.size = size
     self.color_depth = color_depth
     self.process = None
     self.bgcolor = bgcolor
     self.display = None
     self.fbdir = fbdir
     AbstractDisplay.__init__(self)
Esempio n. 4
0
    def __init__(self, backend=None, visible=False, size=(1024, 768), color_depth=24, bgcolor='black', use_xauth=False, **kwargs):
        self.color_depth = color_depth
        self.size = size
        self.bgcolor = bgcolor
        self.screen = 0
        self.process = None
        self.display = None
        self.visible = visible
        self.backend = backend

        if not self.backend:
            if self.visible:
                self.backend = 'xephyr'
            else:
                self.backend = 'xvfb'

        self._obj = self.display_class(
            size=size,
            color_depth=color_depth,
            bgcolor=bgcolor,
            **kwargs)
        AbstractDisplay.__init__(self, use_xauth=use_xauth)
Esempio n. 5
0
    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=[],
    ):
        """
        :param bgcolor: 'black' or 'white'
        :param rfbport: Specifies the TCP port on which Xvnc listens for connections from viewers (the protocol used in VNC is called RFB - "remote framebuffer"). The default is 5900 plus the display number.
        :param rfbauth: Specifies the file containing the password used to authenticate viewers.
        """
        # self.screen = 0
        self._size = size
        self._color_depth = color_depth
        # self.process = None
        self._bgcolor = bgcolor
        # self.display = None
        self._rfbport = rfbport
        self._rfbauth = rfbauth

        AbstractDisplay.__init__(
            self,
            PROGRAM,
            use_xauth=use_xauth,
            # check_startup=check_startup,
            randomizer=randomizer,
            retries=retries,
            extra_args=extra_args,
        )
Esempio n. 6
0
 def __init__(
     self,
     size=(1024, 768),
     color_depth=24,
     bgcolor="black",
     fbdir=None,
     dpi=None,
     randomizer=None,
 ):
     """
     :param bgcolor: 'black' or 'white'
     :param fbdir: If non-null, the virtual screen is memory-mapped
         to a file in the given directory ('-fbdir' option)
     :param dpi: screen resolution in dots per inch if not None
     """
     self.screen = 0
     self.size = size
     self.color_depth = color_depth
     self.process = None
     self.bgcolor = bgcolor
     self.display = None
     self.fbdir = fbdir
     self.dpi = dpi
     AbstractDisplay.__init__(self, randomizer=randomizer)