Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to Cygwin Lili He Booth Engineering Center for Advanced Technology (BECAT) Seminar.

Similar presentations


Presentation on theme: "An introduction to Cygwin Lili He Booth Engineering Center for Advanced Technology (BECAT) Seminar."— Presentation transcript:

1 An introduction to Cygwin Lili He Booth Engineering Center for Advanced Technology (BECAT) Seminar

2 What is Cygwin? Cygwin = GNU + Cygnus + Windows. It is a collection of tools to allow Windows to act like a Unix/Linux system.  A DLL (cywin1.dll) acts as a Linux API emulation layer to provide substantial Linux API functionality  A collection of tools provide Linux-look and feel. The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows.

3 Why Use Cygwin/X? It provides an X server for Windows clients. It allows you to run X programs on remote hosts (Unix/Linux systems) and routes the display to your Windows desktop. It is similar to Hummingbird Exceed, while it is free!

4 What Versions of Windows Are Supported? Cygwin can run on almost all modern 32 bit versions of Windows  This includes Windows 95/98/ME/NT/2000/XP, but except for Windows CE.  Cygwin will behave differently, and exhibit different limitations, on the various versions of Windows, since it can only do as much as the underlying OS supports.

5 How Much Space Does Cygwin Require? It depends on what have been chosen to download and install.  A full installation is probably larger than 800MB installed, not including the package archives themselves nor the source code.

6 Download Source Go to http://cygwin.com/ and click on "Install Cygwin Now!”.http://cygwin.com/  This is the most up-to-date version of Cygwin.  To find the version of the Cygwin DLL installed, use `uname' as on Linux or `cygcheck'.  Must log in as an administrator user.

7 Installation Options “Install from Internet” creates a local directory to store the packages and then installs the contents. “Download from Internet” stores the packages locally. “Install from Local Directory” installs the contents of the packages.

8 Installation Options Always choose “Install for All Users”, even if you are the only user planning to use Cygwin on the machine  Selecting Just Me will cause problems for programs such as crond and sshd. The “Default Text File Type” should be left on Unix (that is, \n), unless you have a very good reason to switch it to DOS (that is, \r\n).

9 Select Root Directory You’d better not select something like `C:\' (the root directory on the system drive) for the Cygwin root.  Otherwise, critical Cygwin system directories like `etc', `lib' and `bin' could easily be corrupted by other (non-Cygwin) applications or packages that use `\etc', `\lib' or `\bin'.

10 Select Local Package Directory The Local Package Directory is the cache where setup.exe stores the packages before they are installed.  It must not be the same folder as the Cygwin root. After installing, it is no longer necessary, but it may be retained as backups.

11 Select Connection Method The Direct Connection method of downloading will directly download the packages.

12 Select Mirrors At least one mirror site should be chosen.  Cygwin mirrors are geographically distributed around the world; http://cygwin.com/mirrors.html http://cygwin.com/mirrors.html  Multiple mirrors can be selected by holding down CTRL and clicking on each one. (http://www.mirrorservice.org; http://mirror.mcs.anl.gov are recommended)http://www.mirrorservice.org; http://mirror.mcs.anl.gov

13 Select Packages A chooser window that contains a list and basic information of packages will be available from mirror sites. Packages are grouped into categories. A minimal Cygwin installation will only includes the packages in the Base category and their dependencies by default.

14 Select Packages To install Cygwin/X, scroll down to "X11" in the "Category" column and click on the word "Default", which should then change to "Install".

15 Select Packages Openssh could also be installed. It is optional. Change “View” to “Full” and scroll down until you see "openssh" in the "Package”, check it to install.

16 Download and Installation Progress During the download and installation, progress bars will be shown for the current task and total remaining disk space.

17 Complete Installation Shortcuts on the Desktop and/or Start Menu could be chosen to install. Finally, setup.exe will run any post-install scripts to finish correctly setting up installed packages.

18 Environment Variables The safest way to launch bash initially is to use cygwin.bat file provided where the most important ones are set before bash in launched. CYGWIN variable is used to configure many global settings for the Cygwin runtime system.  Initially you can leave CYGWIN unset or set it to tty (e.g. to support job control with ^Z etc...) by using C:\> set CYGWIN=tty notitle glob

19 Environment Variables The PATH environment variable is used by Cygwin applications as a list of directories to search for executable files to run.  Set it so that it contains at least the root:\cygwin\bin directory. The HOME environment variable is used by many programs to determine the location of your home directory.  Set it to point to your home directory before launching bash.

20 Customize Bash To set bash up so that cut and paste work properly, make sure that "Quick Edit" is checked under "Properties" of the window, then on the “Options" tab.

21 What if Setup Fails? Make sure that the latest version of Cygwin Setup is used. The fails of not download the list of mirrors may be because the network is too busy or the download site not working. Try another mirror, or try again later. If setup behaved strangely, check the files `setup.log' and `setup.log.full' in /var/log (C:\cygwin\var\log by default) to get some clues as to what went wrong and why. If you're still baffled, email us appssupport@engr.uconn.edu

22 Create Startxwin Shortcut Open C:/cygwin (the Cygwin installation root folder), and go to the /usr/X11R6/bin folder. Right-click on "startxwin" (it might appear as "startxwin.bat“). Select "Create Shortcut", and drag the resulting icon to your Desktop/someplace else convenient.

23 Start Cygwin/X To start the Cygwin/X server, (double-click the startxwin shortcut that you created. After a few seconds, the "X" icon appears in the system tray and an Xterm window opens.  This Xterm window starts with a local shell on your Windows machine. To run programs on a remote host, such as sgi1, you must first log into that host.

24 Access Remote Host SSH Client – Putty; SFTP Client – WinSCP; Other SSH Clients; OpenSSH- double click Cygwin shortcut. Log into the remote host: ssh -X username@machine_name Type in your password.

25 Shut Down Cygwin/X To shut down the Cygwin/X server, right-click on the "X" icon in the system tray and click "Exit".

26 Start an X Application Start the Cygwin/X server. Log into sgi1.engr.uconn.edu either by using Putty (make sure to enable X11 forwarding in Putty’s configuration) or OpenSSH via Cygwin. Now you can run programs such as nedit, xclock, etc.

27 Uninstall Individual Packages Run Cygwin Setup (setup.exe) as you would to install packages.  In the list of packages to install, click on the "View" button to get a “full” listing. Click on the cycle glyph until the action reads "Uninstall".  Click "Next“ to uninstall the selected package.

28 Uninstall All of Cygwin Delete the Cygwin root folder and all subfolders Delete the Cygwin shortcuts on the Desktop and Start Menu, and anything left by setup.exe in the download directory. Finally, delete the registry tree `Software\Cygnus Solutions' under HKEY_LOCAL_MACHINE and/or HKEY_CURRENT_USER.

29 Uninstall All of Cygwin

30

31 Cygwin Documentation There are quite a lot of document: http://cygwin.com/docs.html http://cygwin.com/docs.html A comprehensive Cygwin User's Guide: http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html The documentation for the individual GNU tools: http://www.gnu.org/manual http://www.gnu.org/manual


Download ppt "An introduction to Cygwin Lili He Booth Engineering Center for Advanced Technology (BECAT) Seminar."

Similar presentations


Ads by Google