Cygwin - Computer Support - Physics and Astronomy - University of Canterbury - New Zealand

Connecting to the Linux servers from Windows using Cygwin

Cygwin provides an interface between Windows and a linux or unix host system, allowing a user to log onto the departments Linux login servers.

There are two methods of connection: The first (and simplest) gives you full Lunix login and access to your Linux desktop, the second method opens a terminal window on one of the Linux servers from which you can run scripts and start other applications, etc.

On this page:

Method 1: XWindows Login

New Method

To connect via the Xwindows on the local PC, select the XWin Server command from the "Start button > All Programs > Cygwin-X menu. This will start up an X server on your local computer (see the X icon in the taskbar notification area) and starts a terminal window (or right click on the X icon in the taskbar notification area, select xterm from the application menu).

Login into one of our servers by issuing the SSH command:

> ssh -X username@servername

To get the Linux desktop, use the command "gnome-session" for the gnome desktop environment, or "startkde" for the KDE desktop environment.

Old method

To connect via the XWindows login, select the XWindows Login command from the Start button > All Programs > Cygwin menu. This will start up an X server on your local computer and present the department "chooser" window shown below.

login chooser window

To log in double click on the server you wish to use and you will be presented with a login similar to that shown below. Login01 and Login02 are the login servers currently in use, with galileo for legacy user accounts.

Cygwin login screen

Enter your usercode and password, hit enter or click "Go!" and you will then end up with your full Linux desktop and graphical environment, as below.

Linux desktop

To change between Windows and Linux either click on the application you want to switch to in the windows task bar, minimise the CYGWIN window, or use the "alt + tab" key combination. When you have finished your session and logged out you will be again prompted with the chooser window. There are three methods to close the chooser:

  1. Right click the cgwin entry in the Windows task bar and select exit.
  2. Double click on the X icon in the system tray at bottom right.
  3. Use the standard Unix key combination to kill a X server, press ctrl + alt + backspace all at once.

Once you have used one of these methods you will get the pop-up dialog window shown below, click exit to close the chooser.

Exit cygwin

Method 2: Local X server and PuTTY

The second method users a secure shell (SSH) connection to a Linux server. To start this select Login01 or Login02 as appropriate from the Start button > All Programs > Cygwin menu. The first time you do this you may see the message below requesting to cach the servers host key. Click Yes.

PuTTY ssh key alert

You will then be asked for your password, as shown below, logging in via a terminal window on the server.

local cygwin

If you want to run any graphical applications, eg, netscape, Matlab or XV (as shown below), you need to also start an X server on your local computer. To do this select the Xserver command from the Start button > All > Programs > Cygwin menu. This will start the cygwin Xserver and you will see a X icon in the system tray, as shown below.

Running apps locally

When you've finished with any graphical applications, double click on the X icon to close the X server.

exit local cygwin


Currently there is no easy way to cut and paste between windows and Linux. Hopefully this will be fixed in future releases.

Using method 2 for graphical appplications will normally be slower than method 1. This is because the display information is being "tunneled" through the SSH connection and undergoes encryption which adds to the work the computer has to do.


Known issues with Cygwin.

1. I can't log into any of the login servers?

If you type in your login and password, the screen flashes and then sends you back to the login or chooser window. This is because

  1. Your account maybe in negative balance.
  2. You have made a password change which hasn't propagated through the system. Your account was created on our system with the initial password you got in first year. Try doing a password change via the ICTS webpage.
  3. You have exceeded the quota of your home directory space on the Linux file server. Try using PuTTY to log in and clear some files to another space such as one of the research disks you have access to, or delete unwanted files. Type in "quota" to see your quota.
  4. The LDAP server has "died" denying you access. Please contact the systems administrators.

2. I can't connect to the chooser?

There are several reasons for this,

  1. The version of cygwin you are using is not current. First remove the installed cygwin, see "Add or Remove programs" in the control panel for Windows. Then Click on the "Add New Programs" button and install "Cygwin 2010" and then "Physics Linux shortcuts" from the menu of available programs.
  2. The XDM service on the chooser server has "died" and will need to be restarted. In this case contact the systems administrators.

In future we will be releasing shortcuts which will allow direct connection to the login servers so that it will no longer be necessary to use the chooser service.

  • Department of Physics and Astronomy
    University of Canterbury,
    Private Bag 4800,
    Christchurch 8140,
    New Zealand.
    Phone: +64 3 364 2523
    Fax: +64 3 364 2469
  • Follow us
    FacebookYoutubetwitterLinked In