Skip to content

Commit 3df5407

Browse files
authored
Merge pull request #96 from consideRatio/pr/tigervnc-check
Fix TigerVNC detection for non-apt installations
2 parents fe221b3 + 2896efa commit 3df5407

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

jupyter_remote_desktop_proxy/setup_websockify.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,17 @@ def setup_websockify():
2121
# TigerVNC provides the option to connect a Unix socket. TurboVNC does not.
2222
# TurboVNC and TigerVNC share the same origin and both use a Perl script
2323
# as the executable vncserver. We can determine if vncserver is TigerVNC
24-
# by searching TigerVNC string in the Perl script.
24+
# by searching tigervnc string in the Perl script.
25+
#
26+
# The content of the vncserver executable can differ depending on how
27+
# TigerVNC and TurboVNC has been distributed. Below are files known to be
28+
# read in some situations:
29+
#
30+
# - https://github.com/TigerVNC/tigervnc/blob/v1.13.1/unix/vncserver/vncserver.in
31+
# - https://github.com/TurboVNC/turbovnc/blob/3.1.1/unix/vncserver.in
32+
#
2533
with open(vncserver) as vncserver_file:
26-
is_tigervnc = "TigerVNC" in vncserver_file.read()
34+
is_tigervnc = "tigervnc" in vncserver_file.read().casefold()
2735

2836
if is_tigervnc:
2937
vnc_args = [vncserver, '-rfbunixpath', sockets_path]

0 commit comments

Comments
 (0)