[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[RFC] framework of Ruby/Tk + VNC

Hidetoshi NAGAI

6/10/2005 3:43:00 AM

9 Answers

Logan Capaldo

6/10/2005 11:36:00 AM

0

On 6/9/05, Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> 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.2... 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).


greg.kujawa

6/10/2005 1:53:00 PM

0

Hidetoshi NAGAI wrote:

>* 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.

This is a very interesting project. One question. The server isn't
running a window manager and the Ruby/Tk process is acting as the
window manager through the TkCanvas object, correct? What I don't
understand is how a VNC client automatically connects to this TkCanvas
object that's acting as the VNC server's window manager. Is there some
static mapping or correlation that has to be made manually on the
server? How does the VNC server bind itself to the Ruby/Tk process?

Hidetoshi NAGAI

6/10/2005 5:28:00 PM

0

Hidetoshi NAGAI

6/10/2005 5:29:00 PM

0

greg.kujawa

6/10/2005 6:06:00 PM

0

Hidetoshi NAGAI wrote:

> In this case, I use the following way.
>
> * Xvnc is started from inetd and connected to X Display Manager
> (Xvnc -inet -query localhost ...).
>
>
> * X Display Manager starts up a greeter on the X (Xvnc) server.
> But the greeter is replaced to a Ruby/Tk application launcher.
>
>
> * The application launcher do setup steps (if needed),
> and executes Ruby/Tk.
> So, the Ruby/Tk process is placed on a window manager proces.
>
>
> * When the Ruby/Tk process is finished,
> Xvnc treats it as the end of Xsession, and shuts down the socket.
>
>
>--
>

Oh I see now. In the past I have used VNC on everything from Sharp
Zaurus PDA's to Linux boxes to my Windows boxes. But I hadn't looked
"under the hood" to see how it connected for sessions. In terms of the
Ruby/Tk framwork for it I was thinking in terms of my Windows
environment. And I wasn't sure of a way to redirect a VNC session from
the default window manager (i.e. - Windows itself). But this makes
sense how you can redirect things through the Xvnc/XDM session for the
non-Windows world. There's a lot more flexibility there.

Great work. I must say I am constantly impressed with the Ruby
community. It is friendly, knowledgeable, and has a very mature
application/binding collection. This is just another example.

Hidetoshi NAGAI

6/12/2005 2:11:00 PM

0

Michal Suchanek

6/12/2005 3:17:00 PM

0

On Fri, Jun 10, 2005 at 12:43:28PM +0900, Hidetoshi NAGAI wrote:
> Hi,
Hello
>
> 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.
Isn't there already some rfb support for tk? I beleive I found it while
seaching for widget toolkits for vnc a fwe weeks ago. Given that the
only one I found was tk I decided I will use web instead.

Thanks

Michal Suchanek


greg.kujawa

6/12/2005 9:25:00 PM

0

You are correct. There are options under the various Windows VNC
flavors that allows you to specify which window to share for a VNC
session, as opposed to sharing the entire Windows desktop as a whole.
So I suppose this could be very possible on the Win32 platform as well.

Hidetoshi NAGAI

6/13/2005 3:05:00 AM

0