summaryrefslogtreecommitdiffstats
path: root/webclients
diff options
context:
space:
mode:
Diffstat (limited to 'webclients')
-rw-r--r--webclients/index.vnc2
-rw-r--r--webclients/java-applet/ssl/README6
-rw-r--r--webclients/java-applet/ssl/proxy.vnc2
-rwxr-xr-xwebclients/java-applet/ssl/ss_vncviewer10
-rw-r--r--webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch6
-rw-r--r--webclients/novnc/include/display.js10
-rw-r--r--webclients/novnc/include/keyboard.js144
-rw-r--r--webclients/novnc/include/keysym.js2
-rw-r--r--webclients/novnc/include/rfb.js15
-rw-r--r--webclients/novnc/include/ui.js4
-rw-r--r--webclients/novnc/include/vnc.js43
-rw-r--r--webclients/novnc/vnc_auto.html2
12 files changed, 105 insertions, 141 deletions
diff --git a/webclients/index.vnc b/webclients/index.vnc
index 0a92bd4..3229d79 100644
--- a/webclients/index.vnc
+++ b/webclients/index.vnc
@@ -41,5 +41,5 @@ If the above Java applet does not work, you can also try the new JavaScript-only
<br/>
<br/>
<br/>
-<A href="http://libvncserver.sf.net/">LibVNCServer/LibVNCClient Homepage</A>
+<A href="https://libvnc.github.io/">LibVNCServer/LibVNCClient Homepage</A>
</HTML>
diff --git a/webclients/java-applet/ssl/README b/webclients/java-applet/ssl/README
index b244cf1..f5a2b66 100644
--- a/webclients/java-applet/ssl/README
+++ b/webclients/java-applet/ssl/README
@@ -42,9 +42,9 @@ Send full Java Console output for failures.
Tips:
When doing single-port proxy connections (e.g. both VNC and HTTPS
-thru port 5900) it helps to move through the 'do you trust this site'
+through port 5900) it helps to move through the 'do you trust this site'
dialogs quickly. x11vnc has to wait to see if the traffic is VNC or
-HTTP and this can cause timeouts if you don't move thru them quickly.
+HTTP and this can cause timeouts if you don't move through them quickly.
You may have to restart your browser completely if it gets into a
weird state. For one case we saw the JVM requesting VncViewer.class
@@ -172,7 +172,7 @@ Both TightVNC and UltraVNC Java viewers:
Set to do a special HTTP GET (/request.https.vnc.connection)
to the vnc server that will cause it to switch to VNC instead.
This is to speedup/make more robust, the single port HTTPS and VNC
- mode of x11vnc (e.g. both services thru port 5900, etc)
+ mode of x11vnc (e.g. both services through port 5900, etc)
urlPrefix
string, default: none
diff --git a/webclients/java-applet/ssl/proxy.vnc b/webclients/java-applet/ssl/proxy.vnc
index 6d3ab3d..0684200 100644
--- a/webclients/java-applet/ssl/proxy.vnc
+++ b/webclients/java-applet/ssl/proxy.vnc
@@ -25,7 +25,7 @@ fails in the proxy environment.
The applet is not allowed to open a socket connection to the proxy (since
that would let it connect to just about any host, e.g. CONNECT method).
-This is indpendent of SSL but of course fails for that socket connection
+This is independent of SSL but of course fails for that socket connection
as well. I.e. this is a problem for non-SSL VNC Viewers as well.
Solution? Sign the applet and have the user click on "Yes" that they
diff --git a/webclients/java-applet/ssl/ss_vncviewer b/webclients/java-applet/ssl/ss_vncviewer
index 7e793ff..b996600 100755
--- a/webclients/java-applet/ssl/ss_vncviewer
+++ b/webclients/java-applet/ssl/ss_vncviewer
@@ -91,7 +91,7 @@
#
# [user1@]host1[:port1],[user2@]host2[:port2]
#
-# in which case a ssh to host1 and thru it via a -L redir a 2nd
+# in which case a ssh to host1 and through it via a -L redir a 2nd
# ssh is established to host2.
#
# Examples:
@@ -109,10 +109,10 @@
#
# -sshargs "args" pass "args" to the ssh process, e.g. -L/-R port redirs.
#
-# -sshssl Tunnel the SSL connection thru a SSH connection. The tunnel as
-# under -ssh is set up and the SSL connection goes thru it. Use
+# -sshssl Tunnel the SSL connection through a SSH connection. The tunnel as
+# under -ssh is set up and the SSL connection goes through it. Use
# this if you want to have and end-to-end SSL connection but must
-# go thru a SSH gateway host (e.g. not the vnc server). Or use
+# go through a SSH gateway host (e.g. not the vnc server). Or use
# this if you need to tunnel additional services via -R and -L
# (see -sshargs above).
#
@@ -351,7 +351,7 @@ if [ "X$SKIP_STUNNEL_NO_SYSLOG" = "X" ]; then
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
fi
-# this is the -t ssh option (gives better keyboard response thru SSH tunnel)
+# this is the -t ssh option (gives better keyboard response through SSH tunnel)
targ="-t"
if [ "X$SS_VNCVIEWER_NO_T" != "X" ]; then
targ=""
diff --git a/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch b/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
index 3309860..3f3b9a0 100644
--- a/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
+++ b/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
@@ -978,7 +978,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ }
+ String sFileName = ((String) selected);
- // sf@2004 - Directory can't be transfered
+ // sf@2004 - Directory can't be transferred
if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
{
- JOptionPane.showMessageDialog(null, (String)"Directory Transfer is not yet available in this version...", "FileTransfer Info", JOptionPane.INFORMATION_MESSAGE);
@@ -1036,7 +1036,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ return null;
+ }
+
-+ // sf@2004 - Directory can't be transfered
++ // sf@2004 - Directory can't be transferred
+ if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
+ {
+ return null;
@@ -1084,7 +1084,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ }
+ String sFileName = ((String) selected);
- // sf@2004 - Directory can't be transfered
+ // sf@2004 - Directory can't be transferred
if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
{
- JOptionPane.showMessageDialog(null, (String)"Directory Transfer is not yet available in this version...", "FileTransfer Info", JOptionPane.INFORMATION_MESSAGE);
diff --git a/webclients/novnc/include/display.js b/webclients/novnc/include/display.js
index 8763fa4..e255683 100644
--- a/webclients/novnc/include/display.js
+++ b/webclients/novnc/include/display.js
@@ -76,7 +76,7 @@ var Display;
}
if (this._prefer_js === null) {
- Util.Info("Prefering javascript operations");
+ Util.Info("Preferring javascript operations");
this._prefer_js = true;
}
@@ -318,7 +318,7 @@ var Display;
// Clearing the current viewport first fixes the issue
this._drawCtx.clearRect(0, 0, this._viewportLoc.w, this._viewportLoc.h);
}
- this.resize(640, 20);
+ this.resize(240, 20);
this._drawCtx.clearRect(0, 0, this._viewportLoc.w, this._viewportLoc.h);
}
@@ -713,6 +713,12 @@ var Display;
cur.push(rgb[1]); // green
cur.push(rgb[0]); // red
cur.push(alpha); // alpha
+ } else {
+ idx = ((w0 * y) + x) * 4;
+ cur.push(pixels[idx + 2]); // blue
+ cur.push(pixels[idx + 1]); // green
+ cur.push(pixels[idx]); // red
+ cur.push(alpha); // alpha
}
}
}
diff --git a/webclients/novnc/include/keyboard.js b/webclients/novnc/include/keyboard.js
index 6044321..8667031 100644
--- a/webclients/novnc/include/keyboard.js
+++ b/webclients/novnc/include/keyboard.js
@@ -31,7 +31,7 @@ var kbdUtil = (function() {
function hasShortcutModifier(charModifier, currentModifiers) {
var mods = {};
for (var key in currentModifiers) {
- if (parseInt(key) !== 0xffe1) {
+ if (parseInt(key) !== XK_Shift_L) {
mods[key] = currentModifiers[key];
}
}
@@ -65,24 +65,18 @@ var kbdUtil = (function() {
// Helper object tracking modifier key state
// and generates fake key events to compensate if it gets out of sync
function ModifierSync(charModifier) {
- var ctrl = 0xffe3;
- var alt = 0xffe9;
- var altGr = 0xfe03;
- var shift = 0xffe1;
- var meta = 0xffe7;
-
if (!charModifier) {
if (isMac()) {
// on Mac, Option (AKA Alt) is used as a char modifier
- charModifier = [alt];
+ charModifier = [XK_Alt_L];
}
else if (isWindows()) {
// on Windows, Ctrl+Alt is used as a char modifier
- charModifier = [alt, ctrl];
+ charModifier = [XK_Alt_L, XK_Control_L];
}
else if (isLinux()) {
- // on Linux, AltGr is used as a char modifier
- charModifier = [altGr];
+ // on Linux, ISO Level 3 Shift (AltGr) is used as a char modifier
+ charModifier = [XK_ISO_Level3_Shift];
}
else {
charModifier = [];
@@ -90,11 +84,11 @@ var kbdUtil = (function() {
}
var state = {};
- state[ctrl] = false;
- state[alt] = false;
- state[altGr] = false;
- state[shift] = false;
- state[meta] = false;
+ state[XK_Control_L] = false;
+ state[XK_Alt_L] = false;
+ state[XK_ISO_Level3_Shift] = false;
+ state[XK_Shift_L] = false;
+ state[XK_Meta_L] = false;
function sync(evt, keysym) {
var result = [];
@@ -102,25 +96,30 @@ var kbdUtil = (function() {
return {keysym: keysyms.lookup(keysym), type: state[keysym] ? 'keydown' : 'keyup'};
}
- if (evt.ctrlKey !== undefined && evt.ctrlKey !== state[ctrl] && keysym !== ctrl) {
- state[ctrl] = evt.ctrlKey;
- result.push(syncKey(ctrl));
+ if (evt.ctrlKey !== undefined &&
+ evt.ctrlKey !== state[XK_Control_L] && keysym !== XK_Control_L) {
+ state[XK_Control_L] = evt.ctrlKey;
+ result.push(syncKey(XK_Control_L));
}
- if (evt.altKey !== undefined && evt.altKey !== state[alt] && keysym !== alt) {
- state[alt] = evt.altKey;
- result.push(syncKey(alt));
+ if (evt.altKey !== undefined &&
+ evt.altKey !== state[XK_Alt_L] && keysym !== XK_Alt_L) {
+ state[XK_Alt_L] = evt.altKey;
+ result.push(syncKey(XK_Alt_L));
}
- if (evt.altGraphKey !== undefined && evt.altGraphKey !== state[altGr] && keysym !== altGr) {
- state[altGr] = evt.altGraphKey;
- result.push(syncKey(altGr));
+ if (evt.altGraphKey !== undefined &&
+ evt.altGraphKey !== state[XK_ISO_Level3_Shift] && keysym !== XK_ISO_Level3_Shift) {
+ state[XK_ISO_Level3_Shift] = evt.altGraphKey;
+ result.push(syncKey(XK_ISO_Level3_Shift));
}
- if (evt.shiftKey !== undefined && evt.shiftKey !== state[shift] && keysym !== shift) {
- state[shift] = evt.shiftKey;
- result.push(syncKey(shift));
+ if (evt.shiftKey !== undefined &&
+ evt.shiftKey !== state[XK_Shift_L] && keysym !== XK_Shift_L) {
+ state[XK_Shift_L] = evt.shiftKey;
+ result.push(syncKey(XK_Shift_L));
}
- if (evt.metaKey !== undefined && evt.metaKey !== state[meta] && keysym !== meta) {
- state[meta] = evt.metaKey;
- result.push(syncKey(meta));
+ if (evt.metaKey !== undefined &&
+ evt.metaKey !== state[XK_Meta_L] && keysym !== XK_Meta_L) {
+ state[XK_Meta_L] = evt.metaKey;
+ result.push(syncKey(XK_Meta_L));
}
return result;
}
@@ -211,21 +210,21 @@ var kbdUtil = (function() {
return shiftPressed ? keycode : keycode + 32; // A-Z
}
if (keycode >= 0x60 && keycode <= 0x69) {
- return 0xffb0 + (keycode - 0x60); // numpad 0-9
+ return XK_KP_0 + (keycode - 0x60); // numpad 0-9
}
switch(keycode) {
- case 0x20: return 0x20; // space
- case 0x6a: return 0xffaa; // multiply
- case 0x6b: return 0xffab; // add
- case 0x6c: return 0xffac; // separator
- case 0x6d: return 0xffad; // subtract
- case 0x6e: return 0xffae; // decimal
- case 0x6f: return 0xffaf; // divide
- case 0xbb: return 0x2b; // +
- case 0xbc: return 0x2c; // ,
- case 0xbd: return 0x2d; // -
- case 0xbe: return 0x2e; // .
+ case 0x20: return XK_space;
+ case 0x6a: return XK_KP_Multiply;
+ case 0x6b: return XK_KP_Add;
+ case 0x6c: return XK_KP_Separator;
+ case 0x6d: return XK_KP_Subtract;
+ case 0x6e: return XK_KP_Decimal;
+ case 0x6f: return XK_KP_Divide;
+ case 0xbb: return XK_plus;
+ case 0xbc: return XK_comma;
+ case 0xbd: return XK_minus;
+ case 0xbe: return XK_period;
}
return nonCharacterKey({keyCode: keycode});
@@ -239,43 +238,44 @@ var kbdUtil = (function() {
var keycode = evt.keyCode;
if (keycode >= 0x70 && keycode <= 0x87) {
- return 0xffbe + keycode - 0x70; // F1-F24
+ return XK_F1 + keycode - 0x70; // F1-F24
}
switch (keycode) {
- case 8 : return 0xFF08; // BACKSPACE
- case 13 : return 0xFF0D; // ENTER
-
- case 9 : return 0xFF09; // TAB
-
- case 27 : return 0xFF1B; // ESCAPE
- case 46 : return 0xFFFF; // DELETE
-
- case 36 : return 0xFF50; // HOME
- case 35 : return 0xFF57; // END
- case 33 : return 0xFF55; // PAGE_UP
- case 34 : return 0xFF56; // PAGE_DOWN
- case 45 : return 0xFF63; // INSERT
-
- case 37 : return 0xFF51; // LEFT
- case 38 : return 0xFF52; // UP
- case 39 : return 0xFF53; // RIGHT
- case 40 : return 0xFF54; // DOWN
- case 16 : return 0xFFE1; // SHIFT
- case 17 : return 0xFFE3; // CONTROL
- case 18 : return 0xFFE9; // Left ALT (Mac Option)
-
- case 224 : return 0xFE07; // Meta
- case 225 : return 0xFE03; // AltGr
- case 91 : return 0xFFEC; // Super_L (Win Key)
- case 92 : return 0xFFED; // Super_R (Win Key)
- case 93 : return 0xFF67; // Menu (Win Menu), Mac Command
+ case 8 : return XK_BackSpace;
+ case 13 : return XK_Return;
+
+ case 9 : return XK_Tab;
+
+ case 27 : return XK_Escape;
+ case 46 : return XK_Delete;
+
+ case 36 : return XK_Home;
+ case 35 : return XK_End;
+ case 33 : return XK_Page_Up;
+ case 34 : return XK_Page_Down;
+ case 45 : return XK_Insert;
+
+ case 37 : return XK_Left;
+ case 38 : return XK_Up;
+ case 39 : return XK_Right;
+ case 40 : return XK_Down;
+
+ case 16 : return XK_Shift_L;
+ case 17 : return XK_Control_L;
+ case 18 : return XK_Alt_L; // also: Option-key on Mac
+
+ case 224 : return XK_Meta_L;
+ case 225 : return XK_ISO_Level3_Shift; // AltGr
+ case 91 : return XK_Super_L; // also: Windows-key
+ case 92 : return XK_Super_R; // also: Windows-key
+ case 93 : return XK_Menu; // also: Windows-Menu, Command on Mac
default: return null;
}
}
return {
hasShortcutModifier : hasShortcutModifier,
- hasCharModifier : hasCharModifier,
+ hasCharModifier : hasCharModifier,
ModifierSync : ModifierSync,
getKey : getKey,
getKeysym : getKeysym,
diff --git a/webclients/novnc/include/keysym.js b/webclients/novnc/include/keysym.js
index a00d595..2b97198 100644
--- a/webclients/novnc/include/keysym.js
+++ b/webclients/novnc/include/keysym.js
@@ -170,6 +170,8 @@ XK_Super_R = 0xffec, /* Right super */
XK_Hyper_L = 0xffed, /* Left hyper */
XK_Hyper_R = 0xffee, /* Right hyper */
+XK_ISO_Level3_Shift = 0xfe03, /* AltGr */
+
/*
* Latin 1
* (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
diff --git a/webclients/novnc/include/rfb.js b/webclients/novnc/include/rfb.js
index 0afe656..59fd785 100644
--- a/webclients/novnc/include/rfb.js
+++ b/webclients/novnc/include/rfb.js
@@ -252,12 +252,12 @@ var RFB;
Util.Info("Sending Ctrl-Alt-Del");
var arr = [];
- arr = arr.concat(RFB.messages.keyEvent(0xFFE3, 1)); // Control
- arr = arr.concat(RFB.messages.keyEvent(0xFFE9, 1)); // Alt
- arr = arr.concat(RFB.messages.keyEvent(0xFFFF, 1)); // Delete
- arr = arr.concat(RFB.messages.keyEvent(0xFFFF, 0)); // Delete
- arr = arr.concat(RFB.messages.keyEvent(0xFFE9, 0)); // Alt
- arr = arr.concat(RFB.messages.keyEvent(0xFFE3, 0)); // Control
+ arr = arr.concat(RFB.messages.keyEvent(XK_Control_L, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Alt_L, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Delete, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Delete, 0));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Alt_L, 0));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Control_L, 0));
this._sock.send(arr);
},
@@ -1496,8 +1496,7 @@ var RFB;
// Weird: ignore blanks are RAW
Util.Debug(" Ignoring blank after RAW");
} else {
- this._display.fillRect(x, y, w, h, rQ, rQi);
- rQi += this._FBU.bytes - 1;
+ this._display.fillRect(x, y, w, h, this._FBU.background);
}
} else if (this._FBU.subencoding & 0x01) { // Raw
this._display.blitImage(x, y, w, h, rQ, rQi);
diff --git a/webclients/novnc/include/ui.js b/webclients/novnc/include/ui.js
index e869aa6..50bbfcb 100644
--- a/webclients/novnc/include/ui.js
+++ b/webclients/novnc/include/ui.js
@@ -22,7 +22,7 @@ var UI;
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"jsunzip.js", "rfb.js", "keysym.js"]);
- var UI = {
+ UI = {
rfb_state : 'loaded',
settingsOpen : false,
@@ -883,7 +883,7 @@ var UI;
$D('showKeyboard').className = "noVNC_status_button";
//Weird bug in iOS if you change keyboardVisible
//here it does not actually occur so next time
- //you click keyboard icon it doesnt work.
+ //you click keyboard icon it doesn't work.
UI.hideKeyboardTimeout = setTimeout(function() { UI.setKeyboard(); },100);
},
diff --git a/webclients/novnc/include/vnc.js b/webclients/novnc/include/vnc.js
deleted file mode 100644
index 7679d84..0000000
--- a/webclients/novnc/include/vnc.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * noVNC: HTML5 VNC client
- * Copyright (C) 2012 Joel Martin
- * Licensed under LGPL-3 (see LICENSE.txt)
- *
- * See README.md for usage and integration instructions.
- */
-
-/*jslint evil: true */
-/*global window, document, INCLUDE_URI */
-
-/*
- * Load supporting scripts
- */
-function get_INCLUDE_URI() {
- return (typeof INCLUDE_URI !== "undefined") ? INCLUDE_URI : "include/";
-}
-
-(function () {
- "use strict";
-
- var extra = "", start, end;
-
- start = "<script src='" + get_INCLUDE_URI();
- end = "'><\/script>";
-
- // Uncomment to activate firebug lite
- //extra += "<script src='http://getfirebug.com/releases/lite/1.2/" +
- // "firebug-lite-compressed.js'><\/script>";
-
- extra += start + "util.js" + end;
- extra += start + "webutil.js" + end;
- extra += start + "base64.js" + end;
- extra += start + "websock.js" + end;
- extra += start + "des.js" + end;
- extra += start + "input.js" + end;
- extra += start + "display.js" + end;
- extra += start + "rfb.js" + end;
- extra += start + "jsunzip.js" + end;
-
- document.write(extra);
-}());
-
diff --git a/webclients/novnc/vnc_auto.html b/webclients/novnc/vnc_auto.html
index ff376fe..b05024e 100644
--- a/webclients/novnc/vnc_auto.html
+++ b/webclients/novnc/vnc_auto.html
@@ -77,7 +77,7 @@
// Load supporting scripts
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
- "jsunzip.js", "rfb.js"]);
+ "jsunzip.js", "rfb.js", "keysym.js"]);
var rfb;