-
Start a VNC server on the machine you want to control
This website never contacts that machine. It only hands the noVNC client to your browser.
# Linux, share the running X session
x11vnc -localhost -rfbport 5900 -passwd your-password
# macOS: System Settings, General, Sharing, enable Screen Sharing
# Windows: install and start TightVNC Server
-
Put websockify in front of it
A browser cannot open a raw VNC connection, so something has to translate the websocket into TCP. Run this on that machine and leave it running:
pip install websockify
websockify 6080 localhost:5900
Display :0 listens on 5900 and :1 on 5901, so point websockify at whichever one you started.
On Linux, the websockify-setup.sh script automates all of the above plus boot autostart: copy it to that machine and run websockify-setup.sh setup, then start, stop, status or remove as needed.
-
Dial it from this page
Choose WebSocket proxy, enter the machine address as Host and 6080 as the port, then the VNC password. The Will dial line shows exactly what your browser is about to open, so read it before pressing Connect.
Leave the password blank, or use a saved target, and this page asks for it as soon as the server does.
-
Drive the session
Fit to window scales the desktop into the frame, View only stops sending your mouse and keyboard, Ctrl+Alt+Del is forwarded as a key sequence, Fullscreen expands the frame, Disconnect closes the websocket.
When it does not connect
-
HTTPS page, non-local address
Browsers treat localhost as trustworthy, so an HTTPS page may open ws://localhost:6080. A LAN or public address is not exempt, so this page dials it as wss:// and websockify must answer with a certificate. Two ways out:
# a) SSH tunnel, no certificate needed, then dial localhost:6080
ssh -L 6080:localhost:6080 you@that-machine
# b) TLS on websockify, then open https://that-machine:6080 once
# and accept the certificate before coming back here
websockify --cert=cert.pem 6080 localhost:5900
-
Connection closed unexpectedly
websockify is not running, the port is wrong, or a firewall drops the socket. Confirm the machine answers on that port from where you sit.
-
Security handshake failed
The VNC password is wrong, or the server demands an encryption type noVNC refuses.
Good to know
Saved targets are registered by staff in the Django administration and appear in the sidebar. They are always websockify endpoints.
The websocket runs from your browser straight to the address you picked. This server only ships HTML, CSS and JavaScript and never sees your screen or your keystrokes.