summaryrefslogtreecommitdiffstats
path: root/webclients/index.vnc
blob: 0a92bd4e2fa5cc6e0f356c6380e1a2865d039947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!-- index.vnc - default html page for Java VNC viewer applet.  On any file
     ending in .vnc, the HTTP server embedded in Xvnc will substitute the
     following variables when preceded by a dollar: USER, DESKTOP, DISPLAY,
     APPLETWIDTH, APPLETHEIGHT, WIDTH, HEIGHT, PORT, PARAMS.  Use two dollar
     signs ($$) to get a dollar sign in the generated html. -->

<HTML>
<head> 
<TITLE>
$USER's $DESKTOP desktop ($DISPLAY)
</TITLE>
</head> 
<APPLET CODE=VncViewer.class ARCHIVE=java-applet/VncViewer.jar
        WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT>
<param name=PORT value=$PORT>
<param name="Open New Window" value=yes>
</APPLET>
<br/>
<br/>

If the above Java applet does not work, you can also try the new JavaScript-only <a href="http://kanaka.github.com/noVNC/">noVNC</a> viewer. You will need a HTML5-capable browser though.
<script language="JavaScript">
    <!--
    function start_novnc(){
	var host = document.location.hostname;
	// If there are at least two colons in there, it is likely an IPv6 address. Check for square brackets and add them if missing.
	if(host.search(/^.*:.*:.*$/) != -1) {
	   if(host.charAt(0) != "[")
	      host = "[" + host;
	   if(host.charAt(host.length-1) != "]")
	      host = host + "]";
	}
	open("novnc/vnc_auto.html?host=" + host + "&port=$PORT&true_color=1");
    }
    -->
</script>
<form name="novnc_button_form">
  <input type="button" name="novnc_button" value="Click here to connect using noVNC" onClick='start_novnc()'>
</form>

<br/>
<br/>
<br/>
<A href="http://libvncserver.sf.net/">LibVNCServer/LibVNCClient Homepage</A>
</HTML>