TkVNC

What: TkVNC
Where: http://www.ifost.org.au/Software/tkvnc/index.html
http://www.uk.research.att.com/vnc/
Description: TkVNC is a VNC viewer written in pure Tcl/Tk. It does not yet support authentication, so it can only connect to an unsecured VNC server. However, all the original "classic" encodings are supported. It was written to be embedded inside another application, however the version here is a standalone program. In 539 lines, it may be the shortest VNC viewer written.
Currently at version 0.9
Updated: 1/2003
Contact: See web site

TkVNC is now part of Tclapps. It can also be downloaded from sourceforge [L1 ] via cvs, or (as it is a single file) from the cvs browser [L2 ].

AK: Given the recent complaints about willy-nilly placing things into tcllib, I would like to state that this action was done in consent with the author of TkVNC.

Jochen Loewer: Did the DES in Tcl, so that now TkVNC supports normal VNC authentication as well. See [L3 ]

See also VNC.

19jan03 jcw - Could you put back the "package require Tk", please? It is needed for tclkit, which is a tclsh and only becomes a wish after Tk gets asked for. I used the DES in Tcl mentioned on that page, but get an error:

    DES operates only on blocks of 8 bytes, but got 12 bytes!

(The bizarre part is that sometimes it complains about 13, not 12!)

Could this be a binary mode channel issue, or encodings? (client is macosx, sys encoding is utf-8, host is linux - different byte-order btw)

19jan03 Jochen Loewer: "package require Tk" is in again -- fixes in des.tcl as well. Actually I wanted to right and use 'string bytelength' instead of 'string length' to check block length (8 bytes), but 'string length' seem to work OK, if data comes from a '-translation binary' channel.

BR - I just added a note on the string page about not using [string bytelength] with binary data. The manual also says that.

20jan03 jcw - Yes, that bytelength thing did trip me once too. TkVNC is way cool. I've made three more changes and a tkvnc starkit is now on sdarchive:

  • source des from the same dir as tkvnc:
        source [file join [file dirname [info script]] des.tcl]
  • code to treat ports <10 as screen numbers (in attach proc):
        if {$port != "" && $port < 10} {
            set scrn $port
            set port ""
        }
  • accept port & pw on command line (as in "tkvnc mysite 0 mypw"):
        eval [linsert $argv 0 attach] ;# in proc ::vnc::Init

Wow, a 13 Kb portable VNC client!


Mac Cody: Here I am playing "me too" again. I'm currently working on a pure Tcl implementation of the Remote Framebuffer (RFB) protocol as well. I call it TclRFB, of course. I actually started working on this a couple of years ago, but shelved it for a couple of reasons:

  1. I needed to concentrate on Toucan,
  2. Lack of time otherwise, and
  3. Lack of a pure Tcl DES implementation at that time.

While I was aware of Jochen Loewer's DES implementation (see DES in Tcl), he did not make it available (understandably, as export restrictions on encryption software were much tougher at the time). I did make a loadable VNC authorization extension using SWIG and the C-based encryption sources distributed with VNC, but I really wanted a pure Tcl solution. I have created a pure Tcl DES implementation, TclDES (see DES in Tcl, again), for that purpose (among other things). TclRFB is not as directly tied to Tk as TkVNC. The extension will have both client and server functionalities available with as much support of the RFB protocol as possible (or reasonable). The intent is to allow the creation of light-weight, scripted remote interfaces, much like Proxy Tk. The client end can then be a VNC viewer - either the standalone version (Unix, Windows, Macintosh, Palm, etc) or the Java-based version running in a web browser. Eventually, I'll use the TclHttpd as a server for the VNC Java applet. - January 23, 2003

Update: TclRFB was released on May 9, 2003 and is available at http://tclrfb.sourceforge.net .

---

MHo 2008-03-06:

  • How to send Ctrl+Alt+Del to a Windows initial screen???
  • The password is shown in the Connection Dialog...
  • The windows isn't active after launching tkvnc.kit (as alway, windows needs focus -force .)
  • Klicking on the prefs menu entry leads to a fatal error in wish and a dump