Commit 7cb0e4a9 authored by Christian Beier's avatar Christian Beier

novnc client: use the client's notion about the server hostname instead of what the server thinks.

parent 4d346423
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
signs ($$) to get a dollar sign in the generated html. --> signs ($$) to get a dollar sign in the generated html. -->
<HTML> <HTML>
<head>
<TITLE> <TITLE>
$USER's $DESKTOP desktop ($DISPLAY) $USER's $DESKTOP desktop ($DISPLAY)
</TITLE> </TITLE>
</head>
<APPLET CODE=VncViewer.class ARCHIVE=VncViewer.jar <APPLET CODE=VncViewer.class ARCHIVE=VncViewer.jar
WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT> WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT>
<param name=PORT value=$PORT> <param name=PORT value=$PORT>
...@@ -15,8 +17,19 @@ $USER's $DESKTOP desktop ($DISPLAY) ...@@ -15,8 +17,19 @@ $USER's $DESKTOP desktop ($DISPLAY)
</APPLET> </APPLET>
<br/> <br/>
<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. 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/> <br/>
<br/> <br/>
......
...@@ -431,10 +431,6 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen) ...@@ -431,10 +431,6 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
sprintf(str, "%d", rfbScreen->port); sprintf(str, "%d", rfbScreen->port);
rfbWriteExact(&cl, str, strlen(str)); rfbWriteExact(&cl, str, strlen(str));
} else if (compareAndSkip(&ptr, "$HOST")) {
rfbWriteExact(&cl, rfbScreen->thisHost, strlen(rfbScreen->thisHost));
} else if (compareAndSkip(&ptr, "$DESKTOP")) { } else if (compareAndSkip(&ptr, "$DESKTOP")) {
rfbWriteExact(&cl, rfbScreen->desktopName, strlen(rfbScreen->desktopName)); rfbWriteExact(&cl, rfbScreen->desktopName, strlen(rfbScreen->desktopName));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment