Skip to content

Commit

Permalink
Merge pull request #96 from consideRatio/pr/tigervnc-check
Browse files Browse the repository at this point in the history
Fix TigerVNC detection for non-apt installations
  • Loading branch information
consideRatio authored Mar 1, 2024
2 parents fe221b3 + 2896efa commit 3df5407
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions jupyter_remote_desktop_proxy/setup_websockify.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ def setup_websockify():
# TigerVNC provides the option to connect a Unix socket. TurboVNC does not.
# TurboVNC and TigerVNC share the same origin and both use a Perl script
# as the executable vncserver. We can determine if vncserver is TigerVNC
# by searching TigerVNC string in the Perl script.
# by searching tigervnc string in the Perl script.
#
# The content of the vncserver executable can differ depending on how
# TigerVNC and TurboVNC has been distributed. Below are files known to be
# read in some situations:
#
# - https://github.com/TigerVNC/tigervnc/blob/v1.13.1/unix/vncserver/vncserver.in
# - https://github.com/TurboVNC/turbovnc/blob/3.1.1/unix/vncserver.in
#
with open(vncserver) as vncserver_file:
is_tigervnc = "TigerVNC" in vncserver_file.read()
is_tigervnc = "tigervnc" in vncserver_file.read().casefold()

if is_tigervnc:
vnc_args = [vncserver, '-rfbunixpath', sockets_path]
Expand Down

0 comments on commit 3df5407

Please sign in to comment.