diff options
author | Christian Beier <[email protected]> | 2011-11-09 19:20:10 +0100 |
---|---|---|
committer | Christian Beier <[email protected]> | 2011-11-09 19:20:10 +0100 |
commit | 7cb0e4a9a95886300268e1bff1e72b4c18f1b762 (patch) | |
tree | 6dba3ba9508e952a18706c7658aa5d0e528198f4 | |
parent | 4d3464236b5a0c9bc28e65ab11dfad8dbea3f4a0 (diff) | |
download | libtdevnc-7cb0e4a9a95886300268e1bff1e72b4c18f1b762.tar.gz libtdevnc-7cb0e4a9a95886300268e1bff1e72b4c18f1b762.zip |
novnc client: use the client's notion about the server hostname instead of what the server thinks.
-rw-r--r-- | classes/index.vnc | 15 | ||||
-rw-r--r-- | libvncserver/httpd.c | 4 |
2 files changed, 14 insertions, 5 deletions
diff --git a/classes/index.vnc b/classes/index.vnc index 1a05d01..34ad25d 100644 --- a/classes/index.vnc +++ b/classes/index.vnc @@ -5,9 +5,11 @@ 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=VncViewer.jar WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT> <param name=PORT value=$PORT> @@ -15,8 +17,19 @@ $USER's $DESKTOP desktop ($DISPLAY) </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. -<a href="novnc/vnc_auto.html?host=$HOST&port=$PORT&true_color=1">Click here to connect using noVNC.</a> +<script language="JavaScript"> + <!-- + function start_novnc(){ + open("novnc/vnc_auto.html?host=" + document.location.hostname + "&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/> diff --git a/libvncserver/httpd.c b/libvncserver/httpd.c index 3252fc6..3025aae 100644 --- a/libvncserver/httpd.c +++ b/libvncserver/httpd.c @@ -431,10 +431,6 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen) sprintf(str, "%d", rfbScreen->port); rfbWriteExact(&cl, str, strlen(str)); - } else if (compareAndSkip(&ptr, "$HOST")) { - - rfbWriteExact(&cl, rfbScreen->thisHost, strlen(rfbScreen->thisHost)); - } else if (compareAndSkip(&ptr, "$DESKTOP")) { rfbWriteExact(&cl, rfbScreen->desktopName, strlen(rfbScreen->desktopName)); |