mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Remove Xvfb + x11vnc support
This commit is contained in:
parent
cc4d6759e3
commit
e59b5fb95b
@ -585,8 +585,8 @@ class DockerVM(BaseNode):
|
|||||||
self._display = self._get_free_display_port()
|
self._display = self._get_free_display_port()
|
||||||
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
|
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
|
||||||
|
|
||||||
if not (tigervnc_path or shutil.which("Xvfb") and shutil.which("x11vnc")):
|
if not tigervnc_path:
|
||||||
raise DockerError("Please install TigerVNC (recommended) or Xvfb + x11vnc before using VNC support")
|
raise DockerError("Please install TigerVNC server before using VNC support")
|
||||||
|
|
||||||
if tigervnc_path:
|
if tigervnc_path:
|
||||||
with open(os.path.join(self.working_dir, "vnc.log"), "w") as fd:
|
with open(os.path.join(self.working_dir, "vnc.log"), "w") as fd:
|
||||||
@ -600,29 +600,6 @@ class DockerVM(BaseNode):
|
|||||||
"-SecurityTypes", "None",
|
"-SecurityTypes", "None",
|
||||||
":{}".format(self._display),
|
":{}".format(self._display),
|
||||||
stdout=fd, stderr=subprocess.STDOUT)
|
stdout=fd, stderr=subprocess.STDOUT)
|
||||||
else:
|
|
||||||
if restart is False:
|
|
||||||
self._xvfb_process = await asyncio.create_subprocess_exec("Xvfb",
|
|
||||||
"-nolisten", "tcp",
|
|
||||||
"-extension", "MIT-SHM",
|
|
||||||
":{}".format(self._display),
|
|
||||||
"-screen", "0",
|
|
||||||
self._console_resolution + "x16")
|
|
||||||
|
|
||||||
# We pass a port for TCPV6 due to a crash in X11VNC if not here: https://github.com/GNS3/gns3-server/issues/569
|
|
||||||
with open(os.path.join(self.working_dir, "vnc.log"), "w") as fd:
|
|
||||||
self._vnc_process = await asyncio.create_subprocess_exec("x11vnc",
|
|
||||||
"-forever",
|
|
||||||
"-nopw",
|
|
||||||
"-shared",
|
|
||||||
"-noshm",
|
|
||||||
"-geometry", self._console_resolution,
|
|
||||||
"-display", "WAIT:{}".format(self._display),
|
|
||||||
"-rfbport", str(self.console),
|
|
||||||
"-rfbportv6", str(self.console),
|
|
||||||
"-noncache",
|
|
||||||
"-listen", self._manager.port_manager.console_host,
|
|
||||||
stdout=fd, stderr=subprocess.STDOUT)
|
|
||||||
|
|
||||||
async def _start_vnc(self):
|
async def _start_vnc(self):
|
||||||
"""
|
"""
|
||||||
@ -631,8 +608,8 @@ class DockerVM(BaseNode):
|
|||||||
|
|
||||||
self._display = self._get_free_display_port()
|
self._display = self._get_free_display_port()
|
||||||
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
|
tigervnc_path = shutil.which("Xtigervnc") or shutil.which("Xvnc")
|
||||||
if not (tigervnc_path or shutil.which("Xvfb") and shutil.which("x11vnc")):
|
if not tigervnc_path:
|
||||||
raise DockerError("Please install TigerVNC server (recommended) or Xvfb + x11vnc before using VNC support")
|
raise DockerError("Please install TigerVNC server before using VNC support")
|
||||||
await self._start_vnc_process()
|
await self._start_vnc_process()
|
||||||
x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display))
|
x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display))
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user