Skip to content

Commit ea520bc

Browse files
authored
Merge pull request #134 from manics/env-var
Override xstartup with environment variable `JUPYTER_REMOTE_DESKTOP_PROXY_XSTARTUP`
2 parents 00cfd4b + 3a025bb commit ea520bc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ to start daemons (such as dbus, pulseaudio, etc) necessary for linux desktop
9090
to work. This is the option kubernetes runs with by default, so most kubernetes
9191
based JupyterHubs will not need any modifications for this to work.
9292

93+
## Configuration
94+
95+
The VNC server will default to launching `~/.vnc/xstartup`.
96+
If this file does not exist jupyter-remote-desktop-proxy will use a bundled `xstartup` file that launches `dbus-launch xfce4-session`.
97+
You can specify a custom script by setting the environment variable `JUPYTER_REMOTE_DESKTOP_PROXY_XSTARTUP`.
98+
9399
## Limitations
94100

95101
1. Desktop applications that require access to OpenGL are currently unsupported.

jupyter_remote_desktop_proxy/setup_websockify.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ def setup_websockify():
3333
unix_socket = False
3434
vnc_args = [vncserver, '-localhost', '-rfbport', '{port}']
3535

36-
if not os.path.exists(os.path.expanduser('~/.vnc/xstartup')):
37-
vnc_args.extend(['-xstartup', os.path.join(HERE, 'share/xstartup')])
36+
xstartup = os.getenv("JUPYTER_REMOTE_DESKTOP_PROXY_XSTARTUP")
37+
if not xstartup and not os.path.exists(os.path.expanduser('~/.vnc/xstartup')):
38+
xstartup = os.path.join(HERE, 'share/xstartup')
39+
if xstartup:
40+
vnc_args.extend(['-xstartup', xstartup])
3841

3942
vnc_command = shlex.join(
4043
vnc_args

0 commit comments

Comments
 (0)