This enables legacy Unix apps to be run on a centralised X11 infrastructure, with users getting the benefit of being able to access the running Unix app via the bandwidth-efficient Citrix ICA protocol. This has the added benefit that users can disconnect their Citrix session and leave the Unix desktop session application still running until the user wants to re-connect.
The scripts enable a user to run a published Citrix app which starts X11 on the XenApp server, launches a login panel running on the remote Unix server and, following successful login via SSH using the supplied credentials, launches the remote Unix application on the application server, tunnelling the X11 graphics back to the XenApp server.
The entire Unix desktop and Unix application is rendered by the X11 server on the XenApp server, and all graphics then are relayed to the user's Citrix client via Citrix ICA in the usual way.
The script actually runs the remote Xsession on a different Unix server to the Unix application, but you might not need this.
In fact, the scripts are fairly specific to a consulting job from a few years ago, but no doubt will be useful to someone, especially for:
- Figuring out how to safely and successfully launch and use Cygwin/X11 on XenApp;
- Running an interactive and customised logon panel for a Unix desktop/application session using Expect and Tcl;
- Automating the backend connection from Citrix to the application via SSH.
Screenshots
TCL/Expect-driven login window. This, including the surrounding Cygwin window decoration, is what the user sees when they launch the XenApp published app (which simply runs the xxxx.sh script on the XenApp server).
Resulting desktop session, ready to run the application. Again, this is exactly what the user sees, including the surrounding Cygwin window decoration.

