performance / tuning tips. to the point.                
About Us | Site Map | Privacy
Disclaimer | Feedback
About RSS Feed
Add to My Yahoo!
Google Reader or Homepage
del.icio.us performancewiki.com Latest Items


© 2006-2007 PerformanceWiki.com
All Rights Reserved.







How To Run X Applications Using PuTTY and Cygwin



What is PuTTY?

PuTTY is a client program for the SSH, Telnet and Rlogin network protocols.

These protocols are all used to run a remote session on a computer, over a network. PuTTY implements the client end of that session: the end at which the session is displayed, rather than the end at which it runs.

In really simple terms: you run PuTTY on a Windows machine, and tell it to connect to (for example) a Unix machine. PuTTY opens a window. Then, anything you type into that window is sent straight to the Unix machine, and everything the Unix machine sends back is displayed in the window. So you can work on the Unix machine as if you were sitting at its console, while actually sitting somewhere else.



Using PuTTY to remotely manage applications on Unix systems

PuTTY is useful in the case where firewalls prevent you from establishing X sessions using conventional means (e.g., Exceed). It is also encrypted and secure, which standard X sessions are not.
PuTTY allows X applications to run faster remotely than using the full Exceed client, especially working remotely from home.
You still need to have an X server running locally on your laptop to "serve" the X displays, of course. You can use Exceed (passive mode) for that or download Cygwin from http://www.cygwin.com/.
1. Download PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Once PuTTY is installed, launch it from desktop or Start menu.
2. Configure PuTTY to connect to your remote Unix servers:
Choose Protocol, e.g., for Linux, use SSH:

PuTTY Configuration Screen

Choose SSH version 2:

PuTTY Configuration Screen

Enable X11 forwarding, leave display location localhost:0, this works fine:

PuTTY Configuration Screen

Save profile:

PuTTY Configuration Screen

Next, start X Server locally using Cygwin (assume you already installed it on your local system), and type the following command:

Start X Server cygwin

Start PuTTY, and double-click on a saved profile, you will get a shell window:

SSH login

Start any X application, you will have it displayed localy:

start x app

That's it. Notice you don't need to export DISPLAY at all with this config.