diff --git a/Dockerfile b/Dockerfile index dc7a0f2..e6dbd11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,11 +42,6 @@ RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/ar RUN conda install -y -q -c manics websockify=0.9.0 ADD jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py -# There may be a discrepency between the interface vncserver listens on -# (127.0.0.1) and the interface jupyter-server-proxy connects to (localhost) -# https://bugzilla.redhat.com/show_bug.cgi?id=895582 -RUN sed -i.bak s/localhost/127.0.0.1/g /opt/conda/lib/python3.7/site-packages/jupyter_server_proxy/handlers.py - WORKDIR ${HOME} # Both these should work: diff --git a/jupyter_notebook_config.py b/jupyter_notebook_config.py index 91d2c50..e818176 100644 --- a/jupyter_notebook_config.py +++ b/jupyter_notebook_config.py @@ -7,6 +7,7 @@ elif os.getenv('DESKTOP_PACKAGE') == 'xfce4': else: xstartup = 'xterm' +vnc_socket = os.path.join(os.getenv('HOME'), '.vnc', 'socket') c.ServerProxy.servers = { 'desktop': { 'command': [ @@ -15,12 +16,14 @@ c.ServerProxy.servers = { '--web', '/opt/noVNC-1.1.0', '--heartbeat', '30', '5901', + '--unix-target', vnc_socket, '--', 'vncserver', '-verbose', '-xstartup', xstartup, '-geometry', '1024x768', '-SecurityTypes', 'None', + '-rfbunixpath', vnc_socket, '-fg', ':1', ],