File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
jupyter_remote_desktop_proxy Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
9
9
def setup_websockify ():
10
- # make a secure temporary directory for sockets
11
- # This is only readable, writeable & searchable by our uid
12
- sockets_dir = tempfile .mkdtemp ()
13
- sockets_path = os .path .join (sockets_dir , 'vnc-socket' )
14
10
vncserver = which ('vncserver' )
15
-
16
11
if not vncserver :
17
12
raise RuntimeError (
18
13
"vncserver executable not found, please install a VNC server"
19
14
)
20
15
21
- # TigerVNC provides the option to connect a Unix socket. TurboVNC does not.
22
16
# TurboVNC and TigerVNC share the same origin and both use a Perl script
23
17
# as the executable vncserver. We can determine if vncserver is TigerVNC
24
18
# by searching tigervnc string in the Perl script.
@@ -34,6 +28,12 @@ def setup_websockify():
34
28
is_tigervnc = "tigervnc" in vncserver_file .read ().casefold ()
35
29
36
30
if is_tigervnc :
31
+ # Make a secure temporary directory for sockets that is only readable,
32
+ # writeable, and searchable by our uid - TigerVNC can listen to a Unix
33
+ # socket!
34
+ sockets_dir = tempfile .mkdtemp ()
35
+ sockets_path = os .path .join (sockets_dir , 'vnc-socket' )
36
+
37
37
websockify_args = ['--unix-target' , sockets_path ]
38
38
vnc_args = [vncserver , '-rfbunixpath' , sockets_path ]
39
39
else :
You can’t perform that action at this time.
0 commit comments