Skip to content
Snippets Groups Projects
Unverified Commit c7cf086a authored by Simon Li's avatar Simon Li
Browse files

Managed to get lxde working with hacks!

parent 5f05b699
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,23 @@ RUN apt-get update -y -q && \
novnc \
tigervnc-standalone-server
RUN apt-get install -y -q python-pip
# https://github.com/novnc/noVNC/issues/1276
RUN /usr/bin/pip install -U websockify==0.9.0
EXPOSE 8080
ENTRYPOINT ["bash"]
# https://serverfault.com/questions/376302/tigervnc-ssh-without-a-vnc-password/580859#580859
# vncserver -verbose -xstartup startlxde -SecurityTypes None -geometry 1024x768
# /usr/share/novnc/utils/launch.sh --listen 5902 --vnc localhost:5901
ADD websocket-path-ui-js.patch /usr/share/novnc/include
RUN cd /usr/share/novnc/include/ && \
patch -p0 < websocket-path-ui-js.patch
# In browser go to http://localhost:8080/vnc.html?autoconnect=true
RUN ln -s /usr/lib/websockify/rebind.so /usr/local/lib/
USER jovyan
# RUN /opt/conda/bin/pip install jupyter-server-proxy
RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/archive/indexpage.zip
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/
# websockify --web /usr/share/novnc 5901 -- vncserver -verbose -xstartup startlxde -SecurityTypes None -geometry 1024x768 -fg :1
# Both these should work:
# http://localhost:5901/vnc.html?autoconnect=true
# http://127.0.0.1:8888/lxde/vnc.html?path=%2Flxde%2Fwebsockify&autoconnect=true
c.ServerProxy.servers = {
'lxde': {
'command': [
'/usr/local/bin/websockify', '--web', '/usr/share/novnc', '5901', '--', 'vncserver', '-verbose', '-xstartup', 'startlxde', '-SecurityTypes', 'None', '-geometry', '1024x768', '-fg', ':1'],
'absolute_url': False,
'environment': {
'PATH': '/usr/local/bin:/usr/bin:/bin',
},
'port': 5901,
'timeout': 30,
'indexpage': 'vnc.html?autoconnect=true',
}
}
--- ui.js.bak 2019-09-26 16:55:26.816459927 +0000
+++ ui.js 2019-09-26 16:57:06.149994873 +0000
@@ -82,7 +82,7 @@
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
UI.initSetting('connectTimeout', 2);
- UI.initSetting('path', 'websockify');
+ console.log('1', UI.getSetting('path')); console.log(); UI.initSetting('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify'); console.log('2', UI.getSetting('path'));
UI.initSetting('repeaterID', '');
UI.rfb = RFB({'target': $D('noVNC_canvas'),
@@ -90,7 +90,7 @@
'onClipboard': UI.clipReceive,
'onDesktopName': UI.updateDocumentTitle});
- autoconnect = WebUtil.getQueryVar('autoconnect', false);
+ autoconnect = WebUtil.getQueryVar('autoconnect', true);
if (autoconnect === 'true' || autoconnect == '1') {
autoconnect = true;
UI.connect();
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment