Download setup.exe
* Download Cygwin setup.exe from cygwin.com. There is no difference between “Install Cygwin Now” and “Install Cygwin/X Now” buttons.
* Move setup.exe to a local folder where you would also like to store downloaded Cygwin files, e.g. c:\download\cygwin.
Install Cygwin, X11 and OpenSSH
* Double click setup.exe to startup download and installation.
* Choose Install from internet.
* Set root directory, e.g. c:\cygwin.
* Accept Local Package Directory, e.g. c:\download\cygwin.
* Choose Direct Connection if you’re directly connected to the internet.
* Choose download site, e.g. ftp://ftp.gtlib.gatech.edu.
* In the upper left corner, type X11 in the search field. Note the capital X.
* Select to install the whole X11 category at the bottom of the package list by clicking the two-arrow symbol until text after it changes to “install“.
* Click the “View” button so all the packages are listed alphabetically.
* Type openssh in the search field.
* Find “openssh” package. Click the double-arrow symbol until the text after it changes to install or package version numbers, e.g. 5.8p 1-1.
* Click Next and wait for the selected packages (Cygwin, X11 and openssh) to be downloaded and installed.
* Click Finish when done.
Start Cygwin/X SSH Session
* Click Cygwin shortcut to bring up the Cygwin window.
* Type startx to bring up the Cygwin/X window (Cygwin/X:0.0).
* In one of the xterm, type
ssh -Y -l username remote_hostname_or_ip_address
* Remote X windows such as Java GUI can now be shown on Cygwin/X.
References
Cygwin/X User’s Guide
Cygwin SSH Notes
Cygwin/X Frequently Asked Questions
Misc Commands
# sync up local accounts $mkpasswd -l > /etc/passwd # Using an alternate home root $ mkpasswd -l -p "$(cygpath -H)" > /etc/passwd
Enable Back arrow key
To permanently enable back arrow key in xterms:
* Create a file called .Xdefaults in home directory.
* Add to .Xdefaults file:
*ttyModes: erase ^H
Uninstall Cygwin from Windows XP
* Remove all installed services
# Remove sshd service $ cygrunsrv --stop sshd $ cygrunsrv --remove sshd $ net user sshd delete # Remove cron service $ cygrunsrv --stop cron $ cygrunsrv --remove cron $ net user cron delete # Remove syslog-ng service $ cygrunsrv --stop syslog-ng $ cygrunsrv --remove syslog-ng
* Delete the folder c:\cygwin and all its sub-folders.
* Remove the Environment Variable CYGWIN.
* Edit the Environment path accordingly.
* Start -> Run -> regedit and delete these two registry trees
"HKEY_CURRENT_USER_Software_Cygnus Solutions" "HKEY_LOCAL_MACHINE_Software_Cygnus Solutions"
* Go to Control Panel -> Category View -> Performance and Maintenance -> Administrative Tools -> Computer Management (or click Start -> Run -> compmgmt.msc):
– Delete the sshd user if it exists in the “System Tools” – “Local Users and Groups” – “Users” section.
– Delete cron user if it exists in the “System Tools” – “Local Users and Groups” – “Users” section.
Reference: http://pigtail.net/LRP/printsrv/remove-cygwin.html