Resources for completing CS 241 assignments

Student: Professor, help! The chemistry experiment you assigned doesn't work.

Prof: When you plunged the provided zinc and copper electrodes in the acid, what voltage did the meter indicate?

Student: I'm not working in the chem lab, but in my kitchen. I'm using a lemon instead of the acid, and a couple of steel nails. When I touch them to my tongue, I don't feel any current. Why doesn't it work?

CSCF UNIX environment

CSCF provides and maintains a UNIX computing environment. One of the objectives of this course is to give you practice using this environment. Thus, you are expected to use it to complete your assignments. The use of non-UNIX tools for the assignments in this course is not acceptable.

It is possible to use the equipment provided for this course remotely, without being physically present in the on-campus terminal labs. This document provides some guidance on how to do this. However, we strongly recommend that you work in the on-campus labs, especially during the first few weeks of the term, or if you are having difficulty in the course. If you choose to access the course environment from home instead of on-campus, you will not have easy access to the course tutor or the CSCF support staff when you run into difficulties. We generally cannot provide technical support for your own hardware and software, any more than you would expect the staff in a chemistry course to help you set up your own laboratory in your kitchen instead of using the one provided. Part of your tuition pays for support staff to maintain the CSCF environment; if you cannot get your own equipment to work, take advantage of the supported equipment on campus.

Connecting using SSH

To connect to the UNIX machines, you will need a client program that uses the Secure Shell (SSH) protocol. Linux distributions and Mac OS X include a client, accessible using the command ssh. For Windows, a client called Putty is freely available on the web: http://www.chiark.greenend.org.uk/~sgtatham/putty/

With any of these clients, you can connect to any of the CSCF servers. An SSH client gives you access to text-based programs, and also sets up a link to allow you to run graphical programs, provided you have an X server installed (see below).

Using an X server

An X server allows you to interact remotely with graphical programs running on the CSCF servers. Linux distributions include an X server. Mac OS X has an optional, freely-available X server. For Mac OS 10.4, see the Optional Installs on your installation disk. For Mac OS 10.3, see http://www.apple.com/support/downloads/x11formacosx.html For Windows, an X server is freely available as part of Cygwin. When installing Cygwin, be sure to select the following packages for installation: xorg-x11-xwin in the X section, and openssh in the Net section. After Cygwin is installed, you need to start the X server by double-clicking on the X icon that should have been created during installation.

Or, you can set up a shortcut to C:\cygwin\usr\X11R6\bin\startxwin.bat and use that to double click on. In which case, you can skip the next paragraph.

Once an X server is installed and running, you can ask your SSH client to use it when you connect to the CSCF server. In Linux or Mac OS, do this by running ssh with the -Y command-line option. If you are using Putty, check the "Enable X11 forwarding" checkbox under Connection, SSH, X11. Any graphical programs that you start in your SSH session will appear in new windows.

Easy ways to use Linux

The programs needed to connect from a Windows environment are all included with Linux. You may find it easier to just use Linux than to install all the necessary programs on Windows. Here are two easy ways to use Linux on a computer that has Windows installed.

Use a Live CD

Many Linux distributions, including Ubuntu, are provided on a Live CD, which allows you to just run Linux without having to install anything. You simply insert the CD before booting, and your computer boots Linux off the CD instead of Windows on your hard drive. Once Linux boots up, all the tools necessary to connect to the CSCF environment are available. Nothing is written to your hard drive; just remove the CD and reboot to get back to Windows. To obtain a Live CD, either download a CD image and burn it to a CD, or have the Computer Science Club help you to do this. Note: CD images are large. If you are downloading them on campus, you will get faster downloads and save our campus bandwidth by downloading from the CSCF Mirror.

Use VMWare

VMWare is a program that allows you to create a virtual computer, within which you can run Linux. This allows you to run Windows and Linux at the same time. The VMWare Server product is available for download free of charge. Once you have VMWare Server installed, you can either boot Linux within it from a Live CD, or by downloading and installing a virtual appliance. Whereas a Live CD will not write anything to your hard disk, the virtual appliance is a full Linux installation already pre-installed; in particular, it allows you to save any files you create to your hard disk.