天天看點

HOWTO install Cygwin

Cygwin is a Unix-like environment for windows.

It can be obtained from: www.cygwin.com

Below are notes on how to install and setup cygwin for access to group computers.

Download setup.exe  

HOWTO install Cygwin

 from www.cygwin.com.

Run application from your local harddrive.

Chose next on first screen.

Select "Install from Internet" and click next.

HOWTO install Cygwin

Enter preferred installation (Root) directory and click next.

HOWTO install Cygwin

Enter a temporary installation directory and click next.

HOWTO install Cygwin

Select "Direct Connection" and click next.

HOWTO install Cygwin

Select a download site and click next. 

(Any site that you can connect to is fine. Some sites are more stable and/or faster than others. Try to pick one that works for you.)

HOWTO install Cygwin

Select the packages you want to install and click next.

Packages you may want to install include:

opennssh

keychain (for ssh key pairs)

gv

ghostscript

emacs

vi

grace

tcsh

gnu compilers

tetex

aspell

gnuplot

rsync

HOWTO install Cygwin

Please note sometimes you may get a download incomplete and the setup application will return to step 8. Simply select another server and continue the installation process. 

Once the installation is complete, click Finish and continue with the Setup section. 

DO NOT RESTART AT THIS TIME!

Setup Windows Environment Variables:

Open your System Control Panel:Select [start]->Control Panel->System

HOWTO install Cygwin

Select "Environmental Variables" under the "Advanced" tab of the "System Properties" Control Panel.

HOWTO install Cygwin

In the Environmental variables window select new under "Variables for User" window.

HOWTO install Cygwin

Edit "User Variable" as follows:

Variable name: HOME

Variable value: Path to where you want your home directory

e.g. C:\Documents and Settings\User\My Documents\username

In the Environmental variables window select Path under "System Variables" window.

HOWTO install Cygwin

Edit "System variable" as follows:

Append "; C:\cygwin\bin" to Variable value: (semicolon is very important)

HOWTO install Cygwin

Select "Ok" to close both "Environmental Variables" and "System Properties" windows.

Setup and configuring cygwin files.

Edit the passwd file.

On your harddisk navigate to the passwd file.

For a standard install this should be under C:\cygwin\etc\

Right click on the passwd file, select open and then choose notebad to edit the file.

Edit the last line of the file as following:

username:unused_by_nt/2000/xp:1004:513:U-DEBBIE\User,S-1-5-21-1177238915-1935655697-854245398-1004:/cygdrive/c/Documents and Settings/User/My Documents/username:/usr/bin/tcsh

Save the file once you've completed the edit.

Edit the startxwin.bat file.

Next on your harddisk navigate to the startxwin.bat (you may just see starxwin if you don't allow windows to show file extensions) file.

For a standard install this should be under C:\cygwin\usr\X11R6\bin

If you want to change your default shell to tcsh instead of bash right click on the starxwin.bat file and select edit to edit this file.

Use your favourite windows text editor for this purpose (e.g. notepad)

Edit the line:

run xterm /bin/bash

to read:

run xterm -geometry 100x32 -sb -rightbar -e /usr/bin/tcsh -l

save the file, restart windows and then start X-windows by double clicking on the startxwin.bat file(you may want to make a shortcut to this file for future use).

"ssh -X" can be used to log into mail.sas and then "ssh -X" to our group machines and this will allow you to tunnel X-windows through ssh.

下一篇: React 介紹