You will need a VNC server that supports WebSocket connections (e.g. recent libvncserver/x11vnc) or you will need websockify to bridge between the browser and your VNC server.
As an alternative, there is a simple VNC server that you can download and run like this:
wget https://github.com/downloads/kanaka/noVNC-js1k/heart-vnc-server.zip unzip heart-vnc-server.zip ./heart-vnc-server
Then load the live version of noVNC-js1k. When prompted enter "ws://localhost:5900".
What led you to this insanity?
In Feb of 2010 I started the noVNC project which is a full featured open source HTML5 VNC client.
As it turns out, it is possible:
noVNC-js1k (like Diet noVNC) is not intended to replace noVNC in any sense. The amount of data sent via the VNC protocol in just a few seconds can be orders of magnitude larger than the size of the full noVNC client so the code size is really a non-issue in practice.
Modern browsers create full-duplex, long-lived, low latency network connections via WebSockets, but WebSocket connections are not raw network connections. To use noVNC-js1k you will either need a VNC server that support WebSocket connections directly (like recent versions of libvncserver/x11vnc) or you will need to use websockify to bridge between the browser and your VNC server.
noVNC-js1k does not support password authentication (yet another reason not to use it for anyting except learning and experimentation). If you use
vncserverto start your VNC server, you may need to make a copy of the script and comment out the
authTypeseting near the beginning of the script. If you are using x11vnc do not use any of the password options.
noVNC-js1k has the following limited functionality:
- Raw encoding
- Mouse movement
- Left mouse button clicks
- Keyboard input (a few symbols are on the wrong keys)
- Encryption (wss://) support
- Works in Chrome and Firefox (any browser with native WebSocket support)
Missing features (compared to noVNC)
The following features of the full noVNC are missing.
- User interface (WebSocket URI passed as fragment ID)
- VNC authentication (server must have password disabled)
- Other encodings (including no DesktopSize/resize)
- Colour mapped support (true-color only)
- Local cursor rendering
- Clipboard support
- Error messages / connection status
- Performance optimizations