From: Logan Capaldo Date: 2005-06-10T20:35:56+09:00 Subject: Re: [RFC] framework of Ruby/Tk + VNC On 6/9/05, Hidetoshi NAGAI wrote: > Hi, > > I'm working on a framework of Ruby/Tk + VNC. > Its purpose is to put GUI applications of Ruby/Tk on internet view. > The concept of the framework is, > > * Use VNC (RFB protocol) > > * A GUI application is running on a safe (safe-Tk) based > slave interpreter (usually, $SAFE == 4). > If required, you can also use a non-safe based slave. > > * Never use general window managers to decrease security risk. > Except a VNC server, only one Ruby/Tk process is running. > # In the future, it may be expected that Ruby/Tk has > # RFB server functions and no VNC server is required > # for this purpose. > > * A canvas widget of the master interpreter works like > as a window manager. The canvas widget administers the > slave interpreter's root/toplevel widgets by window items > embedded them. > > By comparison with using tclplugin, probably, the followings > are advantages. > > * If the user already has a kind of VNC viewer, > he can use it to access the application. > > * When the user access the application by a web browser, > the application server can send a JAVA viewer applet. > Therefore, the user doesn't need to install any plugins. > > * Even if the application uses some Tcl/Tk extensions, > the user doesn't need to install such extensions. > > * No need to send the source of the application. > Funcamentally, interchanged data are only window events > and display images on RFB protocol. > So, it can decrease the cost of care for security. > > Disadvantages are, > > * Slow, because it is remote access through networks. > > * Much resources are required on the server. > > A sample script based on this concept is attached > at the end of this mail. > That requires 2005/06/08 or later version of Ruby. > Please note that, because of using multi-tk library, > the description of script on the slave interpreter is > almost same as the description of usual Ruby/Tk script. > > Although it is an old and slow machine and is not > decided how long term it is available to use, > there is a server to try the sample script. > Please access 131.206.154.81:33 by VNC viewer, > or http://131.206.154.81/ by web browser. > Of course, Ruby is not required on user's machine. > > # When by a web browser, a dialog to require password is shown. > # Please ignore it and press the "OK" button with empty password. > > Any comments (or wish to participate in the development ;-)) > are welcome. > > Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) > Neat! Once upon a time I read up on the RFB protocol, I don't believe it would be too difficult to make a Tk/RFB server assuming Tk's drawing and input layers are abstracted (which I am sure they are since it is so portable).