From: "gregarican" <greg.kujawa / gmail.com>
Subject: Re: framework of Ruby/Tk + VNC
Date: Fri, 10 Jun 2005 22:55:28 +0900
Message-ID: <1118411556.428218.237840 / g49g2000cwa.googlegroups.com>
> This is a very interesting project. 

Thank you. :-)

>                                     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?

The TkCanvas object is not a real window manager. 
So, at present, I don't expect running other window applications 
at same time.
However, I want to make the TkCanvas object a window manager for 
the slave interpreter.

>                                                      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?

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.

-- 
Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)