Using Cygwin for X11 Forwarding
Cygwin can provide X11 support to make running GUI dependent Unix software easier in a Windows environment.
- You can obtain cygwin from here: http://www.cygwin.com/install.htm . Download and run the appropriate version for your Windows version, either 32- or 64-bit.
- Run through the install. At the "Choose a Download Site" section of the Cygwin Setup there are a number of options. All of them should be valid, but if you have connection problems you can switch sources.
- When you reach the "Select Packages" section choose any that you might want for local use, but make sure to select an ssh-client (under 'Net', openssh works well), and both xinit and xorg-server (under 'X11').
- Allow Cygwin to install any required packages and continue the install, it will take a while.
Using the Cygwin X11 server through the XWin Server app's interface
- Go to the Start menu and run the 'XWin Server' app.
- Right-click the 'Cygwin/X Server' shortcut in the notification area, select applications, then start xterm
- In the xterm window you can connect to whichever resource you like via ssh and enable X11 forwarding back to your running X server by using the -XY switches as follows:
ssh -XY email@example.com
When your remote session begins, you should be able to start remote x11 programs, with the GUI appearing on your machine. Running 'xeyes' or 'xclock' is a good test.
Using the Cygwin X11 server through a regular Cygwin shell
If you need to connect to the X Server from a Cygwin shell you have to set the display environment variable (DISPLAY) manually. The following commands can do that:
Once the display is set you can open an ssh session with the correct switch to allow X11 forwarding, usually -X, as follows:
ssh -X firstname.lastname@example.org
You may have to troubleshoot based on your personal installation and the version of ssh that you are invoking - it is generally easier to use the xterm app from within the XWin Server app.