--- vnc-java-3.3.3r2.orig/WhatsNew +++ vnc-java-3.3.3r2/WhatsNew @@ -0,0 +1,108 @@ +* TightVNC 1.2.1 + + - Win32 server: added support for reverse connections on ports other + than 5500, modified patch from Steve Kann. + + - Win32 viewer: added support for new command-line options: + -noshared and -encoding XXX. + + - Bugfixes in Win32 viewer: changes in exception handling eliminate + Borland C++ compilation problems causing application crashes on + repetitive connections, notably in the listen mode. Also, now + warning exceptions causing disconnects are reported to user, + except for the case when a user has closed the viewer window. + + - Better packaging in Win32 version: self-installing package is + available, vncviewer now shows correct icon image. + + - Unix vncviewer: Default tunneling command template has been + changed, to allow tunneled connections to hosts where only + loopback VNC connections are enabled. New -via + command-line option provides enhanced tunneling functionality, now + one can make vncviewer tunnel connections to a VNC host via third + machine acting as a gateway. + + - Java viewer: Addition of new parameters PASSWORD, "Show Controls", + and "View Only", modified patch from Steve Kann. + +* TightVNC 1.2.0 + + - Tight encoding is now configurable and can operate at different + compression levels where low compression levels are very fast in terms of + CPU usage. New "-compresslevel N" option implemented in vncviewer to set + compression levels for Tight encoding (1 - fast, 9 - best). + + - Enhanced techniques to split large rectangles in Tight encoder; now it + tries to find large solid-color areas and send them in separate + rectangles. + + - Lossy JPEG compression in Tight encoding has been implemented, new + "-quality N" vncviewer option should be used to enable this feature (0 - + low image quality and best compression, 9 - best image quality). JPEG + compression is used only for screen areas that seem to be suitable for + JPEG compression (although algorithms to detect such areas are not + perfect, of course). + + - New "XCursor" and "RichCursor" encodings implemented. They are used to + transmit cursor shape updates from server to clients ("local cursor" + feature requested by many users). Mouse movement no longer causes + framebuffer updates to happen, vncviewer processes mouse locally when + this feature is active. New -nocursorshape vncviewer option turns this + feature off. + + - A number of recent changes from both TridiaVNC and AT&T's releases merged + into the sourse, now the code is based on version 3.3.3r2 for Unix part, + and on 3.3.3r9 for Win32. + + - Unix vncviewer: When -tunnel option is specified in the command line, + special rules are now used to choose preferred encoding. Now viewer does + not think that server is running on the same machine when tunneling is on + and the preferred encoding is now "tight" with default compression + instead of raw. + + - Xvnc: Rules to set default pixel formats have been changed: now they are + RGB565 instead of BGR556 for color depth 16, and RGB888 instead of BGR888 + for depth 24. This makes Xvnc compatible with Imlib renderer used in + Gnome and also helps to avoid unnecessary pixel format translations in + many cases. + + - Xvnc: X11 modifier mapped to META key is now Mod4 instead of Mod1. New + -compatiblekbd option implemented in Xvnc to force META and ALT keys + behave the same way as they do in the original AT&T's version. + + - A number of bugs fixed: viewer crashes after inflate() call, Xvnc CoRRE + encoding problems, Xvnc bit-order issues in XCursor and RichCursor + encodings, etc. + + - Java viewer now supports Tight encoding and cursor shape updates. Drawing + techniques were changed, settings "Raw pixel drawing: Fast/Reliable" and + "CopyRect: Fast/Reliable" removed from the Options panel since they do + not make sense in new drawing model. + + - Other new features, optimizations, fixes and cleanups, see ChangeLog + files. + +* VNC Tight Encoding 1.1 + + - New ``gradient'' filter implemented in servers (it can be disabled in + Xvnc with new -lazytight option). The filter preprocess full-color screen + areas prior to compression in order to achieve better compression ratios + (with the cost of slower compression). Vncviewers of version 1.0 had + support for this filter already, but there was small bug causing image + distortions in certain cases. So it is recommended to upgrade both + servers and viewers. + + - Stupid bug fixed: extra unused color was included in palettes in many + cases; compression ratios used to be worse than they should be. + + - The algorithm used to split large rectangles into parts has been changed. + This change can increase compression ratios in many situations. + + - Byte-order issues in servers have been (hopefully) fixed. + + - Performance tuning, code rewrites and cleanups in various places. + +* VNC Tight Encoding 1.0 + + - Initial release. + --- vnc-java-3.3.3r2.orig/clipboardFrame.java +++ vnc-java-3.3.3r2/clipboardFrame.java @@ -36,7 +36,7 @@ // clipboardFrame(vncviewer v1) { - super("VNC Clipboard"); + super("TightVNC Clipboard"); v = v1; --- vnc-java-3.3.3r2.orig/hextile.vnc +++ vnc-java-3.3.3r2/hextile.vnc @@ -0,0 +1,18 @@ + + + + +$USER's $DESKTOP desktop ($DISPLAY) + + + + + +www.TightVNC.com + --- vnc-java-3.3.3r2.orig/makefile.old +++ vnc-java-3.3.3r2/makefile.old @@ -0,0 +1,14 @@ + +.SUFFIXES: .java .class + +.java.class: + javac $< + +CLASSES = vncviewer.class rfbProto.class authenticationPanel.class \ + vncCanvas.class optionsFrame.class clipboardFrame.class \ + animatedMemoryImageSource.class DesCipher.class + +all: $(CLASSES) vncviewer.jar + +vncviewer.jar: $(CLASSES) + jar cf $@ $(CLASSES) --- vnc-java-3.3.3r2.orig/README +++ vnc-java-3.3.3r2/README @@ -1,8 +1,10 @@ -VNC 3.3.3r2 Java Viewer Source Distribution -=========================================== +TightVNC 1.2 Java Viewer Source Distribution +============================================ + +TightVNC is Copyright (C) 2001 Const Kaplinsky. All Rights Reserved. +VNC is Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -VNC is Copyright (C) AT&T Laboratories Cambridge. All Rights Reserved. This software is distributed under the GNU General Public Licence as published by the Free Software Foundation. See the file LICENCE.TXT for the conditions under which this software is made available. VNC also contains code from other --- vnc-java-3.3.3r2.orig/vncCanvas.java +++ vnc-java-3.3.3r2/vncCanvas.java @@ -1,4 +1,6 @@ // +// Copyright (C) 2001 Const Kaplinsky. All Rights Reserved. +// Copyright (C) 2000 Tridia Corporation. All Rights Reserved. // Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. // // This is free software; you can redistribute it and/or modify @@ -20,6 +22,7 @@ import java.awt.*; import java.awt.image.*; import java.io.*; +import java.util.zip.*; // @@ -35,10 +38,13 @@ Image rawPixelsImage; animatedMemoryImageSource amis; byte[] pixels; + byte[] zlibBuf; + int zlibBufLen = 0; + Inflater zlibInflater; Graphics sg, sg2; - Image paintImage; - Graphics pig, pig2; - boolean needToResetClip; + + final static int tightZlibBufferSize = 512; + Inflater[] tightInflaters; vncCanvas(vncviewer v1) throws IOException { v = v1; @@ -60,9 +66,7 @@ rfb.framebufferHeight, cm, pixels); rawPixelsImage = createImage(amis); - paintImage = v.createImage(rfb.framebufferWidth, rfb.framebufferHeight); - - pig = paintImage.getGraphics(); + tightInflaters = new Inflater[4]; } public Dimension preferredSize() { @@ -77,7 +81,7 @@ } public void paint(Graphics g) { - g.drawImage(paintImage, 0, 0, this); + g.drawImage(rawPixelsImage, 0, 0, this); } // @@ -92,8 +96,6 @@ sg = getGraphics(); - needToResetClip = false; - // // main dispatch loop // @@ -108,191 +110,187 @@ for (int i = 0; i < rfb.updateNRects; i++) { rfb.readFramebufferUpdateRectHdr(); - if (needToResetClip && - (rfb.updateRectEncoding != rfbProto.EncodingRaw)) { - try { - sg.setClip(0, 0, rfb.framebufferWidth, rfb.framebufferHeight); - pig.setClip(0, 0, rfb.framebufferWidth, rfb.framebufferHeight); - } catch (NoSuchMethodError e) { - } - needToResetClip = false; + if (rfb.updateRectEncoding == rfb.EncodingLastRect) + break; + + if (rfb.updateRectEncoding == rfb.EncodingXCursor || + rfb.updateRectEncoding == rfb.EncodingRichCursor) { + handleCursorShapeUpdate(rfb.updateRectEncoding, + rfb.updateRectX, rfb.updateRectY, + rfb.updateRectW, rfb.updateRectH); + continue; } + softCursorLockArea(rfb.updateRectX, rfb.updateRectY, + rfb.updateRectW, rfb.updateRectH); + switch (rfb.updateRectEncoding) { case rfbProto.EncodingRaw: + { drawRawRect(rfb.updateRectX, rfb.updateRectY, rfb.updateRectW, rfb.updateRectH); break; + } case rfbProto.EncodingCopyRect: + { rfb.readCopyRect(); - pig.copyArea(rfb.copyRectSrcX, rfb.copyRectSrcY, - rfb.updateRectW, rfb.updateRectH, - rfb.updateRectX - rfb.copyRectSrcX, - rfb.updateRectY - rfb.copyRectSrcY); - if (v.options.copyRectFast) { - sg.copyArea(rfb.copyRectSrcX, rfb.copyRectSrcY, - rfb.updateRectW, rfb.updateRectH, - rfb.updateRectX - rfb.copyRectSrcX, - rfb.updateRectY - rfb.copyRectSrcY); - } else { - sg.drawImage(paintImage, 0, 0, this); - } + softCursorLockArea(rfb.copyRectSrcX, rfb.copyRectSrcY, + rfb.updateRectW, rfb.updateRectH); + handleCopyRect(); break; + } case rfbProto.EncodingRRE: { + int rx = rfb.updateRectX, ry = rfb.updateRectY; + int rw = rfb.updateRectW, rh = rfb.updateRectH; int nSubrects = rfb.is.readInt(); int bg = rfb.is.read(); int pixel, x, y, w, h; - sg.translate(rfb.updateRectX, rfb.updateRectY); - sg.setColor(colors[bg]); - sg.fillRect(0, 0, rfb.updateRectW, rfb.updateRectH); - pig.translate(rfb.updateRectX, rfb.updateRectY); - pig.setColor(colors[bg]); - pig.fillRect(0, 0, rfb.updateRectW, rfb.updateRectH); + + fillLargeArea(rx, ry, rw, rh, (byte)bg); + for (int j = 0; j < nSubrects; j++) { pixel = rfb.is.read(); - x = rfb.is.readUnsignedShort(); - y = rfb.is.readUnsignedShort(); + x = rx + rfb.is.readUnsignedShort(); + y = ry + rfb.is.readUnsignedShort(); w = rfb.is.readUnsignedShort(); h = rfb.is.readUnsignedShort(); - sg.setColor(colors[pixel]); - sg.fillRect(x, y, w, h); - pig.setColor(colors[pixel]); - pig.fillRect(x, y, w, h); + + fillSmallArea(x, y, w, h, (byte)pixel); } - sg.translate(-rfb.updateRectX, -rfb.updateRectY); - pig.translate(-rfb.updateRectX, -rfb.updateRectY); + + handleUpdatedPixels(rx, ry, rw, rh); break; } case rfbProto.EncodingCoRRE: { + int rx = rfb.updateRectX, ry = rfb.updateRectY; + int rw = rfb.updateRectW, rh = rfb.updateRectH; int nSubrects = rfb.is.readInt(); int bg = rfb.is.read(); int pixel, x, y, w, h; - sg.translate(rfb.updateRectX, rfb.updateRectY); - sg.setColor(colors[bg]); - sg.fillRect(0, 0, rfb.updateRectW, rfb.updateRectH); - pig.translate(rfb.updateRectX, rfb.updateRectY); - pig.setColor(colors[bg]); - pig.fillRect(0, 0, rfb.updateRectW, rfb.updateRectH); + fillLargeArea(rx, ry, rw, rh, (byte)bg); for (int j = 0; j < nSubrects; j++) { pixel = rfb.is.read(); - x = rfb.is.read(); - y = rfb.is.read(); + x = rx + rfb.is.read(); + y = ry + rfb.is.read(); w = rfb.is.read(); h = rfb.is.read(); - sg.setColor(colors[pixel]); - sg.fillRect(x, y, w, h); - pig.setColor(colors[pixel]); - pig.fillRect(x, y, w, h); + fillSmallArea(x, y, w, h, (byte)pixel); } - sg.translate(-rfb.updateRectX, -rfb.updateRectY); - pig.translate(-rfb.updateRectX, -rfb.updateRectY); + handleUpdatedPixels(rx, ry, rw, rh); break; } case rfbProto.EncodingHextile: { + int rx = rfb.updateRectX, ry = rfb.updateRectY; + int rw = rfb.updateRectW, rh = rfb.updateRectH; int bg = 0, fg = 0, sx, sy, sw, sh; - for (int ty = rfb.updateRectY; - ty < rfb.updateRectY + rfb.updateRectH; - ty += 16) { - for (int tx = rfb.updateRectX; - tx < rfb.updateRectX + rfb.updateRectW; - tx += 16) { - - int tw = 16, th = 16; - - if (rfb.updateRectX + rfb.updateRectW - tx < 16) - tw = rfb.updateRectX + rfb.updateRectW - tx; - if (rfb.updateRectY + rfb.updateRectH - ty < 16) - th = rfb.updateRectY + rfb.updateRectH - ty; + for (int ty = ry; ty < ry + rh; ty += 16) { - int subencoding = rfb.is.read(); + int th = 16; + if (ry + rh - ty < 16) + th = ry + rh - ty; - if ((subencoding & rfbProto.HextileRaw) != 0) { - drawRawRect(tx, ty, tw, th); - continue; - } + for (int tx = rx; tx < rx + rw; tx += 16) { + + int tw = 16; + if (rx + rw - tx < 16) + tw = rx + rw - tx; + + int subencoding = rfb.is.read(); - if (needToResetClip) { - try { - sg.setClip(0, 0, - rfb.framebufferWidth, rfb.framebufferHeight); - pig.setClip(0, 0, - rfb.framebufferWidth, rfb.framebufferHeight); - } catch (NoSuchMethodError e) { + if ((subencoding & rfb.HextileRaw) != 0) { + for (int j = ty; j < (ty + th); j++) { + rfb.is.readFully(pixels, j*rfb.framebufferWidth+tx, tw); } - needToResetClip = false; + continue; } - if ((subencoding & rfbProto.HextileBackgroundSpecified) != 0) + if ((subencoding & rfb.HextileBackgroundSpecified) != 0) bg = rfb.is.read(); - sg.setColor(colors[bg]); - sg.fillRect(tx, ty, tw, th); - pig.setColor(colors[bg]); - pig.fillRect(tx, ty, tw, th); + fillLargeArea(tx, ty, tw, th, (byte)bg); - if ((subencoding & rfbProto.HextileForegroundSpecified) != 0) + if ((subencoding & rfb.HextileForegroundSpecified) != 0) fg = rfb.is.read(); - if ((subencoding & rfbProto.HextileAnySubrects) == 0) - continue; + if ((subencoding & rfb.HextileAnySubrects) != 0) { - int nSubrects = rfb.is.read(); + int nSubrects = rfb.is.read(); - sg.translate(tx, ty); - pig.translate(tx, ty); + if ((subencoding & rfb.HextileSubrectsColoured) != 0) { - if ((subencoding & rfbProto.HextileSubrectsColoured) != 0) { + for (int j = 0; j < nSubrects; j++) { + fg = rfb.is.read(); + int b1 = rfb.is.read(); + int b2 = rfb.is.read(); + sx = tx + (b1 >> 4); + sy = ty + (b1 & 0xf); + sw = (b2 >> 4) + 1; + sh = (b2 & 0xf) + 1; + + fillSmallArea(sx, sy, sw, sh, (byte)fg); + } + + } else { + + for (int j = 0; j < nSubrects; j++) { + int b1 = rfb.is.read(); + int b2 = rfb.is.read(); + sx = tx + (b1 >> 4); + sy = ty + (b1 & 0xf); + sw = (b2 >> 4) + 1; + sh = (b2 & 0xf) + 1; - for (int j = 0; j < nSubrects; j++) { - fg = rfb.is.read(); - int b1 = rfb.is.read(); - int b2 = rfb.is.read(); - sx = b1 >> 4; - sy = b1 & 0xf; - sw = (b2 >> 4) + 1; - sh = (b2 & 0xf) + 1; - - sg.setColor(colors[fg]); - sg.fillRect(sx, sy, sw, sh); - pig.setColor(colors[fg]); - pig.fillRect(sx, sy, sw, sh); + fillSmallArea(sx, sy, sw, sh, (byte)fg); + } } + } + } + handleUpdatedPixels(rx, ty, rw, th); + } + break; + } - } else { + case rfbProto.EncodingZlib: + { + int nBytes = rfb.is.readInt(); - sg.setColor(colors[fg]); - pig.setColor(colors[fg]); + if (( zlibBuf == null ) || + ( zlibBufLen < nBytes )) { + zlibBuf = new byte[ nBytes * 2 ]; + zlibBufLen = nBytes * 2; + } + + rfb.is.readFully( zlibBuf, 0, nBytes ); + + if ( zlibInflater == null ) { + zlibInflater = new Inflater(); + } + zlibInflater.setInput( zlibBuf, 0, nBytes ); - for (int j = 0; j < nSubrects; j++) { - int b1 = rfb.is.read(); - int b2 = rfb.is.read(); - sx = b1 >> 4; - sy = b1 & 0xf; - sw = (b2 >> 4) + 1; - sh = (b2 & 0xf) + 1; + drawZlibRect( rfb.updateRectX, rfb.updateRectY, + rfb.updateRectW, rfb.updateRectH ); - sg.fillRect(sx, sy, sw, sh); - pig.fillRect(sx, sy, sw, sh); - } - } + break; + } + + case rfbProto.EncodingTight: + { + drawTightRect( rfb.updateRectX, rfb.updateRectY, + rfb.updateRectW, rfb.updateRectH ); - sg.translate(-tx, -ty); - pig.translate(-tx, -ty); - } - } break; } @@ -300,6 +298,8 @@ throw new IOException("Unknown RFB rectangle encoding " + rfb.updateRectEncoding); } + + softCursorUnlockScreen(); } rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth, rfb.framebufferHeight, true); @@ -329,46 +329,281 @@ // void drawRawRect(int x, int y, int w, int h) throws IOException { - if (v.options.drawEachPixelForRawRects) { - for (int j = y; j < (y + h); j++) { - for (int k = x; k < (x + w); k++) { - int pixel = rfb.is.read(); - sg.setColor(colors[pixel]); - sg.fillRect(k, j, 1, 1); - pig.setColor(colors[pixel]); - pig.fillRect(k, j, 1, 1); + + for (int j = y; j < (y + h); j++) { + rfb.is.readFully(pixels, j * rfb.framebufferWidth + x, w); + } + + handleUpdatedPixels(x, y, w, h); + } + + + // + // Handle CopyRect rectangle (fast version). + // + + void handleCopyRect() throws IOException { + + int sx = rfb.copyRectSrcX, sy = rfb.copyRectSrcY; + int rx = rfb.updateRectX, ry = rfb.updateRectY; + int rw = rfb.updateRectW, rh = rfb.updateRectH; + + // This call is redundant, but it decreases drawing delays. + sg.copyArea(sx, sy, rw, rh, rx - sx, ry - sy); + + int y0, y1, delta; + if (sy > ry) { + y0 = 0; y1 = rh; delta = 1; + } else if (sy < ry) { + y0 = rh - 1; y1 = -1; delta = -1; + } else { + handleCopyRectSlow(); + return; + } + + for (int dy = y0; dy != y1; dy += delta) { + ByteArrayInputStream src = new ByteArrayInputStream(pixels); + src.skip((sy + dy) * rfb.framebufferWidth + sx); + src.read(pixels, (ry + dy) * rfb.framebufferWidth + rx, rw); + } + + handleUpdatedPixels(rx, ry, rw, rh); + } + + + // + // Handle CopyRect rectangle (slow version, but scanlines may overlap). + // + + void handleCopyRectSlow() throws IOException { + + int sx = rfb.copyRectSrcX, sy = rfb.copyRectSrcY; + int rx = rfb.updateRectX, ry = rfb.updateRectY; + int rw = rfb.updateRectW, rh = rfb.updateRectH; + + int dx, dy; + if (sy * rfb.framebufferWidth + sx > ry * rfb.framebufferWidth + rx) { + for (dy = 0; dy < rh; dy++) { + for (dx = 0; dx < rw; dx++) { + pixels[(ry + dy) * rfb.framebufferWidth + (rx + dx)] = + pixels[(sy + dy) * rfb.framebufferWidth + (sx + dx)]; } } + } else { + for (dy = rh - 1; dy >= 0; dy--) { + for (dx = rw - 1; dx >= 0; dx--) { + pixels[(ry + dy) * rfb.framebufferWidth + (rx + dx)] = + pixels[(sy + dy) * rfb.framebufferWidth + (sx + dx)]; + } + } + } + + handleUpdatedPixels(rx, ry, rw, rh); + } + + + // + // Draw a zlib rectangle. + // + + void drawZlibRect(int x, int y, int w, int h) throws IOException { + + try { + for (int j = y; j < (y + h); j++) { + zlibInflater.inflate( pixels, j * rfb.framebufferWidth + x, w ); + } + } + catch( DataFormatException dfe ) { + throw new IOException( dfe.toString()); + } + + handleUpdatedPixels(x, y, w, h); + } + + + // + // Draw a tight rectangle. + // + + void drawTightRect(int x, int y, int w, int h) throws IOException { + + int comp_ctl = rfb.is.readUnsignedByte(); + + // Flush zlib streams if we are told by the server to do so. + for (int stream_id = 0; stream_id < 4; stream_id++) { + if ((comp_ctl & 1) != 0 && tightInflaters[stream_id] != null) { + tightInflaters[stream_id] = null; + } + comp_ctl >>= 1; + } + + // Check correctness of subencoding value. + if (comp_ctl > rfb.TightMaxSubencoding) { + throw new IOException("Incorrect tight subencoding: " + comp_ctl); + } + + // Handle solid rectangles. + if (comp_ctl == rfb.TightFill) { + int bg = rfb.is.readUnsignedByte(); + + sg.setColor(colors[bg]); // This two calls are redundant, + sg.fillRect(x, y, w, h); // but they decrease drawing delays. + + fillLargeArea(x, y, w, h, (byte)bg); + handleUpdatedPixels(x, y, w, h); return; } - for (int j = y; j < (y + h); j++) { - rfb.is.readFully(pixels, j * rfb.framebufferWidth + x, w); + // Read filter id and parameters. + int numColors = 0, rowSize = w; + byte palette[] = new byte[2]; + if ((comp_ctl & rfb.TightExplicitFilter) != 0) { + int filter_id = rfb.is.readUnsignedByte(); + if (filter_id == rfb.TightFilterPalette) { + numColors = rfb.is.readUnsignedByte() + 1; // Must be 2. + if (numColors != 2) { + throw new IOException("Incorrect tight palette size: " + numColors); + } + palette[0] = rfb.is.readByte(); + palette[1] = rfb.is.readByte(); + rowSize = (w + 7) / 8; + } else if (filter_id != rfb.TightFilterCopy) { + throw new IOException("Incorrect tight filter id: " + filter_id); + } } + // Read, optionally uncompress and decode data. + int dataSize = h * rowSize; + if (dataSize < rfb.TightMinToCompress) { + if (numColors == 2) { + byte[] monoData = new byte[dataSize]; + rfb.is.readFully(monoData, 0, dataSize); + drawMonoData(x, y, w, h, monoData, palette); + } else { + for (int j = y; j < (y + h); j++) { + rfb.is.readFully(pixels, j * rfb.framebufferWidth + x, w); + } + } + } else { + int zlibDataLen = rfb.readCompactLen(); + byte[] zlibData = new byte[zlibDataLen]; + rfb.is.readFully(zlibData, 0, zlibDataLen); + int stream_id = comp_ctl & 0x03; + if (tightInflaters[stream_id] == null) { + tightInflaters[stream_id] = new Inflater(); + } + Inflater myInflater = tightInflaters[stream_id]; + myInflater.setInput(zlibData, 0, zlibDataLen); + try { + if (numColors == 2) { + byte[] monoData = new byte[dataSize]; + myInflater.inflate(monoData, 0, dataSize); + drawMonoData(x, y, w, h, monoData, palette); + } else { + for (int j = y; j < (y + h); j++) { + myInflater.inflate(pixels, j * rfb.framebufferWidth + x, w); + } + } + } + catch(DataFormatException dfe) { + throw new IOException(dfe.toString()); + } + } + + handleUpdatedPixels(x, y, w, h); + } + + + // + // Decode and draw 1bpp-encoded bi-color rectangle. + // + + void drawMonoData(int x, int y, int w, int h, + byte[] src, byte[] palette) + throws IOException { + + int dx, dy, n; + int i = y * rfb.framebufferWidth + x; + int rowBytes = (w + 7) / 8; + byte b; + + for (dy = 0; dy < h; dy++) { + for (dx = 0; dx < w / 8; dx++) { + b = src[dy*rowBytes+dx]; + for (n = 7; n >= 0; n--) + pixels[i++] = palette[b >> n & 1]; + } + for (n = 7; n >= 8 - w % 8; n--) { + pixels[i++] = palette[src[dy*rowBytes+dx] >> n & 1]; + } + i += (rfb.framebufferWidth - w); + } + } + + + // + // Display newly updated area of pixels. + // + + synchronized void + handleUpdatedPixels(int x, int y, int w, int h) throws IOException { + amis.newPixels(x, y, w, h); try { sg.setClip(x, y, w, h); - pig.setClip(x, y, w, h); - needToResetClip = true; } catch (NoSuchMethodError e) { sg2 = sg.create(); sg.clipRect(x, y, w, h); - pig2 = pig.create(); - pig.clipRect(x, y, w, h); } sg.drawImage(rawPixelsImage, 0, 0, this); - pig.drawImage(rawPixelsImage, 0, 0, this); - if (sg2 != null) { + if (sg2 == null) { + sg.setClip(0, 0, rfb.framebufferWidth, rfb.framebufferHeight); + } else { sg.dispose(); // reclaims resources more quickly sg = sg2; sg2 = null; - pig.dispose(); - pig = pig2; - pig2 = null; + } + } + + + // + // Emulate fillRect operation on the pixels[] array. + // This version is optimized for very small rectangles. + // + + void fillSmallArea(int x, int y, int w, int h, byte pixel) { + + int offset = y * rfb.framebufferWidth + x; + for (int dy = 0; dy < h; dy++) { + for (int dx = 0; dx < w; dx++) { + pixels[offset++] = pixel; + } + offset += (rfb.framebufferWidth - w); + } + } + + + // + // Emulate fillRect operation on the pixels[] array. + // This version is optimized for rectangles that are large enough. + // + + void fillLargeArea(int x, int y, int w, int h, byte pixel) { + + byte[] buf = new byte[w]; + for (int i = 0; i < w; i++) { + buf[i] = pixel; + } + ByteArrayInputStream pixelStream = new ByteArrayInputStream(buf); + + int offset = y * rfb.framebufferWidth + x; + for (int dy = 0; dy < h; dy++) { + pixelStream.reset(); + pixelStream.read(pixels, offset, w); + offset += rfb.framebufferWidth; } } @@ -389,19 +624,23 @@ try { switch (evt.id) { case Event.MOUSE_MOVE: - case Event.MOUSE_DOWN: case Event.MOUSE_DRAG: + softCursorMove(evt.x, evt.y); + // *** pass through *** + case Event.MOUSE_DOWN: case Event.MOUSE_UP: if (v.gotFocus) { requestFocus(); } - rfb.writePointerEvent(evt); + if (!v.options.viewOnly) + rfb.writePointerEvent(evt); break; case Event.KEY_PRESS: case Event.KEY_RELEASE: case Event.KEY_ACTION: case Event.KEY_ACTION_RELEASE: - rfb.writeKeyEvent(evt); + if (!v.options.viewOnly) + rfb.writeKeyEvent(evt); break; } } catch (Exception e) { @@ -411,4 +650,345 @@ } return false; } + + + ////////////////////////////////////////////////////////////////// + // + // Handle cursor shape updates (XCursor and RichCursor encodings). + // + + boolean prevCursorSet = false; + + byte[] rcSavedArea; + byte[] rcSource; + boolean[] rcMask; + int rcHotX, rcHotY, rcWidth, rcHeight; + int rcCursorX = 0, rcCursorY = 0; + int rcLockX, rcLockY, rcLockWidth, rcLockHeight; + boolean rcCursorHidden, rcLockSet; + + // + // Handle cursor shape update (XCursor and RichCursor encodings). + // + + synchronized void + handleCursorShapeUpdate(int encodingType, + int xhot, int yhot, int width, int height) + throws IOException { + + int bytesPerRow = (width + 7) / 8; + int bytesMaskData = bytesPerRow * height; + + softCursorFree(); + + if (width * height == 0) + return; + + // Ignore cursor shape data if requested by user. + + if (v.options.ignoreCursorUpdates) { + if (encodingType == rfb.EncodingXCursor) { + rfb.is.skipBytes(6 + bytesMaskData * 2); + } else { + // rfb.EncodingRichCursor + rfb.is.skipBytes(width * height + bytesMaskData); + } + return; + } + + // Read cursor pixel data. + + rcSource = new byte[width * height]; + + if (encodingType == rfb.EncodingXCursor) { + byte[] xcolors = new byte[6]; + rfb.is.readFully(xcolors, 0, 6); + byte[] rcolors = new byte[2]; + rcolors[1] = (byte)((xcolors[0] >> 5 & 0x07) | + (xcolors[1] >> 2 & 0x38) | + (xcolors[2] & 0xC0)); + rcolors[0] = (byte)((xcolors[3] >> 5 & 0x07) | + (xcolors[4] >> 2 & 0x38) | + (xcolors[5] & 0xC0)); + byte[] buf = new byte[bytesMaskData]; + rfb.is.readFully(buf, 0, bytesMaskData); + + int x, y, n, b; + int i = 0; + for (y = 0; y < height; y++) { + for (x = 0; x < width / 8; x++) { + b = buf[y * bytesPerRow + x]; + for (n = 7; n >= 0; n--) + rcSource[i++] = rcolors[b >> n & 1]; + } + for (n = 7; n >= 8 - width % 8; n--) { + rcSource[i++] = rcolors[buf[y * bytesPerRow + x] >> n & 1]; + } + } + } else { + // rfb.EncodingRichCursor + rfb.is.readFully(rcSource, 0, width * height); + } + + // Read and decode mask data. + + byte[] buf = new byte[bytesMaskData]; + rfb.is.readFully(buf, 0, bytesMaskData); + + rcMask = new boolean[width * height]; + + int x, y, n, b; + int i = 0; + for (y = 0; y < height; y++) { + for (x = 0; x < width / 8; x++) { + b = buf[y * bytesPerRow + x]; + for (n = 7; n >= 0; n--) + rcMask[i++] = (b >> n & 1) != 0; + } + for (n = 7; n >= 8 - width % 8; n--) { + rcMask[i++] = (buf[y * bytesPerRow + x] >> n & 1) != 0; + } + } + + // Set remaining data associated with cursor. + + rcSavedArea = new byte[width * height]; + rcHotX = xhot; + rcHotY = yhot; + rcWidth = width; + rcHeight = height; + + softCursorSaveArea(); + softCursorDraw(); + + rcCursorHidden = false; + rcLockSet = false; + + prevCursorSet = true; + } + + // + // softCursorLockArea(). This method should be used to prevent + // collisions between simultaneous framebuffer update operations and + // cursor drawing operations caused by movements of pointing device. + // The parameters denote a rectangle where mouse cursor should not + // be drawn. Every next call to this function expands locked area so + // previous locks remain active. + // + + synchronized void + softCursorLockArea(int x, int y, int w, int h) throws IOException { + + if (!prevCursorSet) + return; + + if (!rcLockSet) { + rcLockX = x; + rcLockY = y; + rcLockWidth = w; + rcLockHeight = h; + rcLockSet = true; + } else { + int newX = (x < rcLockX) ? x : rcLockX; + int newY = (y < rcLockY) ? y : rcLockY; + rcLockWidth = (x + w > rcLockX + rcLockWidth) ? + (x + w - newX) : (rcLockX + rcLockWidth - newX); + rcLockHeight = (y + h > rcLockY + rcLockHeight) ? + (y + h - newY) : (rcLockY + rcLockHeight - newY); + rcLockX = newX; + rcLockY = newY; + } + + if (!rcCursorHidden && softCursorInLockedArea()) { + softCursorRestoreArea(); + rcCursorHidden = true; + } + } + + // + // softCursorUnlockScreen(). This function discards all locks + // performed since previous softCursorUnlockScreen() call. + // + + synchronized void softCursorUnlockScreen() throws IOException { + + if (!prevCursorSet) + return; + + if (rcCursorHidden) { + softCursorSaveArea(); + softCursorDraw(); + rcCursorHidden = false; + } + rcLockSet = false; + } + + // + // softCursorMove(). Moves soft cursor in particular location. This + // function respects locking of screen areas so when the cursor is + // moved in the locked area, it becomes invisible until + // softCursorUnlockScreen() method is called. + // + + synchronized void softCursorMove(int x, int y) throws IOException { + + if (prevCursorSet && !rcCursorHidden) { + softCursorRestoreArea(); + rcCursorHidden = true; + } + + rcCursorX = x; + rcCursorY = y; + + if (prevCursorSet && !(rcLockSet && softCursorInLockedArea())) { + softCursorSaveArea(); + softCursorDraw(); + rcCursorHidden = false; + } + } + + // + // Free all data associated with cursor. + // + + synchronized void softCursorFree() throws IOException { + + if (prevCursorSet) { + softCursorRestoreArea(); + rcSavedArea = null; + rcSource = null; + rcMask = null; + prevCursorSet = false; + } + } + + ////////////////////////////////////////////////////////////////// + // + // Low-level methods implementing software cursor functionality. + // + + // + // Check if cursor is within locked part of screen. + // + + boolean softCursorInLockedArea() { + + return (rcLockX < rcCursorX - rcHotX + rcWidth && + rcLockY < rcCursorY - rcHotY + rcHeight && + rcLockX + rcLockWidth > rcCursorX - rcHotX && + rcLockY + rcLockHeight > rcCursorY - rcHotY); + } + + // + // Save screen data in memory buffer. + // + + void softCursorSaveArea() { + + Rectangle r = new Rectangle(); + softCursorToScreen(r, null); + int x = r.x; + int y = r.y; + int w = r.width; + int h = r.height; + + int dx, dy, i = 0; + for (dy = y; dy < y + h; dy++) { + for (dx = x; dx < x + w; dx++) + rcSavedArea[i++] = pixels[dy * rfb.framebufferWidth + dx]; + } + } + + // + // Restore screen data saved in memory buffer. + // + + void softCursorRestoreArea() throws IOException { + + Rectangle r = new Rectangle(); + softCursorToScreen(r, null); + int x = r.x; + int y = r.y; + int w = r.width; + int h = r.height; + + int dx, dy, i = 0; + for (dy = y; dy < y + h; dy++) { + for (dx = x; dx < x + w; dx++) + pixels[dy * rfb.framebufferWidth + dx] = rcSavedArea[i++]; + } + handleUpdatedPixels(r.x, r.y, r.width, r.height); + } + + // + // Draw cursor. + // + + void softCursorDraw() throws IOException { + + int x, y, x0, y0; + int offset; + + for (y = 0; y < rcHeight; y++) { + y0 = rcCursorY - rcHotY + y; + if (y0 >= 0 && y0 < rfb.framebufferHeight) { + for (x = 0; x < rcWidth; x++) { + x0 = rcCursorX - rcHotX + x; + if (x0 >= 0 && x0 < rfb.framebufferWidth) { + offset = y * rcWidth + x; + if (rcMask[offset]) { + pixels[y0 * rfb.framebufferWidth + x0] = rcSource[offset]; + } + } + } + } + } + + Rectangle r = new Rectangle(); + softCursorToScreen(r, null); + + handleUpdatedPixels(r.x, r.y, r.width, r.height); + } + + // + // Calculate position, size and offset for the part of cursor + // located inside framebuffer bounds. + // + + void softCursorToScreen(Rectangle screenArea, Point cursorOffset) { + + int cx = 0, cy = 0; + + int x = rcCursorX - rcHotX; + int y = rcCursorY - rcHotY; + int w = rcWidth; + int h = rcHeight; + + if (x < 0) { + cx = -x; + w -= cx; + x = 0; + } else if (x + w > rfb.framebufferWidth) { + w = rfb.framebufferWidth - x; + } + if (y < 0) { + cy = -y; + h -= cy; + y = 0; + } else if (y + h > rfb.framebufferHeight) { + h = rfb.framebufferHeight - y; + } + + if (w < 0) { + cx = 0; x = 0; w = 0; + } + if (h < 0) { + cy = 0; y = 0; h = 0; + } + + if (screenArea != null) + screenArea.setBounds(x, y, w, h); + if (cursorOffset != null) + cursorOffset.setLocation(cx, cy); + } } --- vnc-java-3.3.3r2.orig/rfbProto.java +++ vnc-java-3.3.3r2/rfbProto.java @@ -1,4 +1,6 @@ // +// Copyright (C) 2001 Const Kaplinsky. All Rights Reserved. +// Copyright (C) 2000 Tridia Corporation. All Rights Reserved. // Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. // // This is free software; you can redistribute it and/or modify @@ -39,25 +41,37 @@ class rfbProto { - static final String versionMsg = "RFB 003.003\n"; - static final int ConnFailed = 0, NoAuth = 1, VncAuth = 2; - static final int VncAuthOK = 0, VncAuthFailed = 1, VncAuthTooMany = 2; - - static final int FramebufferUpdate = 0, SetColourMapEntries = 1, Bell = 2, - ServerCutText = 3; - - static final int SetPixelFormat = 0, FixColourMapEntries = 1, - SetEncodings = 2, FramebufferUpdateRequest = 3, KeyEvent = 4, - PointerEvent = 5, ClientCutText = 6; - - static final int EncodingRaw = 0, EncodingCopyRect = 1, EncodingRRE = 2, - EncodingCoRRE = 4, EncodingHextile = 5; - - static final int HextileRaw = (1 << 0); - static final int HextileBackgroundSpecified = (1 << 1); - static final int HextileForegroundSpecified = (1 << 2); - static final int HextileAnySubrects = (1 << 3); - static final int HextileSubrectsColoured = (1 << 4); + final String versionMsg = "RFB 003.003\n"; + final static int ConnFailed = 0, NoAuth = 1, VncAuth = 2; + final static int VncAuthOK = 0, VncAuthFailed = 1, VncAuthTooMany = 2; + + final static int FramebufferUpdate = 0, SetColourMapEntries = 1, Bell = 2, + ServerCutText = 3; + + final int SetPixelFormat = 0, FixColourMapEntries = 1, SetEncodings = 2, + FramebufferUpdateRequest = 3, KeyEvent = 4, PointerEvent = 5, + ClientCutText = 6; + + final static int EncodingRaw = 0, EncodingCopyRect = 1, + EncodingRRE = 2, EncodingCoRRE = 4, EncodingHextile = 5, + EncodingZlib = 6, EncodingTight = 7, EncodingCompressLevel0 = 0xFFFFFF00, + EncodingXCursor = 0xFFFFFF10, EncodingRichCursor = 0xFFFFFF11, + EncodingLastRect = 0xFFFFFF20; + + final int HextileRaw = (1 << 0); + final int HextileBackgroundSpecified = (1 << 1); + final int HextileForegroundSpecified = (1 << 2); + final int HextileAnySubrects = (1 << 3); + final int HextileSubrectsColoured = (1 << 4); + + final static int TightExplicitFilter = 0x04; + final static int TightFill = 0x08; + final static int TightMaxSubencoding = 0x08; + final static int TightFilterCopy = 0x00; + final static int TightFilterPalette = 0x01; + final static int TightFilterGradient = 0x02; + + final static int TightMinToCompress = 12; String host; int port; @@ -167,6 +181,7 @@ os.write(0); } v.options.disableShareDesktop(); + v.options.disableViewOnly(); } @@ -268,6 +283,25 @@ // + // Read integer in compact representation + // + + int readCompactLen() throws IOException { + int portion = is.readUnsignedByte(); + int len = portion & 0x7F; + if ((portion & 0x80) != 0) { + portion = is.readUnsignedByte(); + len |= (portion & 0x7F) << 7; + if ((portion & 0x80) != 0) { + portion = is.readUnsignedByte(); + len |= (portion & 0xFF) << 14; + } + } + return len; + } + + + // // Write a FramebufferUpdateRequest message // @@ -515,17 +549,15 @@ } else { // - // A "normal" key press. Ordinary ASCII & Latin-1 characters go straight - // through. For CTRL-, CTRL is sent separately so just send - // . Backspace, tab, return, escape and delete have special - // keysyms. Anything else we ignore. + // A "normal" key press. Ordinary ASCII characters go straight through. + // For CTRL-, CTRL is sent separately so just send . + // Backspace, tab, return, escape and delete have special keysyms. + // Anything else we ignore. // if (key < 32) { if ((evt.modifiers & Event.CTRL_MASK) != 0) { key += 96; - if (key == 127) // CTRL-_ - key = 95; } else { switch(key) { case 8: key = 0xff08; break; @@ -534,22 +566,15 @@ case 27: key = 0xff1b; break; } } - - } else if (key < 256) { - - // For Latin-1, Unicode and X keysyms should be the same... - - if (key == 127) // except delete + } else if (key >= 127) { + if (key == 127) { key = 0xffff; - - } else { - - // Not Latin-1 or a control character - ignore, except that... - - // JDK1.1 on X incorrectly passes some keysyms straight through, so - // we do too. JDK1.1.4 seems to have fixed this. - if ((key < 0xff00) || (key > 0xffff)) - return; + } else { + // JDK1.1 on X incorrectly passes some keysyms straight through, so + // we do too. JDK1.1.4 seems to have fixed this. + if ((key < 0xff00) || (key > 0xffff)) + return; + } } } --- vnc-java-3.3.3r2.orig/tight.vnc +++ vnc-java-3.3.3r2/tight.vnc @@ -0,0 +1,17 @@ + + + + +$USER's $DESKTOP desktop ($DISPLAY) + + + + + +www.TightVNC.com + --- vnc-java-3.3.3r2.orig/authenticationPanel.java +++ vnc-java-3.3.3r2/authenticationPanel.java @@ -84,6 +84,23 @@ } // + // Override Component.show() to get the focus set properly. + // + + public void show() { + password.requestFocus(); + super.show(); + } + + // + // Get reference to password text field object. + // + + public TextField getPasswordField() { + return password; + } + + // // action() is called when a button is pressed or return is pressed in the // password text field. // --- vnc-java-3.3.3r2.orig/shared.vnc +++ vnc-java-3.3.3r2/shared.vnc @@ -12,4 +12,5 @@ +www.TightVNC.com --- vnc-java-3.3.3r2.orig/vncviewer.java +++ vnc-java-3.3.3r2/vncviewer.java @@ -41,7 +41,7 @@ v.mainArgs = argv; v.inAnApplet = false; - v.f = new Frame("VNC"); + v.f = new Frame("TightVNC"); v.f.add("Center", v); v.init(); @@ -52,6 +52,7 @@ String[] mainArgs; String host; int port; + String password = null; rfbProto rfb; Thread rfbThread; GridBagLayout gridbag; @@ -60,6 +61,7 @@ Button optionsButton; Button clipboardButton; Button ctrlAltDelButton; + vncCanvas vc; optionsFrame options; clipboardFrame clipboard; authenticationPanel authenticator; @@ -93,32 +95,35 @@ gridbag = new GridBagLayout(); setLayout(gridbag); - buttonPanel = new Panel(); - buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - disconnectButton = new Button("Disconnect"); - disconnectButton.disable(); - buttonPanel.add(disconnectButton); - optionsButton = new Button("Options"); - buttonPanel.add(optionsButton); - clipboardButton = new Button("Clipboard"); - clipboardButton.disable(); - buttonPanel.add(clipboardButton); - ctrlAltDelButton = new Button("Send Ctrl-Alt-Del"); - ctrlAltDelButton.disable(); - buttonPanel.add(ctrlAltDelButton); - GridBagConstraints gbc = new GridBagConstraints(); gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.anchor = GridBagConstraints.NORTHWEST; - gridbag.setConstraints(buttonPanel,gbc); - add(buttonPanel); + + if (options.showControls) { + buttonPanel = new Panel(); + buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + disconnectButton = new Button("Disconnect"); + disconnectButton.disable(); + buttonPanel.add(disconnectButton); + optionsButton = new Button("Options"); + buttonPanel.add(optionsButton); + clipboardButton = new Button("Clipboard"); + clipboardButton.disable(); + buttonPanel.add(clipboardButton); + ctrlAltDelButton = new Button("Send Ctrl-Alt-Del"); + ctrlAltDelButton.disable(); + buttonPanel.add(ctrlAltDelButton); + + gridbag.setConstraints(buttonPanel,gbc); + add(buttonPanel); + } try { connectAndAuthenticate(); doProtocolInitialisation(); - vncCanvas vc = new vncCanvas(this); + vc = new vncCanvas(this); gbc.weightx = 1.0; gbc.weighty = 1.0; gridbag.setConstraints(vc,gbc); @@ -131,9 +136,11 @@ validate(); } - disconnectButton.enable(); - clipboardButton.enable(); - ctrlAltDelButton.enable(); + if (options.showControls) { + disconnectButton.enable(); + clipboardButton.enable(); + ctrlAltDelButton.enable(); + } vc.processNormalProtocol(); @@ -151,25 +158,31 @@ void connectAndAuthenticate() throws IOException { - GridBagConstraints gbc = new GridBagConstraints(); - gbc.gridwidth = GridBagConstraints.REMAINDER; - gbc.anchor = GridBagConstraints.NORTHWEST; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - gbc.ipadx = 100; - gbc.ipady = 50; - gridbag.setConstraints(authenticator,gbc); - add(authenticator); + if (password == null) { + GridBagConstraints gbc = new GridBagConstraints(); + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.anchor = GridBagConstraints.NORTHWEST; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.ipadx = 100; + gbc.ipady = 50; + gridbag.setConstraints(authenticator,gbc); + add(authenticator); + } validate(); if (!inAnApplet) { f.pack(); f.show(); } + if (password == null) + authenticator.getPasswordField().requestFocus(); + boolean authenticationDone = false; while (!authenticationDone) { + if (password == null) synchronized(authenticator) { try { authenticator.wait(); @@ -197,10 +210,15 @@ byte[] challenge = new byte[16]; rfb.is.readFully(challenge); - String pw = authenticator.password.getText(); + String pw; + if (password == null) + pw = authenticator.password.getText(); + else + pw = password; + if (pw.length() > 8) pw = pw.substring(0,8); // truncate to 8 chars - if (pw.length() == 0) { + if (pw.length() == 0 && password == null) { authenticator.retry(); break; } @@ -241,7 +259,8 @@ } } - remove(authenticator); + if (password == null) + remove(authenticator); } @@ -271,8 +290,11 @@ void setEncodings() { try { - if ((rfb != null) && rfb.inNormalProtocol) { + if (rfb != null && rfb.inNormalProtocol) { rfb.writeSetEncodings(options.encodings, options.nEncodings); + if (vc != null) { + vc.softCursorFree(); + } } } catch (Exception e) { e.printStackTrace(); @@ -417,6 +439,8 @@ String s = readParameter("PORT", true); port = Integer.parseInt(s); + + password = readParameter("PASSWORD", false); } public String readParameter(String name, boolean required) { --- vnc-java-3.3.3r2.orig/dir.mk +++ vnc-java-3.3.3r2/dir.mk @@ -0,0 +1,18 @@ +# +# Making the VNC applet. +# + +CLASSES = vncviewer.class rfbProto.class authenticationPanel.class \ + vncCanvas.class optionsFrame.class clipboardFrame.class \ + animatedMemoryImageSource.class DesCipher.class + +all: $(CLASSES) vncviewer.jar + +vncviewer.jar: $(CLASSES) + @$(JavaArchive) + +export:: $(CLASSES) vncviewer.jar index.vnc shared.vnc + @$(ExportJavaClasses) + +clean:: + $(RM) *.class *.jar --- vnc-java-3.3.3r2.orig/index.vnc +++ vnc-java-3.3.3r2/index.vnc @@ -12,4 +12,5 @@ WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT> +www.TightVNC.com --- vnc-java-3.3.3r2.orig/noshared.vnc +++ vnc-java-3.3.3r2/noshared.vnc @@ -0,0 +1,16 @@ + + + + +$USER's $DESKTOP desktop ($DISPLAY) [not shared] + + + + + +www.TightVNC.com + --- vnc-java-3.3.3r2.orig/optionsFrame.java +++ vnc-java-3.3.3r2/optionsFrame.java @@ -1,4 +1,6 @@ // +// Copyright (C) 2001 Const Kaplinsky. All Rights Reserved. +// Copyright (C) 2000 Tridia Corporation. All Rights Reserved. // Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. // // This is free software; you can redistribute it and/or modify @@ -30,24 +32,32 @@ static String[] names = { "Encoding", + "Compression level", + "Cursor shape updates", "Use CopyRect", "Mouse buttons 2 and 3", - "Raw pixel drawing", - "CopyRect", "Share desktop", + "View only", }; static String[][] values = { - { "Raw", "RRE", "CoRRE", "Hextile" }, + { "Raw", "RRE", "CoRRE", "Hextile", "Zlib", "Tight" }, + { "Default", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, + { "Enable", "Ignore", "Disable" }, { "Yes", "No" }, { "Normal", "Reversed" }, - { "Fast", "Reliable" }, - { "Fast", "Reliable" }, + { "Yes", "No" }, { "Yes", "No" }, }; - final int encodingIndex = 0, useCopyRectIndex = 1, mouseButtonIndex = 2, - rawPixelDrawingIndex = 3, copyRectFastIndex = 4, shareDesktopIndex = 5; + final int + encodingIndex = 0, + compressLevelIndex = 1, + cursorUpdatesIndex = 2, + useCopyRectIndex = 3, + mouseButtonIndex = 4, + shareDesktopIndex = 5, + viewOnlyIndex = 6; Label[] labels = new Label[names.length]; Choice[] choices = new Choice[names.length]; @@ -59,17 +69,18 @@ // The actual data which other classes look at: // - int[] encodings = new int[10]; + int[] encodings = new int[20]; int nEncodings; - boolean reverseMouseButtons2And3; - - boolean drawEachPixelForRawRects; + int compressLevel; - boolean copyRectFast; + boolean requestCursorUpdates; + boolean ignoreCursorUpdates; + boolean reverseMouseButtons2And3; boolean shareDesktop; - + boolean viewOnly; + boolean showControls; // // Constructor. Set up the labels and choices from the names and values @@ -77,7 +88,7 @@ // optionsFrame(vncviewer v1) { - super("VNC Options"); + super("TightVNC Options"); v = v1; @@ -112,12 +123,13 @@ // Set up defaults - choices[encodingIndex].select("Hextile"); + choices[encodingIndex].select("Tight"); + choices[compressLevelIndex].select("Default"); + choices[cursorUpdatesIndex].select("Enable"); choices[useCopyRectIndex].select("Yes"); choices[mouseButtonIndex].select("Normal"); - choices[rawPixelDrawingIndex].select("Reliable"); - choices[copyRectFastIndex].select("Fast"); - choices[shareDesktopIndex].select("No"); + choices[shareDesktopIndex].select("Yes"); + choices[viewOnlyIndex].select("No"); // But let them be overridden by parameters @@ -132,6 +144,13 @@ } } + // "Show Controls" setting does not have associated GUI option + + showControls = true; + String s = v.readParameter("Show Controls", false); + if (s != null && s.equalsIgnoreCase("No")) + showControls = false; + // Make the booleans and encodings array correspond to the state of the GUI setEncodings(); @@ -148,10 +167,17 @@ choices[shareDesktopIndex].disable(); } + + void disableViewOnly() { + labels[viewOnlyIndex].disable(); + choices[viewOnlyIndex].disable(); + } + // - // setEncodings looks at the encoding and copyRect choices and sets the - // encodings array appropriately. It also calls the vncviewer's - // setEncodings method to send a message to the RFB server if necessary. + // setEncodings looks at the encoding, compression level, cursor + // shape updates and copyRect choices and sets the encodings array + // appropriately. It also calls the vncviewer's setEncodings method + // to send a message to the RFB server if necessary. // void setEncodings() { @@ -161,6 +187,7 @@ } int preferredEncoding = rfbProto.EncodingRaw; + boolean enableCompressLevel = false; if (choices[encodingIndex].getSelectedItem().equals("RRE")) { preferredEncoding = rfbProto.EncodingRRE; @@ -168,24 +195,64 @@ preferredEncoding = rfbProto.EncodingCoRRE; } else if (choices[encodingIndex].getSelectedItem().equals("Hextile")) { preferredEncoding = rfbProto.EncodingHextile; - } - - if (preferredEncoding == rfbProto.EncodingRaw) { - choices[rawPixelDrawingIndex].select("Fast"); - drawEachPixelForRawRects = false; + } else if (choices[encodingIndex].getSelectedItem().equals("Zlib")) { + preferredEncoding = rfbProto.EncodingZlib; + enableCompressLevel = true; + } else if (choices[encodingIndex].getSelectedItem().equals("Tight")) { + preferredEncoding = rfbProto.EncodingTight; + enableCompressLevel = true; } encodings[nEncodings++] = preferredEncoding; - if (preferredEncoding != rfbProto.EncodingRRE) { - encodings[nEncodings++] = rfbProto.EncodingRRE; + if (preferredEncoding != rfbProto.EncodingHextile) { + encodings[nEncodings++] = rfbProto.EncodingHextile; + } + if (preferredEncoding != rfbProto.EncodingTight) { + encodings[nEncodings++] = rfbProto.EncodingTight; + } + if (preferredEncoding != rfbProto.EncodingZlib) { + encodings[nEncodings++] = rfbProto.EncodingZlib; } if (preferredEncoding != rfbProto.EncodingCoRRE) { encodings[nEncodings++] = rfbProto.EncodingCoRRE; } - if (preferredEncoding != rfbProto.EncodingHextile) { - encodings[nEncodings++] = rfbProto.EncodingHextile; + if (preferredEncoding != rfbProto.EncodingRRE) { + encodings[nEncodings++] = rfbProto.EncodingRRE; + } + + if (enableCompressLevel) { + labels[compressLevelIndex].enable(); + choices[compressLevelIndex].enable(); + try { + compressLevel = + Integer.parseInt(choices[compressLevelIndex].getSelectedItem()); + } + catch (NumberFormatException e) { + compressLevel = -1; + } + if (compressLevel >= 1 && compressLevel <= 9) { + encodings[nEncodings++] = + rfbProto.EncodingCompressLevel0 + compressLevel; + } + } else { + labels[compressLevelIndex].disable(); + choices[compressLevelIndex].disable(); } + // Request cursor shape updates if necessary. + + requestCursorUpdates = + !choices[cursorUpdatesIndex].getSelectedItem().equals("Disable"); + + if (requestCursorUpdates) { + encodings[nEncodings++] = rfbProto.EncodingXCursor; + encodings[nEncodings++] = rfbProto.EncodingRichCursor; + ignoreCursorUpdates = + choices[cursorUpdatesIndex].getSelectedItem().equals("Ignore"); + } + + encodings[nEncodings++] = rfbProto.EncodingLastRect; + v.setEncodings(); } @@ -199,14 +266,11 @@ reverseMouseButtons2And3 = choices[mouseButtonIndex].getSelectedItem().equals("Reversed"); - drawEachPixelForRawRects - = choices[rawPixelDrawingIndex].getSelectedItem().equals("Reliable"); - - copyRectFast - = (choices[copyRectFastIndex].getSelectedItem().equals("Fast")); - shareDesktop - = (choices[shareDesktopIndex].getSelectedItem().equals("Yes")); + = choices[shareDesktopIndex].getSelectedItem().equals("Yes"); + + viewOnly + = choices[viewOnlyIndex].getSelectedItem().equals("Yes"); } @@ -222,15 +286,16 @@ return true; } else if ((evt.target == choices[encodingIndex]) || + (evt.target == choices[compressLevelIndex]) || + (evt.target == choices[cursorUpdatesIndex]) || (evt.target == choices[useCopyRectIndex])) { setEncodings(); return true; } else if ((evt.target == choices[mouseButtonIndex]) || - (evt.target == choices[rawPixelDrawingIndex]) || - (evt.target == choices[copyRectFastIndex]) || - (evt.target == choices[shareDesktopIndex])) { + (evt.target == choices[shareDesktopIndex]) || + (evt.target == choices[viewOnlyIndex])) { setOtherOptions(); return true; --- vnc-java-3.3.3r2.orig/zlib.vnc +++ vnc-java-3.3.3r2/zlib.vnc @@ -0,0 +1,17 @@ + + + + +$USER's $DESKTOP desktop ($DISPLAY) + + + + + +www.TightVNC.com + --- vnc-java-3.3.3r2.orig/ChangeLog +++ vnc-java-3.3.3r2/ChangeLog @@ -0,0 +1,162 @@ +2001-09-16 15:06 const + + * optionsFrame.java, rfbProto.java, vncCanvas.java, vncviewer.java: + Addition of new parameters PASSWORD, "Include Controls", and "View + Only", modified patch from Steve Kann. + +2001-06-19 00:46 const + + * README: Version string change. + +2001-05-12 17:55 const + + * vncviewer.java: (setEncodings): Possible NullPointerException + fixed. + +2001-03-07 15:06 const + + * vncCanvas.java: Initial "software cursor" position set to (0, 0) + instead of (40, 40). Minor code clean-up. + +2001-02-16 05:45 const + + * vncCanvas.java: Minor performance fix and tiny clean-ups in code + and comments. + +2001-02-16 04:29 const + + * clipboardFrame.java, optionsFrame.java: Tiny changes after + looking in the TridiaVNC CVS sources. + +2001-02-16 03:48 const + + * README: Version string changed. + +2001-02-16 00:48 const + + * vncCanvas.java: A number of performance optimizations and code + clean-ups for all supported encodings. + +2001-02-15 02:56 const + + * optionsFrame.java, vncCanvas.java: Drawing techniques changed: + now all drawing is performed through the rawPixelsImage object and + the pixels[] array, paintImage is not used any more. Settings "Raw + pixel drawing: Fast/Reliable" and "CopyRect: Fast/Reliable" removed + from the Options panel since they do not make sense in new drawing + model. Currently drawing of solid-color areas is slow but this + issue hopefully will be fixed in next versions. + +2001-02-08 08:06 const + + * rfbProto.java, vncCanvas.java, vncviewer.java: Fixes for + compilation on Java 2 platform, from Klaus Erber. + +2001-01-28 17:58 const + + * README, optionsFrame.java, rfbProto.java, vncCanvas.java: One + more name added to copyright strings. ;-) + +2001-01-28 17:51 const + + * hextile.vnc, index.vnc, noshared.vnc, shared.vnc, tight.vnc, + zlib.vnc: www.TridiaVNC.com links chanded to www.TightVNC.com. + +2001-01-28 17:43 const + + * Makefile, hextile.vnc, noshared.vnc, tight.vnc: More HTML + templates for different default settings prepared. + +2001-01-28 17:36 const + + * optionsFrame.java: Tight encoding is now set by default. + +2001-01-27 05:24 const + + * vncviewer.java: Tiny formatting changes. + +2001-01-27 04:11 const + + * authenticationPanel.java, vncviewer.java: From TridiaVNC: set + initial input focus to password field. + +2001-01-27 03:58 const + + * Makefile: Unneeded changes reverted. + +2001-01-27 01:52 const + + * vncCanvas.java: Many changes. Cursor shape updates should work in + all modes. + +2001-01-26 02:31 const + + * optionsFrame.java, rfbProto.java, vncCanvas.java: Support for + EncodingLastRect added. Bugfix: "Cursor shape updates: Ignore" + option caused exceptions on XCursor updates. + +2001-01-26 02:10 const + + * optionsFrame.java, vncCanvas.java, vncviewer.java: RichCursor and + XCursor encodings now work, but only for raw encoding. Minor + formatting fixes (spaces -> tabs). + +2001-01-26 02:09 const + + * rfbProto.java: Minor formatting fixes (spaces -> tabs). + +2001-01-25 01:25 const + + * vncCanvas.java: "Cursor shape updates: Ignore" option works for + RichCursor encoding. + +2001-01-25 00:55 const + + * optionsFrame.java, vncCanvas.java: Non-finished RichCursor + support, minor code cleanups. + +2001-01-24 00:42 const + + * optionsFrame.java, rfbProto.java: "Cursor shape updates" item in + options frame. Minor bugfix: "Compression level" item remained + enabled when raw encoding was chosen after zlib or tight. + +2001-01-23 23:02 const + + * optionsFrame.java, rfbProto.java: Requesting compression level + for tight and zlib encodings. + +2001-01-23 00:22 const + + * vncCanvas.java: Major speed optimizations and code cleanups in + tight encoding implementation. + +2001-01-22 21:10 const + + * vncCanvas.java: More error checking. + +2001-01-22 21:06 const + + * vncCanvas.java: Error checking, code cleanups. + +2001-01-19 13:53 const + + * Makefile, optionsFrame.java, rfbProto.java, vncCanvas.java: First + version of Java vncviewer with tight encoding support. + +2000-09-29 23:39 const + + * DesCipher.java, LICENCE.TXT, Makefile, README, + animatedMemoryImageSource.java, authenticationPanel.java, + clipboardFrame.java, dir.mk, index.vnc, optionsFrame.java, + rfbProto.java, shared.vnc, vncCanvas.java, vncviewer.java, + zlib.vnc: Initial revision + +2000-09-29 23:39 const + + * DesCipher.java, LICENCE.TXT, Makefile, README, + animatedMemoryImageSource.java, authenticationPanel.java, + clipboardFrame.java, dir.mk, index.vnc, optionsFrame.java, + rfbProto.java, shared.vnc, vncCanvas.java, vncviewer.java, + zlib.vnc: Imported sources + --- vnc-java-3.3.3r2.orig/makefile +++ vnc-java-3.3.3r2/makefile @@ -1,14 +1,37 @@ +# +# Making the VNC applet. +# -.SUFFIXES: .java .class - -.java.class: - javac $< +CP = cp +JC = javac +JAR = jar +ARCHIVE = vncviewer.jar +PAGES = index.vnc shared.vnc noshared.vnc hextile.vnc zlib.vnc tight.vnc +INSTALL_DIR = /usr/local/vnc/classes CLASSES = vncviewer.class rfbProto.class authenticationPanel.class \ vncCanvas.class optionsFrame.class clipboardFrame.class \ animatedMemoryImageSource.class DesCipher.class -all: $(CLASSES) vncviewer.jar +SOURCES = vncviewer.java rfbProto.java authenticationPanel.java \ + vncCanvas.java optionsFrame.java clipboardFrame.java \ + animatedMemoryImageSource.java DesCipher.java + +OPTS = -source 1.3 + +all: $(CLASSES) $(ARCHIVE) + +$(CLASSES): $(SOURCES) + $(JC) $(OPTS) -target 1.1 -O $(SOURCES) + +$(ARCHIVE): $(CLASSES) + $(JAR) cf $(ARCHIVE) $(CLASSES) + +install: $(CLASSES) $(ARCHIVE) + $(CP) $(CLASSES) $(ARCHIVE) $(PAGES) $(INSTALL_DIR) + +export:: $(CLASSES) $(ARCHIVE) index.vnc shared.vnc + @$(ExportJavaClasses) -vncviewer.jar: $(CLASSES) - jar cf $@ $(CLASSES) +clean:: + -$(RM) *.class *.jar --- vnc-java-3.3.3r2.orig/debian/vnc-java.dirs +++ vnc-java-3.3.3r2/debian/vnc-java.dirs @@ -0,0 +1,3 @@ +usr/bin +usr/sbin +usr/share/java --- vnc-java-3.3.3r2.orig/debian/vnc-java.docs +++ vnc-java-3.3.3r2/debian/vnc-java.docs @@ -0,0 +1 @@ +README --- vnc-java-3.3.3r2.orig/debian/jvncviewer.pod +++ vnc-java-3.3.3r2/debian/jvncviewer.pod @@ -0,0 +1,18 @@ +=head1 NAME + +jvncviewer -- Command line starter of the Java VNC viewer + +=head1 SYNOPSIS + +jvncviewer HOST[:(DISPLAY#|:PORT#)] + +=head1 AUTHOR + +Author of this manpage is Ola Lundqvist + +=head1 SEE ALSO + +java(1) +vncserver(1) + +=cut --- vnc-java-3.3.3r2.orig/debian/vnc-java.prerm +++ vnc-java-3.3.3r2/debian/vnc-java.prerm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ] ; then + BIN=/usr/bin + update-alternatives --remove \ + vncviewer $BIN/jvncviewer +fi + +#DEBHELPER# + +exit 0 --- vnc-java-3.3.3r2.orig/debian/jvncviewer.1 +++ vnc-java-3.3.3r2/debian/jvncviewer.1 @@ -0,0 +1,144 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "JVNCVIEWER 1" +.TH JVNCVIEWER 1 "Sat Jan 28 21:48:22 CET 2006" "Java VNC " "User Contributed Perl Documentation" +.SH "NAME" +jvncviewer \-\- Command line starter of the Java VNC viewer +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +jvncviewer HOST[:(DISPLAY#|:PORT#)] +.SH "AUTHOR" +.IX Header "AUTHOR" +Author of this manpage is Ola Lundqvist +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIjava\fR\|(1) +\&\fIvncserver\fR\|(1) --- vnc-java-3.3.3r2.orig/debian/vnc-java.postinst +++ vnc-java-3.3.3r2/debian/vnc-java.postinst @@ -0,0 +1,18 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man/man1 + BIN=/usr/bin + update-alternatives --install \ + $BIN/vncviewer vncviewer $BIN/jvncviewer 40 \ + --slave \ + $MAN/vncviewer.1.gz vncviewer.1.gz $MAN/jvncviewer.1.gz \ + --slave \ + $MAN/xvncviewer.1.gz xvncviewer.1.gz $MAN/jvncviewer.1.gz \ + --slave \ + $BIN/xvncviewer xvncviewer $BIN/jvncviewer +fi + +#DEBHELPER# + +exit 0 --- vnc-java-3.3.3r2.orig/debian/vnc-java.manpages +++ vnc-java-3.3.3r2/debian/vnc-java.manpages @@ -0,0 +1 @@ +debian/jvncviewer.1 --- vnc-java-3.3.3r2.orig/debian/copyright +++ vnc-java-3.3.3r2/debian/copyright @@ -0,0 +1,69 @@ +This package was debianized by Ola Lundqvist on +Tue, 19 Dec 2000 20:15:28 +0100. + +It was downloaded from http://www.uk.research.att.com/vnc/. + +The tight encoding patch (ver 1.2.1) from +http://www.tightvnc.com/download.html have also been applied. +Official web page is now: http://www.tightvnc.com/ +Copyright: + +VNC is Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +This software is distributed under the GNU General Public Licence as published +by the Free Software Foundation. + +VNC 3.3.3r2 Java Viewer Source Distribution +=========================================== + +VNC is Copyright (C) AT&T Laboratories Cambridge. All Rights Reserved. +This software is distributed under the GNU General Public Licence as published +by the Free Software Foundation. See the file LICENCE.TXT for the conditions +under which this software is made available. VNC also contains code from other +sources. See the Acknowledgements section (see README), and the individual files for +details of the conditions under which they are made available. + +On Debian Linux systems, the complete text of the GNU General Public +License can be found in '/usr/share/common-licenses/GPL'. + + +ACKNOWLEDGEMENTS +================ + +This distribution contains public domain DES software by Richard +Outerbridge. +This is: + + Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. + (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. + + +This distribution contains software from the X Window System, Version 11, +Release 6. This is: + + Copyright (C) 1994 X Consortium + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNEC- TION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the X Consortium shall + not be used in advertising or otherwise to promote the sale, use or + other deal- ings in this Software without prior written authorization + from the X Consor- tium. + + X Window System is a trademark of X Consortium, Inc. --- vnc-java-3.3.3r2.orig/debian/jvncviewer.sh +++ vnc-java-3.3.3r2/debian/jvncviewer.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ "$1" = "--help" ] || [ "$1" = "-help" ] ; then + echo "USAGE: jvncviewer HOST[:(DISPLAY#|:PORT#)]" + exit 0 +fi + +PT=$(echo "$1" | grep "::") +if [ -n "$PT" ] ; then + HOST=$(echo "$PT" | sed -e "s/::.*//;") + PORT=$(echo "$PT" | sed -e "s/.*:://;") +else + PT=$(echo "$1" | grep ":") + if [ -n "$PT" ] ; then + HOST=$(echo "$PT" | sed -e "s/:.*//;") + P=$(echo "$PT" | sed -e "s/.*://;") + PORT=$(echo "5900+$P" | bc) + else + HOST="$1" + PORT=5900 + fi +fi + +echo $HOST $PORT + +export CLASSPATH=/usr/share/java/vncviewer.jar + +java vncviewer HOST $HOST PORT $PORT --- vnc-java-3.3.3r2.orig/debian/control +++ vnc-java-3.3.3r2/debian/control @@ -0,0 +1,22 @@ +Source: vnc-java +Section: contrib/x11 +Priority: optional +Maintainer: Ola Lundqvist +Build-Depends-Indep: debhelper (>> 4.0), default-jdk +Standards-Version: 3.6.2 + +Package: vnc-java +Architecture: all +Suggests: vncserver +Conflicts: vncserver (<< 3.3.3r2-14) +Provides: vnc-viewer +Description: VNC java applet and command line program + VNC stands for Virtual Network Computing. It is, in essence, a remote + display system which allows you to view a computing `desktop' environment + not only on the machine where it is running, but from anywhere on the + Internet and from a wide variety of machine architectures. + . + This is the vnc java applet files that the vnc-server + can distribute to the client. + . + It also includes the TightVNC patches from http://www.tightvnc.com/ --- vnc-java-3.3.3r2.orig/debian/rules +++ vnc-java-3.3.3r2/debian/rules @@ -0,0 +1,100 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=4 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #/usr/bin/docbook-to-man debian/vnc-java.sgml > vnc-java.1 + pod2man --section=1 \ + --release="Java VNC " \ + --date="`date`" \ + debian/jvncviewer.pod > debian/jvncviewer.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/vnc-java. + mkdir -p $(CURDIR)/debian/vnc-java/usr/share/vnc-java + install -o root -g root -m 644 *.class \ + $(CURDIR)/debian/vnc-java/usr/share/vnc-java + install -o root -g root -m 644 vncviewer.jar \ + $(CURDIR)/debian/vnc-java/usr/share/java/vncviewer-3.3.3r2.jar + install -m 755 debian/jvncviewer.sh \ + $(CURDIR)/debian/vnc-java/usr/bin/jvncviewer + ln -s vncviewer-3.3.3r2.jar \ + $(CURDIR)/debian/vnc-java/usr/share/java/vncviewer.jar + ln -s ../java/vncviewer-3.3.3r2.jar \ + $(CURDIR)/debian/vnc-java/usr/share/vnc-java/vncviewer.jar + install -o root -g root -m 644 *.vnc \ + $(CURDIR)/debian/vnc-java/usr/share/vnc-java + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + # You may want to make some executables suid here. +# dh_suidregister +# dh_makeshlibs + dh_installdeb +# dh_perl +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- vnc-java-3.3.3r2.orig/debian/changelog +++ vnc-java-3.3.3r2/debian/changelog @@ -0,0 +1,65 @@ +vnc-java (3.3.3r2-8) unstable; urgency=low + + * Remove dependency on jikes and kaffe. Closes: #528067. + Thanks to Niels Thykier for the patch suggestion. + + -- Ola Lundqvist Sun, 27 Sep 2009 14:28:10 +0200 + +vnc-java (3.3.3r2-7) unstable; urgency=low + + * Correction of bashism in jvncviewer, closes: #383324. + + -- Ola Lundqvist Sun, 20 Aug 2006 20:18:32 +0200 + +vnc-java (3.3.3r2-6) unstable; urgency=low + + * Updated because of changes in kaffe, closes: #348363. + * Updated to standards version 3.6.2. + * Moved to debhelper 4 compatibility. + * Use dh_installman instead of dh_installmanpages. + + -- Ola Lundqvist Sat, 28 Jan 2006 21:32:13 +0100 + +vnc-java (3.3.3r2-5) unstable; urgency=low + + * Fixed so it works with older java engines. Same bug as in #175761. + * Fixed debian/rules file so it builds with recent jikes and kaffe. + * Updated standards version to 3.6.1. + * Added versioned dependency on debhelper. + + -- Ola Lundqvist Thu, 22 Jul 2004 23:56:20 +0200 + +vnc-java (3.3.3r2-4) unstable; urgency=low + + * Moved jar files to usr/share/java, now using symlinks. + * Removed local variables from changelog. + * Updated standards version from 3.5.2 to 3.5.8 (no other changes). + * Fixed short description line. + * Added command line program and removed dependency on vncserver, + closes: #173681. + * Changed provides line from vncviewer to vnc-viewer. + * Now really build using kaffe and jikes. Next step is to make sure + that it can run too. + * Now uses build-depends-indep instead. + + -- Ola Lundqvist Thu, 6 Feb 2003 09:47:14 +0100 + +vnc-java (3.3.3r2-3) unstable; urgency=low + + * Applied the tightvnc patches version 1.2.1, closes: #106163. + + -- Ola Lundqvist Mon, 01 Oct 2001 10:56:37 +0200 + +vnc-java (3.3.3r2-2) unstable; urgency=low + + * Fixed some dependencies, closes: Bug#80335. + * Now builds with jikes instead (thanks to Colin Watson ), + closes: Bug#80349. + + -- Ola Lundqvist Tue, 19 Dec 2000 20:15:28 +0100 + +vnc-java (3.3.3r2-1) unstable; urgency=low + + * Initial Release, closes: Bug#79759. + + -- Ola Lundqvist Tue, 19 Dec 2000 20:15:28 +0100