mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Run Xtigervnc with MIT-SHM extension disabled for Docker VNC console support. Fixes #2071
This commit is contained in:
parent
bccfb64958
commit
527d4bb3ea
@ -584,6 +584,7 @@ class DockerVM(BaseNode):
|
|||||||
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:
|
||||||
self._vnc_process = await asyncio.create_subprocess_exec(tigervnc_path,
|
self._vnc_process = await asyncio.create_subprocess_exec(tigervnc_path,
|
||||||
|
"-extension", "MIT-SHM",
|
||||||
"-geometry", self._console_resolution,
|
"-geometry", self._console_resolution,
|
||||||
"-depth", "16",
|
"-depth", "16",
|
||||||
"-interface", self._manager.port_manager.console_host,
|
"-interface", self._manager.port_manager.console_host,
|
||||||
@ -595,8 +596,9 @@ class DockerVM(BaseNode):
|
|||||||
else:
|
else:
|
||||||
if restart is False:
|
if restart is False:
|
||||||
self._xvfb_process = await asyncio.create_subprocess_exec("Xvfb",
|
self._xvfb_process = await asyncio.create_subprocess_exec("Xvfb",
|
||||||
"-nolisten",
|
"-nolisten", "tcp",
|
||||||
"tcp", ":{}".format(self._display),
|
"-extension", "MIT-SHM",
|
||||||
|
":{}".format(self._display),
|
||||||
"-screen", "0",
|
"-screen", "0",
|
||||||
self._console_resolution + "x16")
|
self._console_resolution + "x16")
|
||||||
|
|
||||||
@ -606,6 +608,7 @@ class DockerVM(BaseNode):
|
|||||||
"-forever",
|
"-forever",
|
||||||
"-nopw",
|
"-nopw",
|
||||||
"-shared",
|
"-shared",
|
||||||
|
"-noshm",
|
||||||
"-geometry", self._console_resolution,
|
"-geometry", self._console_resolution,
|
||||||
"-display", "WAIT:{}".format(self._display),
|
"-display", "WAIT:{}".format(self._display),
|
||||||
"-rfbport", str(self.console),
|
"-rfbport", str(self.console),
|
||||||
|
@ -1343,7 +1343,7 @@ async def test_start_vnc(vm):
|
|||||||
with asyncio_patch("asyncio.create_subprocess_exec") as mock_exec:
|
with asyncio_patch("asyncio.create_subprocess_exec") as mock_exec:
|
||||||
await vm._start_vnc()
|
await vm._start_vnc()
|
||||||
assert vm._display is not None
|
assert vm._display is not None
|
||||||
assert mock_exec.call_args[0] == ("/bin/Xtigervnc", "-geometry", vm.console_resolution, "-depth", "16", "-interface", "127.0.0.1", "-rfbport", str(vm.console), "-AlwaysShared", "-SecurityTypes", "None", ":{}".format(vm._display))
|
assert mock_exec.call_args[0] == ("/bin/Xtigervnc", "-extension", "MIT-SHM", "-geometry", vm.console_resolution, "-depth", "16", "-interface", "127.0.0.1", "-rfbport", str(vm.console), "-AlwaysShared", "-SecurityTypes", "None", ":{}".format(vm._display))
|
||||||
mock_wait.assert_called_with("/tmp/.X11-unix/X{}".format(vm._display))
|
mock_wait.assert_called_with("/tmp/.X11-unix/X{}".format(vm._display))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user