Skip to content

Commit ed22a06

Browse files
committed
Update vnc server
1 parent aa99f7e commit ed22a06

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

manager/manager/vnc/vnc_server.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,23 @@ def start_vnc(self, display, internal_port, external_port):
3939
self.threads.append(turbovnc_thread)
4040
wait_for_xserver(display)
4141

42+
certs = ""
43+
44+
if os.path.isfile("/etc/certs/cert.pem"):
45+
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"
46+
4247
# Start noVNC with default port 6080 listening to VNC server on 5900
4348
if self.get_ros_version() == "2":
4449
novnc_cmd = (
4550
f"/noVNC/utils/novnc_proxy --listen {external_port} "
46-
f"--vnc localhost:{internal_port}"
51+
f"--vnc localhost:{internal_port} "
52+
f"{certs}"
4753
)
4854
else:
4955
novnc_cmd = (
5056
f"/noVNC/utils/launch.sh --listen {external_port} "
51-
f"--vnc localhost:{internal_port}"
57+
f"--vnc localhost:{internal_port} "
58+
f"{certs}"
5259
)
5360

5461
novnc_thread = DockerThread(novnc_cmd)

0 commit comments

Comments
 (0)