Ubuntu / Linux




Use Cygwin to setup remote X-windows

Use the XWin application delivered with Cygwin to login to your Linux X-Windows desktop from Win7


Ever wanted to access your Ubuntu workstation from your workstation and tried Putty? Great for simple tasks but maybe you want to access the GUI. So you tried a VNC connection. A step forward, but you first need to login to your machine and have a desktop running. Or a family member is working on your machine, so VNC is of no use. You want your own XWindows session! This tutorial will show you how.


This tutorial will show how to setup Cygwin, XWin and Ubuntu so you can create your own XWindows session on a remote Ubuntu machine from your Windows 7 computer.


Linux geeks


  • A computer running Ubuntu (or other similar distro)
  • On your Ubuntu distribution
    • SSH server with X-forwarding
    • X-Windows
    • X Desktop manager
    • account to logon to
  • On your Windows 7 workstation
    • 300MB free disk space
    • Internet connection

Required knowledge

  • how to configure options in Linux/Ubuntu
  • Linux/Ubuntu console usage
  • basic SSH knowledge


Required tools

  • vi (text editor) or e.g. Scite, XFE etc
  • Cygwin installer

Tutorial lessons

This tutorial exists of a number of lessons which must be followed in order to reach the desired effect. Please review each step by clicking on the title

0 - Overview

In this lesson I will first give an overview of how things are supposed to work.
You now have a general idea of how things are supposed to work.

1 - Install Cygwin

In this lesson we wil install Cygwin, the Unix environment on Windows. Installation is done by downloading an installer from the internet, and telling it which applications to install.
We now have the Cygwin environment setup. We were able to start XWindows and start some XWindows applications. Next step is to setup a logon-free remote session to our Ubuntu server

2 - Configure SSH

In this lesson we will configure the Secure SHell (SSH) to login without using a password. This is done by creating a personel SSH-key and adding it to the trusted users/computers on the remote machine. This way we can automate the logon process and start a remote XWindows desktop manager later on.
We now have the means to logon to our remote linux machine without using a password. This enables us to send commands to the remote computer without user interaction.

3 - Setup scripts

In this step we will put it all together: start the Cygwin Bash shell, which in turn starts XWindows which in turn logs on to your Linux machine and starts a desktop manager.
Now all should be working and you can enjoy your remote desktop!