ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python27/lib/python2.7/site-packages/pyvirtualdisplay/ |
Upload File : |
from easyprocess import EasyProcess
from pyvirtualdisplay.abstractdisplay import AbstractDisplay
PROGRAM = 'Xephyr'
URL = None
PACKAGE = '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'):
'''
: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)
@classmethod
def check_installed(cls):
EasyProcess([PROGRAM, '-help'], url=URL,
ubuntu_package=PACKAGE).check_installed()
@property
def _cmd(self):
cmd = [PROGRAM,
dict(black='-br', white='-wr')[self.bgcolor],
'-screen',
'x'.join(map(str, list(self.size) + [self.color_depth])),
self.new_display_var,
]
return cmd