Tuesday, October 11, 2011

Open Source XWin Solutions For Displaying Remote Clients

Recently we built a nice desktop interface using Groovy's Griffon to manage several back-end tasks.  The idea was that data center and other support folks don't want to figure out our scripts/code and that we would provide a nice friendly interface to manage the complex tasks. So far so good, until we had users who wanted to keep the application on a remote Linux server and still have pretty GUIs locally. Nonchalantly, I recommended X11 (ahh its like 1995 all over again only this time better tools!).  Umm yeah... well it took me over an hour to figure out how to make it work and how to make it work for free, so that's enough time for me to want to write down the steps so that I don't need to repeat researching this in the future.

  1. Download Cygwin via the Cygwin.exe installer!
  2. Select the xinit app under the X11 libraries.  The dependencies should be downloaded after being prompted to do so.
  3. Select openssh from the Cygwin libraries
  4. Open a Cygwin console.  Type startxwin.  More details on Cygwin/X can be found here.
  5. Install xauth on the remote server.  I am using RedHat so all it required was 'yum install xauth'.  You may also need to tweek the X11Forwarding setting in /etc/ssh/sshd_config file to allow X11 forwarding.
  6. type 'DISPLAY=:0.0' on you local machine
  7. type 'export DISPLAY' on your local machine
  8. ssh -Y username@remotehost (use -v option if errors occur)
  9. Start remote app.
The GUI should start up locally.  Good luck!

No comments: