Aerospace



Home

Company Information

Information Request

Linux How-to Guides

ADSP 21xx
Digital Signal Processing
Tutorials

SW Utilities

On-line Order Form

Linux Support

Windows Support


Bonk

Have you found this site useful? Did we save you time? Did we cure your head-ache? Is your hair growing back now?

Please make a donation to help with maintenance.


Custom Search

Cygwin with Xorg86

For Windows XP

September 2005


Scope

Cygwin is the best way to get UNIX utilities to run on MS Windows. This enables a system administrator to manage UNIX systems from a Windows desktop with ease, using SSH with X forwarding.

Provided that you have some idea of what you are doing, installing Cygwin is really easy, thanks to the online configuration utility. The setup utility shows a long list of mirrors - some are better than others - I had luck with kernel.org. By default, it only installs a very basic set of utilities and most things are marked as 'skip'. You select something extra by clicking next to 'skip'.

You should at least add OpenSSH and Xorg Base, in order to have a useful system, but there is a plethora of utilities and servers to choose from.

Before you start, note that there is a CDROM available from the University of Indiana, that has Cygwin pre-installed, called the XLive CD: http://xlivecd.indiana.edu/ This allows you to run Cygwin and OpenSSH with X forwarding very easily on any Windows PC - just pop the CD in and a wizard comes up. It is however slower than a HDD install, but it is so convenient that every administrator should have this CD in his/her toolbox.


Install

Here is a recipe to get going with Cygwin:

  • Go to http://sources.redhat.com/cygwin/ and click on "Install Cygwin now"
  • Save it to your desktop.
  • Exit your web browser.
  • Double-Click on the "Setup.exe" you just downloaded (should have the Cygwin Icon).
  • Click NEXT.
  • Choose "Install From Internet".
  • I will assume you leave the default install directory at c:\cygwin.
  • Make sure All Users and Unix are selected.
  • Click NEXT.
  • Leave the Local Package Directory as "C:\WINDOWS\Desktop".
  • Click NEXT.
  • Choose the appropriate connection option. Most common is the IE5 Settings.
  • Choose an appropriate download site. (kernel.org)
  • Click VIEW.
  • Find OpenSSH and click on the SKIP beside it.
  • Find Xorg86-base and click on the SKIP beside it.
  • Click NEXT.
  • At this point you may get a "Download Incomplete" or "Download Failure" message. If so, you need to start over again and pick another mirror.
  • Click FINISH to have the icons created for you.
  • You should then get an "Installation Complete" message box. Click OK.

Cleanup

You will see a folder on your desktop called "ftp%3a%2f%2fplanetmirror.com%2fpub%2fsourceware%2fcygwin" or some such thing. You could delete this now. You could delete the Setup.exe file from your desktop as well - unless you want to install more schtuff.


Startup

You can now start Cygwin by clicking the Cygwin icon. This will present you with a horrid black text console and a Bash prompt.

As a test, you can type "ssh johndoe@wherever.com" to open a ssh connection to another machine.


Start Xorg86

To be really useful, you need to get X running since then SSH can do X forwarding to the Windows desktop and you can then run remote X applications:

  • Click Start/Run and type in "c:\cygwin\usr\X11R6\bin\startxwin.bat" and click OK.

This will start X in a basic graphical window manager with an xterm and Bash prompt. You can now run remote X applications over SSH, if you specify the -X option. In the following example, the machine that I connect to runs sshd on a non standard port and I use compression and fast encryption to speed things up, since with Cygwin on Windows, things are much, much slower than on Linux:

$ ssh -X -C -c blowfish-cbc herman@192.168.1.10 -p 2222

Once connected, I can run the mail client thunderbird for example and the screen will be forwarded to my Windows notebook. How cool is that?


OpenSSH

Probably the most important thing to run on Cygwin is OpenSSH. You can install the server as a service on Windows, so that it will run each time you start the machine up.

Make sure the user has a Windows password set.
If not, use Control Panel...User Accounts to create a password.

Run setup.exe and find the package "openssh", click on the word "skip" 
so that an x appears and let it go.

Right click My Computer, Properties, Advanced, Environment Variables
Click the "New" button to add a new entry to System variables:
variable name is CYGWIN
variable value is "ntsec tty"

Open a cygwin window, type:
ssh-host-config

Privilege separation = yes
Create local user sshd = yes
Install sshd as a service = yes
CYGWIN = "ntsec tty"

Start ssh with:
net start sshd

If you wish to run sshd on a different port, edit the file /cygwin/etc/sshd_config with notepad or wordpad.




Copyright © 2005-2008, Aerospace Software Ltd., GPL.