My plight with tight

Next Article in Series

Lately I have been struggling with configuring TightVNC both at work and at home. TightVNC is a spin on VNC (Virtual Network Computing). Think of remote desktops , terminal services etc. The scope included making things work with VisualWorks and making things work in both Linux and Windows. After some pain I found out that there are three ways of using TightVNC:

  1. Like terminal services
  2. Like a remote desktop ( remote control)
  3. Like this private X space you can setup for yourself

Like Terminal Services

If one setups VNC as a xinetd service then the result is that VNC will behave like Windows terminal services. By this I mean that every time one attempts to connect the user is prompted with the Linux desktop’s login screen. These sessions are not “shareable” i.e. their is only one active user which is the user that logged in. Info on how to setup VNC as a “xinetd” service can be found here. On Windows I did not find a way of using TightVNC in a terminal services type of way. Instead, when one connects to a Windows box using TightVNC one is actually on the current Windows desktop i.e. under “remote control” or remote desktop mode.

Like a Remote Desktop

The default when hooking up to a Linux TightVNC server is not to hook up to what is called “display 0” i.e. the current X console running on the box in question. Therefore this means that one cannot right off use TightVNC to support “customer service” scenarios. In our case that works out fine, our users are on Windows PCs and the servers are either on Windows or Linux. So for us TightVNC’s primary purpose will be to connect to TightVNC servers running under Linux. However, if one has to connect to the user’s console i.e. if running Linux then that is apparently possible.

Like this private X space you can setup for yourself

This is to me that most useful mode. Effectively, one setup a private X console/desktop where one can spawn applications. When one exits the TightVNC viewer said private desktop does not go away. Therefore when one reconnects one still has access to the spawned applications. Since said apps are running in an X desktop one then can deploy headful apps with all the necessary GUI based tools which can include partial to full development environments. I know of three companies deploying their Smalltalk apps in such fashion. I also deploy the NYC Smalltalk wiki under VNC. It works great. The capability to debug production issues is greatly enhanced using this strategy.

Security

Neither TightVNC nor VNC are inherently secured. However, one can use SSH tunneling to secure VNC. More information can be found on www.realvnc.com faq. I also saw a readme file on how to use Stunnel to do the same. Also one can use a minimal desktop such as TWM and only spawn the desired applications. TWM just provides the necessary window and user input support i.e. there are no admin tools available such as those found in a Gnome desktop for example. Additionally, the desktop exposed can be under a specific user with very specific rights etc. The TightVNC session does use password authentication and of course one can add authentication at the app level as well.

Other Issues

I thought I had issues with running VisualWorks 7.3.1 from a Linux based TightVNC server. Happy to report that is not the case. Well, I did have a problem with certain images going into a free fall upon startup i.e. they would not get past the splash screen and would just start gobbing up all memory. To be honest I don’t have all my facts worked out. My current theory, is that base virgin images extracted via the Gnome Archive manager somehow become corrupted in such a way that starting them in a VNC session throws them into a loop. Once I replaced the faulty image with the base virgin image that is provided with the VisualWorks installation things just worked fine. BTW, for those who live in Windows most of the time , be aware that there are a couple of extra steps to do in Linux to make an image usable. Read the install.pdf.

Conclusion

I am now quite happy. Connecting to the office in New Jersey from my home in Forest Hills, NYC works quite well. A tad slower but even browsing and working with the development tools feels like almost there. Now, I don’t know how it would work out if I had to connect to the Netherlands but for now VNC is doing everything that I expected it to do and more and it works very well with VisualWorks. I don’t know if TightVNC is really any better than RealVNC but don’t really care either way, at least for now.