|Skip to this page's content
A-Z text only
index of all UVic websites
Help for users
with screen readers
Back to common navigation links
Secure X-Sessions from Windows PC's via Xming and PuTTY
In this page we will explain how to obtain a secure X-Session to a UNIX workstation from a Windows PC. This will provide you with the ability to access the UNIX based software from home and other Windows based PC's. By going through a secure session, all traffic between the two systems will be encrypted, thus guaranteeing privacy.
Two software packages are required to implement the secure X-Session. These packages are:
- Xming - Can be downloaded from http://www.straightrunning.com/XmingNotes/. Xming is a free software port of the X-Windows server to Windows. When downloading Xming, multiple files are required/available:
If the Xming is updated, the previous software links may become invalid. If this happens, please visit http://www.straightrunning.com/XmingNotes/ for the updated software links;
- PuTTY - Can be obtained either from the PuTTY website or directly from the PuTTY site. Make sure you obtain version 0.52 or greater, as older versions do not support some of the required features.
- Download the required Xming packages, PuTTY, and any optional Xming packages you would like to use;
- Install the required Xming packages, and any optional packages that you may have downloaded and would like to install;
- Copy the PuTTY executable that was downloaded to the location that you'd like to use it from (ie Desktop, a specific location in the start menu, etc);
- Start up PuTTY, by either double-clicking on the PuTTY icon, or selecting it in the Start Menu;
- Select the Connection ⇒ SSH Category in the tree on the left of the dialog box, set the preferred SSH protocol version to 2;
- Select the Connection ⇒ SSH ⇒ Tunnels Category in the tree and enable X11 forwarding by checking the check box towards the top of the dialog box;
- Go back to the Session Category, highlight Default Settings in the Sessions list box, and click the Save button to the right of the list.
Starting an X-Session
For the sake of example, let us say that you are wanting to connect to UNIX workstation oz.ece.uvic.ca.
Xming Start Up
- Start Xming (Start ⇒ All Programs ⇒ Xming ⇒ Xming). This will start up as a button on your taskbar and no window will open;
- Nothing else needs to be done with Xming.
PuTTY Start Up
NOTE: If you are getting a message about your terminal type not being recognized during your login process, just follow the instructions below about Setting Your DISPLAY Variable.
- Start PuTTY by double clicking on the PuTTY icon;
- In the first dialog box that appears (for PuTTY), type the name of the host that you wish to connect to into the hostname text box. In the case of our example, you would type oz.ece.uvic.ca;
- Click the Open button towards the bottom of the PuTTY dialog box;
- When prompted by PuTTY enter your username/password to login to the UNIX workstation;
- Verify your X session is going through the secure tunnel. To do this type echo $DISPLAY at the command prompt in the PuTTY terminal. The result should be something towards the effect of hostname:n.0 where hostname is the name of the system that you are connected to and n is a number that is greater than or equal to 10. In the case of our example you will probably see oz.ece:10.0 If the result does not match this pattern you can fix it by following the instructions in the Setting Your DISPLAY Variable section below;
- You are now ready to run any X applications that you wish (xterm, netscape, Synopsys, etc...).
Setting Your DISPLAY Variable
If you are having problems with the DISPLAY Variable not being set properly, you can fix it by following the instructions below.
NOTE: If you end up having to set the DISPLAY variable manually, there may be something in your .cshrc or .login files that is affecting it. You might consider taking a look at these files to see what is happening and adjust them as required.
- Type setenv DISPLAY hostname:n.0 at the command prompt where hostname is the name of the server you have connected to and n = 10 initially;
- Try to start up an x-terminal by typing xterm at the command prompt;
- If an x-terminal appears on your screen, you have properly set the display variable, otherwise go back to step, but this time use n = n + 1 (ie. 11, 12, 13, ...).
This page was originally created by Erik Laxdal and Watheq El-Kharashi.