jupyter-desktop-server/jupyter_notebook_config.py

36 lines
902 B
Python
Raw Normal View History

import os
if os.getenv('DESKTOP_PACKAGE') == 'lxde':
xstartup = 'startlxde'
elif os.getenv('DESKTOP_PACKAGE') == 'xfce4':
xstartup = 'xfce4-session'
else:
xstartup = 'xterm'
2019-10-02 11:52:59 +02:00
vnc_socket = os.path.join(os.getenv('HOME'), '.vnc', 'socket')
c.ServerProxy.servers = {
'Desktop': {
'command': [
'/opt/conda/bin/websockify',
'-v',
'--web', '/opt/noVNC-1.1.0',
2019-09-30 13:18:35 +02:00
'--heartbeat', '30',
'5901',
2019-10-02 11:52:59 +02:00
'--unix-target', vnc_socket,
'--',
'vncserver',
'-verbose',
'-xstartup', xstartup,
'-geometry', '1024x768',
'-SecurityTypes', 'None',
2019-10-02 11:52:59 +02:00
'-rfbunixpath', vnc_socket,
'-fg',
':1',
],
'absolute_url': False,
'port': 5901,
'timeout': 30,
'mappath': {'/': '/vnc_lite.html'},
}
}