Remote Apps, Local GUI on Windoze (Cygwin+X-Server)

Long time ago a friend of mine showed me how to run locally the GUI of a remote application with cygwin[1], a couple of years ago a request in my job required a X server on the server which sounded like a bad idea to me, this is a cleaner approach to run those apps that require a display, when you are running a windoze. It’s even easier if you are running Linux as it is very likely you will be running in a top of a X server.

Installation:

  1. Download the cygwin setup binary from here[2].
  2. Open the Cygwin Setup and select the following packages to install.
      openssh
      xorg-server
      xhost
      xinit
      x-start-menu-icons
      twm

Configuration:.

  1. You need your local IP, remote IP
  2. Open cygwin and run startx this will start your X-Server locally.
  3. Run: xhost +<remoteIP> on the shell opened by the X-Server.
  4. Connect to the remote server: ssh -X -l<user> <remoteIP>.
  5. Export your local display on the remote Server: export DISPLAY=<localIP>:0.0
  6. Run a graphical application that will be displayed on your local X-Server and Enjoy the Graphical Interface of a remote process in your locally

For troubleshooting/clarification, read the man pages of ssh, xhost and xserver.

[1] http://www.cygwin.com
[2] http://cygwin.com/setup.exe