vital987 / chrome-novnc

Chromium via noVNC (Browser in Browser)
MIT License
92 stars 57 forks source link

Server Disconnected: Target Closed (1000) #13

Closed cry0genic closed 1 month ago

cry0genic commented 2 months ago

Hey @vital987, I want to view the instance in two separate browsers. However, if one tab is active, the other tab does not let me view the noVNC browser. Is there a workaround for this?

Thanks!

vital987 commented 2 months ago

Try setting VNC_SHARED environment variable to true i.e. VNC_SHARED=true

cry0genic commented 2 months ago

Hey @vital987, I already tried this. I've changed it both in the Dockerfile as well as the docker-compose.yml file.

  VNC_SHARED=true \
VNC_SHARED=${VNC_SHARED-true}
cry0genic commented 2 months ago

Hey @vital987, following up, do let me know if you can help me out here.

Thanks!

cry0genic commented 1 month ago

Hey @vital987, if you're free now do check this issue out. Thanks!

cry0genic commented 1 month ago

This fixed it:

[program:VNC]
command=bash -c 'sed -i "s/\$DESKTOP/$VNC_TITLE/g" /opt/novnc/index.html && if [ "$VNC_SHARED" = "false" ]; then x11vnc -storepasswd $VNC_PASS /config/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /config/.xpass -geometry $VNC_RESOLUTION -forever -alwaysshared -permitfiletransfer -noxrecord -noxfixes -noxdamage -dpms -bg -desktop $VNC_TITLE; else x11vnc -storepasswd $VNC_PASS /config/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /config/.xpass -geometry $VNC_RESOLUTION -forever -shared -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; fi'
startsecs=0
autorestart=unexpected
stderr_logfile=/var/log/x11vnc.stderr.log
priority=3