Skip to content

Commit 43b836c

Browse files
committed
Force certs
1 parent 2eaadd0 commit 43b836c

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
@@ -88,16 +88,23 @@ def start_vnc_gpu(self, display, internal_port, external_port, dri_path):
8888
self.threads.append(turbovnc_thread)
8989
wait_for_xserver(display)
9090

91+
certs = ""
92+
93+
if os.path.isfile("/etc/certs/cert.pem"):
94+
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"
95+
9196
# Start noVNC with default port 6080 listening to VNC server on 5900
9297
if self.get_ros_version() == "2":
9398
novnc_cmd = (
9499
f"/noVNC/utils/novnc_proxy --listen {external_port} "
95-
f"--vnc localhost:{internal_port}"
100+
f"--vnc localhost:{internal_port} "
101+
f"{certs}"
96102
)
97103
else:
98104
novnc_cmd = (
99105
f"/noVNC/utils/launch.sh --listen {external_port} "
100-
f"--vnc localhost:{internal_port}"
106+
f"--vnc localhost:{internal_port} "
107+
f"{certs}"
101108
)
102109

103110
novnc_thread = DockerThread(novnc_cmd)

0 commit comments

Comments
 (0)