]>
Commit | Line | Data |
---|---|---|
5aeb9880 JM |
1 | VNC HTML5 Client |
2 | ================ | |
3 | ||
4 | ||
5 | Description | |
6 | ----------- | |
7 | ||
8 | An VNC client implemented using HTML5, specifically Canvas and Web Sockets. | |
9 | ||
10 | ||
11 | ||
12 | Requirements | |
13 | ------------ | |
14 | ||
15 | * A browser that supports Web Sockets (mostly Chrome as of Apr 6, 2010) | |
16 | and Canvas (most browsers) | |
17 | ||
18 | * Until VNC server support web sockets, you need to use a Web Sockets to | |
19 | normal socket proxy. There are a couple reasons for this: | |
20 | ||
21 | * Web Sockets is not a pure socket protocol. There is an initial HTTP | |
22 | like handshake to allow easy hand-off by web servers and allow some | |
23 | origin policy exchange. Also, each Web Sockets frame begins with | |
24 | 0 ('\x00') and ends with 255 ('\xff'). | |
25 | ||
26 | * Javascript itself does not have the ability to handle pure byte | |
27 | strings (Unicode encoding messes with it) even though you can read | |
28 | them with Web Sockets. The python proxy base64 encodes the data so | |
29 | that the Javascript client can base64 decode the data into an array. | |
30 | ||
31 | ||
32 | Usage | |
33 | ----- | |
34 | ||
35 | * run a VNC server. | |
36 | ||
37 | `Xvnc :1` | |
38 | ||
39 | * run the python proxy: | |
40 | ||
41 | `./wsproxy.py [listen_port] [vnc_host] [vnc_port]` | |
42 | ||
43 | `./wsproxy.py 8787 localhost 5901` | |
44 | ||
45 | ||
46 | * run the mini python web server to serve the directory: | |
47 | ||
48 | `./web.py PORT` | |
49 | ||
50 | `./web.py 8080` | |
51 | ||
52 | * Point your web browser at http://localhost:8080/vnc.html | |
53 | (or whatever port you used above to run the web server). | |
54 | ||
55 | * Provide the host and port where the proxy is running and the password | |
56 | that the vnc server is using (if any). | |
57 | ||
58 |