mirror of
git://git.proxmox.com/git/vncterm.git
synced 2024-12-21 17:33:50 +03:00
imported from svn 'vncterm/pve2'
This commit is contained in:
commit
e6d0212c1e
BIN
LibVNCServer-0.9.7.tar.gz
Normal file
BIN
LibVNCServer-0.9.7.tar.gz
Normal file
Binary file not shown.
121
Makefile
Normal file
121
Makefile
Normal file
@ -0,0 +1,121 @@
|
||||
RELEASE=2.0
|
||||
|
||||
PACKAGE=vncterm
|
||||
VERSION=1.0
|
||||
PACKAGERELEASE=1
|
||||
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
CDATE:=$(shell date +%F)
|
||||
|
||||
VNCVER=0.9.7
|
||||
VNCDIR=LibVNCServer-${VNCVER}
|
||||
VNCSRC=${VNCDIR}.tar.gz
|
||||
VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a
|
||||
|
||||
TIGERVNCSRC=tigervnc-1.1.0.tgz
|
||||
|
||||
DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
|
||||
SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz
|
||||
|
||||
KEYSTORE=/home/dietmar/pve2-proxdev/proxmox-dev/proxmox-java.keystore
|
||||
|
||||
all: vncterm
|
||||
|
||||
glyphs.h: genfont
|
||||
./genfont > glyphs.h
|
||||
|
||||
genfont: genfont.c
|
||||
gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
|
||||
|
||||
.PHONY: vnc
|
||||
${VNCLIB} vnc: ${VNCSRC}
|
||||
rm -rf ${VNCDIR}
|
||||
tar xf ${VNCSRC}
|
||||
ln -s ../vncpatches ${VNCDIR}/patches
|
||||
cd ${VNCDIR}; quilt push -a
|
||||
cd ${VNCDIR}; ./configure;
|
||||
cd ${VNCDIR}; make
|
||||
|
||||
vncterm: vncterm.c glyphs.h ${VNCLIB}
|
||||
gcc -O2 -g -o $@ vncterm.c -Wall -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls
|
||||
|
||||
jar: tigervnc.org
|
||||
rm -rf tigervnc VncViewer.jar
|
||||
rsync -av --exclude .svn --exclude .svnignore tigervnc.org/ tigervnc
|
||||
ln -s ../tigerpatches tigervnc/patches
|
||||
cd tigervnc; quilt push -a
|
||||
cd tigervnc/java/src/com/tigervnc/vncviewer; make clean; make
|
||||
jarsigner -keystore ${KEYSTORE} -signedjar VncViewer.jar tigervnc/java/src/com/tigervnc/vncviewer/VncViewer.jar proxmox
|
||||
|
||||
tigervnc.org: ${TIGERVNCSRC}
|
||||
rm -rf tigervnc.org
|
||||
tar xf ${TIGERVNCSRC}
|
||||
|
||||
downlaod:
|
||||
rm -rf tigervnc.org
|
||||
svn co https://tigervnc.svn.sourceforge.net/svnroot/tigervnc/tags/1_1_0 tigervnc.org
|
||||
tar cf ${TIGERVNCSRC} tigervnc.org
|
||||
|
||||
.PHONY: install
|
||||
install: vncterm vncterm.1 VncViewer.jar
|
||||
mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
|
||||
mkdir -p ${DESTDIR}/usr/share/man/man1
|
||||
mkdir -p ${DESTDIR}/usr/bin
|
||||
install -s -m 0755 vncterm ${DESTDIR}/usr/bin
|
||||
mkdir -p ${DESTDIR}/usr/share/vncterm/
|
||||
install -m 0644 VncViewer.jar ${DESTDIR}/usr/share/vncterm/
|
||||
|
||||
.PHONY: dinstall
|
||||
dinstall: ${DEB}
|
||||
dpkg -i ${DEB}
|
||||
|
||||
vncterm.1: vncterm.pod
|
||||
rm -f $@
|
||||
pod2man -n $< -s 1 -r ${VERSION} <$< >$@
|
||||
|
||||
.PHONY: deb
|
||||
${DEB} deb:
|
||||
make clean
|
||||
rm -rf dest
|
||||
mkdir dest
|
||||
make DESTDIR=`pwd`/dest install
|
||||
install -d -m 0755 dest/DEBIAN
|
||||
install -m 0644 debian/control dest/DEBIAN
|
||||
echo "Architecture: ${ARCH}" >>dest/DEBIAN/control
|
||||
install -m 0644 debian/conffiles dest/DEBIAN
|
||||
install -m 0644 copyright dest/usr/share/doc/${PACKAGE}
|
||||
install -m 0644 vncterm.1 dest/usr/share/man/man1
|
||||
install -m 0644 debian/changelog.Debian dest/usr/share/doc/${PACKAGE}
|
||||
gzip --best dest/usr/share/man/*/*
|
||||
gzip --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
|
||||
dpkg-deb --build dest
|
||||
mv dest.deb ${DEB}
|
||||
rm -rf dest
|
||||
lintian ${DEB}
|
||||
|
||||
.PHONY: upload
|
||||
upload: ${DEB}
|
||||
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
|
||||
mkdir -p /pve/${RELEASE}/extra
|
||||
rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
|
||||
rm -f /pve/${RELEASE}/extra/Packages*
|
||||
cp ${DEB} /pve/${RELEASE}/extra
|
||||
cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
|
||||
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf vncterm vncterm.1 vncterm_*.deb tigervnc *~ ${VNCDIR} vncterm-*.tar.gz
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
rm -rf tigervnc.org
|
||||
|
||||
.PHONY: dist
|
||||
${SNAP} dist: distclean
|
||||
rm -rf ../${SNAP}
|
||||
cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE}
|
||||
mv ../${SNAP} ${SNAP}
|
||||
|
||||
.PHONY: uploaddist
|
||||
uploaddist: ${SNAP}
|
||||
scp ${SNAP} pve.proxmox.com:/home/ftp/sources/
|
47
README
Normal file
47
README
Normal file
@ -0,0 +1,47 @@
|
||||
Simple VNC terminal emulator (inspired by VncCommand)
|
||||
|
||||
We try to simulate a 'xterm', because we want to support:
|
||||
|
||||
- unicode
|
||||
- mouse
|
||||
|
||||
and xterm seems to be the best solution for that.
|
||||
|
||||
some code is inspired by: qemu, VncCommand, xterm, linux kernel, ...
|
||||
|
||||
libvncserver
|
||||
============
|
||||
|
||||
LibVNCServer does not suppurt TLS currently. So we staically link to a
|
||||
patched versions on that library instead of using the debian shared
|
||||
libraries.
|
||||
|
||||
VNC Java Applet (for use in web based applications):
|
||||
====================================================
|
||||
|
||||
We use patched VncViewer files (latest TigerVNC sources):
|
||||
|
||||
http://www.tigervnc.com/
|
||||
|
||||
We sign the applet to make clipboard working.
|
||||
|
||||
|
||||
TODO:
|
||||
=====
|
||||
|
||||
Useful sources for terminal emulation:
|
||||
|
||||
xterm source: ctlseqs.txt
|
||||
http://vt100.net/docs/vt220-rm
|
||||
man 5 terminfo
|
||||
infocmp xterm
|
||||
man console_codes
|
||||
|
||||
Fonts:
|
||||
|
||||
we currently use fonts provided by the debian console-data package:
|
||||
see /usr/share/consolefonts/*
|
||||
|
||||
Only 8x16 fonts are supported
|
||||
|
||||
TODO contains a list of unimplemented things.
|
12
TODO
Normal file
12
TODO
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
TODO:
|
||||
better command line parser - print usage infos
|
||||
implement some kind of regression testing
|
||||
cleanup the TLS patch and try to merge into upstream
|
||||
scroll/history support?
|
||||
more ESC sequences (see xterm source ctlseqs.txt)
|
||||
disp_ctrl
|
||||
add arabic font glyphs
|
||||
add japanese font glyphs
|
||||
add other font glyphs (maybe http://openlab.jp/efont/unicode/)?
|
||||
|
BIN
VncViewer.jar
Normal file
BIN
VncViewer.jar
Normal file
Binary file not shown.
20
copyright
Normal file
20
copyright
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (C) 2007 Proxmox Server Solutions GmbH
|
||||
|
||||
Copyright: vncterm is under GNU GPL, the GNU General Public License.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
25
debian/changelog.Debian
vendored
Normal file
25
debian/changelog.Debian
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
vncterm (1.0-1) unstable; urgency=low
|
||||
|
||||
* use TigerVNC java sources
|
||||
|
||||
* implement TLS encryption and vencrypt password auth
|
||||
|
||||
* removed support for -passwdfile option
|
||||
|
||||
-- root <root@maui.maurer-it.com> Mon, 24 Jan 2011 10:46:25 +0100
|
||||
|
||||
vncterm (0.9-2) unstable; urgency=low
|
||||
|
||||
* compiled for debian etch
|
||||
|
||||
* use memmove instead of rfbDoCopyRect (avoid SIGSEGV when
|
||||
called with negative dy)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 22 Apr 2009 10:02:08 +0200
|
||||
|
||||
vncterm (0.9-1) stable; urgency=low
|
||||
|
||||
* initial import
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Dec 2007 05:57:17 +0100
|
||||
|
0
debian/conffiles
vendored
Normal file
0
debian/conffiles
vendored
Normal file
9
debian/control
vendored
Normal file
9
debian/control
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Package: vncterm
|
||||
Version: 1.0-1
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Depends: libc6 (>= 2.7-18), libjpeg62, zlib1g (>= 1:1.2.1), libvncserver0
|
||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||
Description: VNC Terminal Emulator
|
||||
With vncterm you can start commands and export its standard input and
|
||||
output to any VNC client (simulating a xterm Terminal).
|
213
genfont.c
Normal file
213
genfont.c
Normal file
@ -0,0 +1,213 @@
|
||||
/*
|
||||
|
||||
Copyright (C) 2007 Proxmox Server Solutions GmbH
|
||||
|
||||
Copyright: vzdump is under GNU GPL, the GNU General Public License.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 dated June, 1991.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
|
||||
Author: Dietmar Maurer <dietmar@proxmox.com>
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <zlib.h> /* read compressed console fonts */
|
||||
#include <glob.h>
|
||||
#include <string.h>
|
||||
|
||||
/* map unicode to font */
|
||||
static unsigned short vt_fontmap[65536];
|
||||
|
||||
/* font glyph storage */
|
||||
static unsigned char *vt_font_data = NULL;
|
||||
static int vt_font_size = 0;
|
||||
static int vt_font_maxsize = 0;
|
||||
|
||||
/* PSF stuff */
|
||||
|
||||
|
||||
#define PSF_MAGIC1 0x36
|
||||
#define PSF_MAGIC2 0x04
|
||||
|
||||
#define PSF_MODE256NOSFM 0
|
||||
#define PSF_MODE512NOSFM 1
|
||||
#define PSF_MODE256SFM 2
|
||||
#define PSF_MODE512SFM 3
|
||||
|
||||
#define PSF_SEPARATOR 0xFFFF
|
||||
|
||||
struct psf_header
|
||||
{
|
||||
unsigned char magic1, magic2; /* Magic number */
|
||||
unsigned char mode; /* PSF font mode */
|
||||
unsigned char charheight; /* Character size */
|
||||
};
|
||||
|
||||
#define PSF_MAGIC_OK(x) ((x).magic1 == PSF_MAGIC1 && (x).magic2 == PSF_MAGIC2)
|
||||
#define PSF_MODE_VALID(x) ((x) <= PSF_MODE512SFM)
|
||||
#define PSF_MODE_HAS512(x) (((x) == 1) || ((x) == 3))
|
||||
#define PSF_MODE_HASSFM(x) (((x) == 2) || ((x) == 3))
|
||||
|
||||
typedef unsigned short unicode;
|
||||
|
||||
static int
|
||||
font_add_glyph (const char *data)
|
||||
{
|
||||
|
||||
if (vt_font_size >= vt_font_maxsize) {
|
||||
vt_font_maxsize += 256;
|
||||
vt_font_data = realloc (vt_font_data, vt_font_maxsize*16);
|
||||
}
|
||||
|
||||
memcpy (vt_font_data + vt_font_size*16, data, 16);
|
||||
|
||||
vt_font_size += 1;
|
||||
|
||||
return vt_font_size - 1;
|
||||
}
|
||||
|
||||
static int
|
||||
load_psf_font (const char *filename, int is_default)
|
||||
{
|
||||
struct psf_header psfhdr;
|
||||
|
||||
gzFile *f = gzopen (filename, "rb");
|
||||
if (f == NULL) {
|
||||
fprintf (stderr, "unable to read file %s\n", filename);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// read psf header
|
||||
if (gzread(f, &psfhdr, sizeof(struct psf_header)) != sizeof(struct psf_header)) {
|
||||
fprintf (stderr, "unable to read psf font header (%s)\n", filename);
|
||||
gzclose (f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!PSF_MAGIC_OK(psfhdr) || !PSF_MODE_VALID(psfhdr.mode) ||
|
||||
!PSF_MODE_HASSFM(psfhdr.mode) || (psfhdr.charheight != 16)) {
|
||||
fprintf (stderr, "no valid 8*16 psf font (%s)\n", filename);
|
||||
gzclose (f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int charcount = ((PSF_MODE_HAS512(psfhdr.mode)) ? 512 : 256);
|
||||
|
||||
int size = 16*charcount;
|
||||
|
||||
char *chardata = (char *)malloc (size);
|
||||
|
||||
if (size != gzread(f, chardata, size)) {
|
||||
fprintf (stderr, "unable to read font character data (%s)\n", filename);
|
||||
gzclose (f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
unicode unichar;
|
||||
int glyph;
|
||||
|
||||
for (glyph = 0 ;glyph < charcount ;glyph++) {
|
||||
int fi = 0;
|
||||
while (gzread (f, &unichar, sizeof(unicode)) == sizeof(unicode) &&
|
||||
(unichar != PSF_SEPARATOR)) {
|
||||
if (!vt_fontmap[unichar]) {
|
||||
if (!fi) {
|
||||
fi = font_add_glyph (chardata + glyph*16);
|
||||
}
|
||||
vt_fontmap[unichar] = fi;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_default && fi && glyph < 256) {
|
||||
vt_fontmap[0xf000 + glyph] = fi;
|
||||
}
|
||||
}
|
||||
|
||||
free (chardata);
|
||||
gzclose (f);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
print_glyphs ()
|
||||
{
|
||||
int i, j;
|
||||
|
||||
printf ("static int vt_font_size = %d;\n\n", vt_font_size);
|
||||
|
||||
printf ("static unsigned char vt_font_data[] = {\n");
|
||||
for (i = 0; i < vt_font_size; i++) {
|
||||
printf ("\t/* %d 0x%02x */\n", i, i);
|
||||
for (j = 0; j < 16; j++) {
|
||||
unsigned char d = vt_font_data[i*16+j];
|
||||
printf ("\t0x%02X, /* ", d);
|
||||
int k;
|
||||
for (k = 128; k > 0; k = k>>1) {
|
||||
printf ("%c", (d & k) ? '1': '0');
|
||||
}
|
||||
printf (" */\n");
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
printf ("};\n\n");
|
||||
|
||||
printf ("static unsigned short vt_fontmap[65536] = {\n");
|
||||
for (i = 0; i < 0x0ffff; i++) {
|
||||
printf ("\t/* 0x%04X => */ %d,\n", i, vt_fontmap[i]);
|
||||
}
|
||||
printf ("};\n\n");
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char** argv)
|
||||
{
|
||||
char empty[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
glob_t globbuf;
|
||||
|
||||
font_add_glyph (empty);
|
||||
|
||||
/* font load order is only important if glyphs are redefined */
|
||||
load_psf_font ("/usr/share/consolefonts/default8x16.psf.gz", 1); /* vga default */
|
||||
load_psf_font ("/usr/share/consolefonts/lat1u-16.psf.gz", 0); /* Latin-1 */
|
||||
load_psf_font ("/usr/share/consolefonts/lat2u-16.psf.gz", 0); /* Latin-2 */
|
||||
load_psf_font ("/usr/share/consolefonts/lat4u-16.psf.gz", 0); /* Baltic */
|
||||
|
||||
load_psf_font ("/usr/share/consolefonts/iso07.f16.psf.gz", 0); /* Greek */
|
||||
load_psf_font ("/usr/share/consolefonts/Goha-16.psf.gz", 0); /* Ethiopic */
|
||||
|
||||
/* fixme: Arabic, Japanese letters ? */
|
||||
|
||||
if (0) {
|
||||
glob("/usr/share/consolefonts/*", GLOB_ERR, NULL, &globbuf);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < globbuf.gl_pathc; i++) {
|
||||
int pc = vt_font_size;
|
||||
load_psf_font (globbuf.gl_pathv[i], 0);
|
||||
if (vt_font_size > pc) {
|
||||
printf ("TEST: %s %d\n", globbuf.gl_pathv[i], vt_font_size - pc);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
print_glyphs ();
|
||||
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
43
tigerpatches/export-ctrl-alt-delete.patch
Normal file
43
tigerpatches/export-ctrl-alt-delete.patch
Normal file
@ -0,0 +1,43 @@
|
||||
Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-25 07:44:23.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:16.000000000 +0100
|
||||
@@ -466,6 +466,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ public void sendRefreshRequest()
|
||||
+ {
|
||||
+ if (rfb == null)
|
||||
+ return;
|
||||
+
|
||||
+ try {
|
||||
+ rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
|
||||
+ rfb.framebufferHeight, false);
|
||||
+ } catch (IOException e) {
|
||||
+ e.printStackTrace();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void sendCtrlAltDel()
|
||||
+ {
|
||||
+ if (rfb == null)
|
||||
+ return;
|
||||
+
|
||||
+ int modifiers = InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
|
||||
+
|
||||
+ try {
|
||||
+ KeyEvent ctrlAltDelEvent =
|
||||
+ new KeyEvent(this, KeyEvent.KEY_PRESSED, 0, modifiers, 127);
|
||||
+ rfb.writeKeyEvent(ctrlAltDelEvent);
|
||||
+
|
||||
+ ctrlAltDelEvent =
|
||||
+ new KeyEvent(this, KeyEvent.KEY_RELEASED, 0, modifiers, 127);
|
||||
+ rfb.writeKeyEvent(ctrlAltDelEvent);
|
||||
+ } catch (IOException e) {
|
||||
+ e.printStackTrace();
|
||||
+ }
|
||||
+ }
|
||||
|
||||
//
|
||||
// Show an authentication panel.
|
114
tigerpatches/javascript-events.patch
Normal file
114
tigerpatches/javascript-events.patch
Normal file
@ -0,0 +1,114 @@
|
||||
Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-24 15:39:36.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-24 16:08:09.000000000 +0100
|
||||
@@ -27,11 +27,15 @@
|
||||
|
||||
package com.tigervnc.vncviewer;
|
||||
|
||||
+import netscape.javascript.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
+import java.awt.Graphics;
|
||||
+import java.applet.Applet;
|
||||
+
|
||||
public class VncViewer extends java.applet.Applet
|
||||
implements java.lang.Runnable, WindowListener, ComponentListener {
|
||||
|
||||
@@ -91,6 +95,9 @@
|
||||
int debugStatsExcludeUpdates;
|
||||
int debugStatsMeasureUpdates;
|
||||
|
||||
+ JSObject jswin;
|
||||
+ String myid;
|
||||
+
|
||||
// Reference to this applet for inter-applet communication.
|
||||
public static java.applet.Applet refApplet;
|
||||
|
||||
@@ -104,6 +111,11 @@
|
||||
|
||||
refApplet = this;
|
||||
|
||||
+ if (inAnApplet) {
|
||||
+ jswin = JSObject.getWindow(this);
|
||||
+ myid = getParameter("id");
|
||||
+ }
|
||||
+
|
||||
if (inSeparateFrame) {
|
||||
vncFrame = new Frame("TigerVNC");
|
||||
if (!inAnApplet) {
|
||||
@@ -134,6 +146,9 @@
|
||||
|
||||
rfbThread = new Thread(this);
|
||||
rfbThread.start();
|
||||
+
|
||||
+ String[] myparam = { myid, "init"};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
}
|
||||
|
||||
public void update(Graphics g) {
|
||||
@@ -936,6 +951,8 @@
|
||||
|
||||
if (inAnApplet) {
|
||||
showMessage("Disconnected");
|
||||
+ String[] myparam = { myid, "disconnect"};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
} else {
|
||||
System.exit(0);
|
||||
}
|
||||
@@ -953,6 +970,8 @@
|
||||
// vncContainer null, applet not inited,
|
||||
// can not present the error to the user.
|
||||
Thread.currentThread().stop();
|
||||
+ String[] myparam = { myid, "error", str};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
} else {
|
||||
System.exit(1);
|
||||
}
|
||||
@@ -974,6 +993,8 @@
|
||||
rfb.close();
|
||||
|
||||
if (inAnApplet) {
|
||||
+ String[] myparam = { myid, "error", str};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
showMessage(str);
|
||||
} else {
|
||||
System.exit(1);
|
||||
@@ -1043,6 +1064,9 @@
|
||||
rfb.close();
|
||||
if (inSeparateFrame)
|
||||
vncFrame.dispose();
|
||||
+
|
||||
+ String[] myparam = { myid, "destroy"};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1091,6 +1115,8 @@
|
||||
if (!inAnApplet) {
|
||||
System.exit(0);
|
||||
}
|
||||
+ String[] myparam = { myid, "close"};
|
||||
+ jswin.call("PVE_vnc_console_event", myparam);
|
||||
}
|
||||
|
||||
//
|
||||
Index: new/java/src/com/tigervnc/vncviewer/Makefile
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/Makefile 2011-01-24 15:39:36.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/Makefile 2011-01-24 16:08:09.000000000 +0100
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
CP = cp
|
||||
JC = javac
|
||||
-JCFLAGS = -target 1.5 -classpath ../../../
|
||||
+# define java.ext.dirs, else plugin.jar (JSObject) is not found
|
||||
+# is there a better way to include that?
|
||||
+JCFLAGS = -target 1.5 -classpath ../../../ -Djava.ext.dirs=/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/
|
||||
+
|
||||
JAR = jar
|
||||
ARCHIVE = VncViewer.jar
|
||||
MANIFEST = MANIFEST.MF
|
14
tigerpatches/keydebug.patch
Normal file
14
tigerpatches/keydebug.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Index: new/java/src/com/tigervnc/vncviewer/RfbProto.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/RfbProto.java 2011-01-20 08:14:34.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/RfbProto.java 2011-01-20 08:19:20.000000000 +0100
|
||||
@@ -938,6 +938,9 @@
|
||||
|
||||
int keyChar = evt.getKeyChar();
|
||||
|
||||
+ int test = evt.getKeyCode();
|
||||
+ System.out.println("KEYCODE: " + evt.getKeyText(test));
|
||||
+
|
||||
//
|
||||
// Ignore event if only modifiers were pressed.
|
||||
//
|
5
tigerpatches/series
Normal file
5
tigerpatches/series
Normal file
@ -0,0 +1,5 @@
|
||||
#keydebug.patch
|
||||
javascript-events.patch
|
||||
export-ctrl-alt-delete.patch
|
||||
trust-manager.patch
|
||||
username-param.patch
|
193
tigerpatches/trust-manager.patch
Normal file
193
tigerpatches/trust-manager.patch
Normal file
@ -0,0 +1,193 @@
|
||||
|
||||
Unfortunately the java certificate store does not correctly access
|
||||
the browser certificate store (firefox, chrome). We also tunnel VNC
|
||||
traffic from other cluster nodes.
|
||||
|
||||
So we implement our own trust manager, and allow to pass the server
|
||||
certificate (or CA who signed the server certificate) as applet
|
||||
parameter "PVECert" (newline encoded as '|').
|
||||
|
||||
Index: new/java/src/com/tigervnc/vncviewer/X509Tunnel.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/X509Tunnel.java 2011-01-28 13:22:50.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/X509Tunnel.java 2011-01-28 13:26:51.000000000 +0100
|
||||
@@ -26,13 +26,23 @@
|
||||
import javax.net.ssl.*;
|
||||
import java.security.*;
|
||||
import java.security.cert.*;
|
||||
+import java.security.cert.Certificate;
|
||||
+import java.security.cert.CertificateFactory;
|
||||
+import java.io.*;
|
||||
|
||||
public class X509Tunnel extends TLSTunnelBase
|
||||
{
|
||||
|
||||
- public X509Tunnel (Socket sock_)
|
||||
+ Certificate pvecert;
|
||||
+
|
||||
+ public X509Tunnel (Socket sock_, String certstr) throws CertificateException
|
||||
{
|
||||
super (sock_);
|
||||
+
|
||||
+ if (certstr != null) {
|
||||
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
+ pvecert = cf.generateCertificate(new StringBufferInputStream(certstr));
|
||||
+ }
|
||||
}
|
||||
|
||||
protected void setParam (SSLSocket sock)
|
||||
@@ -52,9 +62,51 @@
|
||||
protected void initContext (SSLContext sc) throws java.security.
|
||||
GeneralSecurityException
|
||||
{
|
||||
- TrustManager[] myTM = new TrustManager[]
|
||||
- {
|
||||
- new MyX509TrustManager ()};
|
||||
+ TrustManager[] myTM;
|
||||
+
|
||||
+ if (pvecert != null) {
|
||||
+ myTM = new TrustManager[] {
|
||||
+ new X509TrustManager() {
|
||||
+ public java.security.cert.X509Certificate[]
|
||||
+ getAcceptedIssuers() {
|
||||
+ return null;
|
||||
+ }
|
||||
+ public void checkClientTrusted(
|
||||
+ java.security.cert.X509Certificate[] certs,
|
||||
+ String authType) throws CertificateException {
|
||||
+ throw new CertificateException("no clients");
|
||||
+ }
|
||||
+ public void checkServerTrusted(
|
||||
+ java.security.cert.X509Certificate[] certs,
|
||||
+ String authType) throws CertificateException {
|
||||
+
|
||||
+ if (certs == null || certs.length < 1) {
|
||||
+ throw new CertificateException("no certs");
|
||||
+ }
|
||||
+ if (certs == null || certs.length > 1) {
|
||||
+ throw new CertificateException("cert path too long");
|
||||
+ }
|
||||
+ PublicKey cakey = pvecert.getPublicKey();
|
||||
+
|
||||
+ boolean ca_match;
|
||||
+ try {
|
||||
+ certs[0].verify(cakey);
|
||||
+ ca_match = true;
|
||||
+ } catch (Exception e) {
|
||||
+ ca_match = false;
|
||||
+ }
|
||||
+
|
||||
+ if (!ca_match && !pvecert.equals(certs[0])) {
|
||||
+ throw new CertificateException("certificate does not match");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ } else {
|
||||
+ myTM = new TrustManager[] {
|
||||
+ new MyX509TrustManager ()
|
||||
+ };
|
||||
+ }
|
||||
sc.init (null, myTM, null);
|
||||
}
|
||||
|
||||
@@ -100,4 +152,5 @@
|
||||
return tm.getAcceptedIssuers ();
|
||||
}
|
||||
}
|
||||
+
|
||||
}
|
||||
Index: new/java/src/com/tigervnc/vncviewer/RfbProto.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/RfbProto.java 2011-01-28 13:22:50.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/RfbProto.java 2011-01-28 13:26:51.000000000 +0100
|
||||
@@ -411,7 +411,8 @@
|
||||
}
|
||||
|
||||
void authenticateX509() throws Exception {
|
||||
- X509Tunnel tunnel = new X509Tunnel(sock);
|
||||
+
|
||||
+ X509Tunnel tunnel = new X509Tunnel(sock, viewer.PVECert);
|
||||
tunnel.setup (this);
|
||||
}
|
||||
|
||||
Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:16.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:51.000000000 +0100
|
||||
@@ -95,6 +95,8 @@
|
||||
int debugStatsExcludeUpdates;
|
||||
int debugStatsMeasureUpdates;
|
||||
|
||||
+ String PVECert;
|
||||
+
|
||||
JSObject jswin;
|
||||
String myid;
|
||||
|
||||
@@ -278,7 +280,7 @@
|
||||
fatalError(e.toString(), e);
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
}
|
||||
|
||||
//
|
||||
@@ -314,7 +316,7 @@
|
||||
// If the rfbThread is being stopped, ignore any exceptions,
|
||||
// otherwise rethrow the exception so it can be handled.
|
||||
//
|
||||
-
|
||||
+
|
||||
void processNormalProtocol() throws Exception {
|
||||
try {
|
||||
vc.processNormalProtocol();
|
||||
@@ -857,6 +859,11 @@
|
||||
|
||||
// SocketFactory.
|
||||
socketFactory = readParameter("SocketFactory", false);
|
||||
+
|
||||
+ String tmpcert = readParameter("PVECert", false);
|
||||
+ if (tmpcert != null) {
|
||||
+ PVECert = tmpcert.replace('|', '\n');
|
||||
+ }
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1010,7 +1017,7 @@
|
||||
}
|
||||
|
||||
synchronized public void fatalError(String str, Exception e) {
|
||||
-
|
||||
+
|
||||
if (rfb != null && rfb.closed()) {
|
||||
// Not necessary to show error message if the error was caused
|
||||
// by I/O problems after the rfb.close() method call.
|
||||
@@ -1108,11 +1115,11 @@
|
||||
public void enableInput(boolean enable) {
|
||||
vc.enableInput(enable);
|
||||
}
|
||||
-
|
||||
+
|
||||
//
|
||||
// Resize framebuffer if autoScale is enabled.
|
||||
//
|
||||
-
|
||||
+
|
||||
public void componentResized(ComponentEvent e) {
|
||||
if (e.getComponent() == vncFrame) {
|
||||
if (options.autoScale) {
|
||||
@@ -1124,11 +1131,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
//
|
||||
// Ignore component events we're not interested in.
|
||||
//
|
||||
-
|
||||
+
|
||||
public void componentShown(ComponentEvent e) { }
|
||||
public void componentMoved(ComponentEvent e) { }
|
||||
public void componentHidden(ComponentEvent e) { }
|
38
tigerpatches/username-param.patch
Normal file
38
tigerpatches/username-param.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
|
||||
===================================================================
|
||||
--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:51.000000000 +0100
|
||||
+++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:27:04.000000000 +0100
|
||||
@@ -86,6 +86,7 @@
|
||||
String host;
|
||||
int port;
|
||||
String passwordParam;
|
||||
+ String usernameParam;
|
||||
boolean showControls;
|
||||
boolean offerRelogin;
|
||||
boolean showOfflineDesktop;
|
||||
@@ -384,10 +385,12 @@
|
||||
break;
|
||||
case RfbProto.SecTypePlain:
|
||||
showConnectionStatus("Plain authentication");
|
||||
- {
|
||||
- String user = askUser();
|
||||
- String pw = askPassword();
|
||||
- rfb.authenticatePlain(user,pw);
|
||||
+ if (usernameParam != null && passwordParam != null) {
|
||||
+ rfb.authenticatePlain(usernameParam, passwordParam);
|
||||
+ } else {
|
||||
+ String user = askUser();
|
||||
+ String pw = askPassword();
|
||||
+ rfb.authenticatePlain(user,pw);
|
||||
}
|
||||
break;
|
||||
case RfbProto.SecTypeTLSNone:
|
||||
@@ -822,6 +825,8 @@
|
||||
// Read "ENCPASSWORD" or "PASSWORD" parameter if specified.
|
||||
readPasswordParameters();
|
||||
|
||||
+ usernameParam = readParameter("USERNAME", false);
|
||||
+
|
||||
String str;
|
||||
if (inAnApplet) {
|
||||
str = readParameter("Open New Window", false);
|
BIN
tigervnc-1.1.0.tgz
Normal file
BIN
tigervnc-1.1.0.tgz
Normal file
Binary file not shown.
1
vncpatches/series
Normal file
1
vncpatches/series
Normal file
@ -0,0 +1 @@
|
||||
tls-auth-pluging.patch
|
70
vncpatches/tls-auth-pluging.patch
Normal file
70
vncpatches/tls-auth-pluging.patch
Normal file
@ -0,0 +1,70 @@
|
||||
Index: vnc/libvncserver/auth.c
|
||||
===================================================================
|
||||
@@ -270,8 +270,9 @@
|
||||
int32_t securityType = rfbSecTypeInvalid;
|
||||
|
||||
if (!cl->screen->authPasswdData || cl->reverseConnection) {
|
||||
- /* chk if this condition is valid or not. */
|
||||
- securityType = rfbSecTypeNone;
|
||||
+ /* chk if this condition is valid or not. */
|
||||
+ /* we disable anonymous auth */
|
||||
+ // securityType = rfbSecTypeNone;
|
||||
} else if (cl->screen->authPasswdData) {
|
||||
securityType = rfbSecTypeVncAuth;
|
||||
}
|
||||
Index: vnc/newterm/Makefile.am
|
||||
Index: vnc/libvncserver/sockets.c
|
||||
===================================================================
|
||||
--- vnc.orig/libvncserver/sockets.c 2011-01-20 16:42:41.000000000 +0100
|
||||
+++ vnc/libvncserver/sockets.c 2011-01-21 10:20:03.000000000 +0100
|
||||
@@ -454,8 +454,12 @@
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
|
||||
+
|
||||
while (len > 0) {
|
||||
- n = read(sock, buf, len);
|
||||
+ if (cl->sock_read_fn)
|
||||
+ n = cl->sock_read_fn(cl, buf, len);
|
||||
+ else
|
||||
+ n = read(sock, buf, len);
|
||||
|
||||
if (n > 0) {
|
||||
|
||||
@@ -538,7 +542,10 @@
|
||||
|
||||
LOCK(cl->outputMutex);
|
||||
while (len > 0) {
|
||||
- n = write(sock, buf, len);
|
||||
+ if (cl->sock_write_fn)
|
||||
+ n = cl->sock_write_fn(cl, buf, len);
|
||||
+ else
|
||||
+ n = write(sock, buf, len);
|
||||
|
||||
if (n > 0) {
|
||||
|
||||
Index: vnc/rfb/rfb.h
|
||||
===================================================================
|
||||
--- vnc.orig/rfb/rfb.h 2011-01-20 16:36:06.000000000 +0100
|
||||
+++ vnc/rfb/rfb.h 2011-01-21 06:44:22.000000000 +0100
|
||||
@@ -397,6 +397,9 @@
|
||||
struct _rfbStatList *Next;
|
||||
} rfbStatList;
|
||||
|
||||
+typedef ssize_t (*sock_read_fn_t)(struct _rfbClientRec *cl, void *buf, size_t count);
|
||||
+typedef ssize_t (*sock_write_fn_t)(struct _rfbClientRec *cl, const void *buf, size_t count);
|
||||
+
|
||||
typedef struct _rfbClientRec {
|
||||
|
||||
/* back pointer to the screen */
|
||||
@@ -417,6 +420,10 @@
|
||||
void* clientData;
|
||||
ClientGoneHookPtr clientGoneHook;
|
||||
|
||||
+ /* use to hook up TLS read/write */
|
||||
+ sock_read_fn_t sock_read_fn;
|
||||
+ sock_read_fn_t sock_write_fn;
|
||||
+
|
||||
SOCKET sock;
|
||||
char *host;
|
||||
|
235
vncterm.h
Normal file
235
vncterm.h
Normal file
@ -0,0 +1,235 @@
|
||||
#include <rfb/rfb.h>
|
||||
|
||||
#define IBUFSIZE 1024
|
||||
#define MAX_ESC_PARAMS 16
|
||||
|
||||
typedef unsigned short unicode;
|
||||
|
||||
typedef struct TextAttributes {
|
||||
unsigned int fgcol:4;
|
||||
unsigned int bgcol:4;
|
||||
unsigned int bold:1;
|
||||
unsigned int uline:1;
|
||||
unsigned int blink:1;
|
||||
unsigned int invers:1;
|
||||
unsigned int unvisible:1;
|
||||
} TextAttributes;
|
||||
|
||||
typedef struct TextCell {
|
||||
unicode ch;
|
||||
TextAttributes attrib;
|
||||
} TextCell;
|
||||
|
||||
typedef struct vncTerm {
|
||||
int maxx;
|
||||
int maxy;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
int total_height;
|
||||
int scroll_height;
|
||||
int y_base;
|
||||
int y_displ;
|
||||
int altbuf:1;
|
||||
|
||||
unsigned int utf8:1; // utf8 mode
|
||||
long utf_char; // used by utf8 parser
|
||||
int utf_count; // used by utf8 parser
|
||||
|
||||
|
||||
TextAttributes default_attrib;
|
||||
|
||||
TextCell *cells;
|
||||
TextCell *altcells;
|
||||
|
||||
rfbScreenInfoPtr screen;
|
||||
|
||||
// cursor
|
||||
TextAttributes cur_attrib;
|
||||
TextAttributes cur_attrib_saved;
|
||||
int tty_state; // 0 - normal, 1 - ESC, 2 - CSI
|
||||
int cx; // cursor x position
|
||||
int cy; // cursor y position
|
||||
int cx_saved; // saved cursor x position
|
||||
int cy_saved; // saved cursor y position
|
||||
int esc_buf[MAX_ESC_PARAMS];
|
||||
int esc_count;
|
||||
int esc_ques;
|
||||
int esc_has_par;
|
||||
char osc_textbuf[4096];
|
||||
char osc_cmd;
|
||||
int region_top;
|
||||
int region_bottom;
|
||||
|
||||
unsigned int charset:1; // G0 or G1
|
||||
unsigned int charset_saved:1; // G0 or G1
|
||||
unsigned int g0enc:2;
|
||||
unsigned int g0enc_saved:2;
|
||||
unsigned int g1enc:2;
|
||||
unsigned int g1enc_saved:2;
|
||||
unsigned int cur_enc:2;
|
||||
unsigned int cur_enc_saved:2;
|
||||
|
||||
// input buffer
|
||||
char ibuf[IBUFSIZE];
|
||||
int ibuf_count;
|
||||
|
||||
unicode *selection;
|
||||
int selection_len;
|
||||
|
||||
unsigned int mark_active:1;
|
||||
|
||||
unsigned int report_mouse:1;
|
||||
|
||||
} vncTerm;
|
||||
|
||||
/* Unicode translations copied from kernel source consolemap.c */
|
||||
|
||||
#define LAT1_MAP 0
|
||||
#define GRAF_MAP 1
|
||||
#define IBMPC_MAP 2
|
||||
#define USER_MAP 3
|
||||
|
||||
static unsigned short translations[][256] = {
|
||||
/* 8-bit Latin-1 mapped to Unicode -- trivial mapping */
|
||||
{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f,
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
|
||||
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
|
||||
0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
|
||||
0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
|
||||
0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
|
||||
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
|
||||
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
|
||||
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
|
||||
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
},
|
||||
/* VT100 graphics mapped to Unicode */
|
||||
{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002a, 0x2192, 0x2190, 0x2191, 0x2193, 0x002f,
|
||||
0x2588, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x00a0,
|
||||
0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0, 0x00b1,
|
||||
0x2591, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba,
|
||||
0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c,
|
||||
0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x007f,
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
|
||||
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
|
||||
0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
|
||||
0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
|
||||
0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
|
||||
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
|
||||
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
|
||||
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
|
||||
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
},
|
||||
/* IBM Codepage 437 mapped to Unicode */
|
||||
{
|
||||
0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
|
||||
0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c,
|
||||
0x25b6, 0x25c0, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8,
|
||||
0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302,
|
||||
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7,
|
||||
0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
|
||||
0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9,
|
||||
0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192,
|
||||
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba,
|
||||
0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
|
||||
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
|
||||
0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
|
||||
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f,
|
||||
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
|
||||
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b,
|
||||
0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
|
||||
0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4,
|
||||
0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229,
|
||||
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
|
||||
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0
|
||||
},
|
||||
/* User mapping -- default to codes for direct font mapping */
|
||||
{
|
||||
0xf000, 0xf001, 0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007,
|
||||
0xf008, 0xf009, 0xf00a, 0xf00b, 0xf00c, 0xf00d, 0xf00e, 0xf00f,
|
||||
0xf010, 0xf011, 0xf012, 0xf013, 0xf014, 0xf015, 0xf016, 0xf017,
|
||||
0xf018, 0xf019, 0xf01a, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f,
|
||||
0xf020, 0xf021, 0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027,
|
||||
0xf028, 0xf029, 0xf02a, 0xf02b, 0xf02c, 0xf02d, 0xf02e, 0xf02f,
|
||||
0xf030, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037,
|
||||
0xf038, 0xf039, 0xf03a, 0xf03b, 0xf03c, 0xf03d, 0xf03e, 0xf03f,
|
||||
0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047,
|
||||
0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f,
|
||||
0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057,
|
||||
0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f,
|
||||
0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067,
|
||||
0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f,
|
||||
0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077,
|
||||
0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf07f,
|
||||
0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087,
|
||||
0xf088, 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0xf08f,
|
||||
0xf090, 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, 0xf097,
|
||||
0xf098, 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, 0xf09f,
|
||||
0xf0a0, 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, 0xf0a7,
|
||||
0xf0a8, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, 0xf0af,
|
||||
0xf0b0, 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, 0xf0b7,
|
||||
0xf0b8, 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, 0xf0bf,
|
||||
0xf0c0, 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, 0xf0c7,
|
||||
0xf0c8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0xf0ce, 0xf0cf,
|
||||
0xf0d0, 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d7,
|
||||
0xf0d8, 0xf0d9, 0xf0da, 0xf0db, 0xf0dc, 0xf0dd, 0xf0de, 0xf0df,
|
||||
0xf0e0, 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, 0xf0e5, 0xf0e6, 0xf0e7,
|
||||
0xf0e8, 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, 0xf0ed, 0xf0ee, 0xf0ef,
|
||||
0xf0f0, 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, 0xf0f5, 0xf0f6, 0xf0f7,
|
||||
0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf0fd, 0xf0fe, 0xf0ff
|
||||
}
|
||||
};
|
43
vncterm.pod
Normal file
43
vncterm.pod
Normal file
@ -0,0 +1,43 @@
|
||||
=head1 NAME
|
||||
|
||||
vncterm - VNC Terminal Emulator
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
vncterm [VNCOPTS] [-c command [ARGS]]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Executes <command> redirecting stdin from a vncviewer and stdout & stderr
|
||||
to the VNC clients. Implements a 'xterm' compatible terminal.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
x11vnc(1).
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Dietmar Maurer <dietmar@proxmox.com>
|
||||
|
||||
Many thanks to Proxmox Server Solutions (www.proxmox.com) for sponsoring
|
||||
this work.
|
||||
|
||||
=head1 COPYRIGHT AND DISCLAIMER
|
||||
|
||||
Copyright (C) 2007 Proxmox Server Solutions GmbH
|
||||
|
||||
Copyright: vncterm is under GNU GPL, the GNU General Public License.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
Loading…
Reference in New Issue
Block a user