Skip to content

Commit

Permalink
Remove hardcoded display number and port
Browse files Browse the repository at this point in the history
In a multi-user environment, the display number and the port cannot
have to be selected based on what is available. For the display number,
vncserver uses the next free display number when unspecified. As for the
port number for websockify, we let jupyter-server-proxy logic finds one
for us.
  • Loading branch information
cmd-ntrf committed May 9, 2023
1 parent 2d7eee0 commit 447bf86
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jupyter_remote_desktop_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def setup_desktop():
'-SecurityTypes',
'None',
'-fg',
':1',
]
)
)
Expand All @@ -52,11 +51,10 @@ def setup_desktop():
os.path.join(HERE, 'share/web/noVNC-1.2.0'),
'--heartbeat',
'30',
'5901',
'{port}',
]
+ socket_args
+ ['--', '/bin/sh', '-c', f'cd {os.getcwd()} && {vnc_command}'],
'port': 5901,
'timeout': 30,
'mappath': {'/': '/vnc_lite.html'},
'new_browser_window': True,
Expand Down

0 comments on commit 447bf86

Please sign in to comment.