Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TigerVNC detection for non-apt installations #96

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading