Getting started

Summary: This lab reviews some mechanics related to the use of the Mathematics Local-Area Network (MathLAN) for CS 151. Specifically, this lab discusses:

Please don't be intimidated! Although this lab contains many details which may seem overwhelming at first, these mechanics will become familiar rather quickly. To help the process along, you might want to spend some time on your own before the next class, working through the lab a few times, exploring various buttons, and experimenting with options. Feel free to talk to the instructor or with a MathLAN User Consultant if you have questions or want additional help!


Logging in

To use any of the computers in the Mathematics Local-Area Network, one must log in, identifying oneself by giving a user name and a password. You will have received a MathLAN user name and password from the instructor if you did not already have one. If you have not received a MathLAN user name and password, or if you have forgotten either one, please tell your instructor.

When it is not in use, a MathLAN workstation displays a login screen with a space into which one can type one's user name and, later, one's password. (If the workstation's monitor is dark, move the mouse a bit and the login screen will appear.) To begin, move the mouse onto any part of the box containing the login box. Type in your user name, in lower-case letters, and press the <Enter> key. The login screen will be redrawn to acknowledge your user name and to ask for your password; type it into the space provided and press <Enter>. (Because no one else should see your password, it is not displayed on screen as you type it in.)

At this point, a computer program that is running on the workstation consults a table of valid user names and passwords. If it does not find the particular combination that you have supplied, it prints a brief message saying that the attempt to log in was unsuccessful and then returns to the login screen -- inviting you to try again. Consult the instructor or the system administrator if your attempts to log in are still unsuccessful.


The Linux/Gnome Window Environment

Once you have logged in, a control panel will appear at the bottom of the screen. Some other windows also may be visible in other parts of your screen. All of these areas are managed by a special program, called a windowing system. On MathLAN, login chores and other administrivia are handled by a program or operating system, called Linux, and the windowing system is called Gnome. (While the Linux operating system supports many languages and environments, you may be interested to know that the Linux/Gnome windowing system itself is written in Scheme.)


Practice with a terminal window: Changing your password

While we can run several programs directly, we will need to invoke others by name. The computer program that reads and responds to such invocations is called the shell, and your interactions with the shell takes place in a window generated by a program called a terminal emulator, or terminal for short.

You may already have a terminal window on screen. If not, you can start one at any time by moving the pointer onto the small monitor icon at the bottom middle of the front panel, and clicking with the left mouse button. Shortly a window appears, displaying the shell prompt -- the name of the workstation on which the shell is running, followed by a percentage sign. This prompt indicates that the shell is ready to receive instructions.

You type in such instructions using the keyboard. Move the mouse pointer into the terminal window and click the left mouse button to make the window active. Notice that the window frame changes color following the click, indicating that the window has become active.

To shut down the terminal window, press <Ctrl/D> -- that is, hold down either of the keys marked <Ctrl>, just below the <Shift> keys, and simultaneously press the <D> key. (On our workstations' keyboards, the keys marked <Ctrl> (``control'') and <Alt> (``alt'' or ``meta'') are somewhat like <Shift> keys, in the sense that they modify the effect of other keys that are pressed simultaneously.) The shell program interprets <Ctrl/D> as a signal that you have no more instructions for it and halts, and the terminal emulator closes the window automatically once the shell stops running. Alternatively, you may close a window by moving the mouse to the x at the top-right of the window, and clicking the right mouse button.

It is a good idea to change the password associated with your account shortly after you receive it and every few months thereafter. The program that one uses to change one's password is also invoked by its name, password.

Choose a new password. Make it something that you can easily remember, but not an English word or a name, since it is easy for system crackers to break in by guessing your password if you choose it from one of those categories.

Open a terminal window, select the window by clicking the left mouse button in it, and type the word password. The password program prompts you once for your old password -- the one you logged in with -- and twice for your new password. If you give your old password correctly and the two copies of your new password match, the program substitutes the new password for the old one in the table that the login program consults. The old password is discarded and will not be recognized in subsequent logins. (If the attempt to change the password fails for any reason, however, the old password is retained.)

A typical interaction to successfully change a password looks like this:


   bourbaki% password
   Changing NIS account information for walker on hopper.math.grin.edu.
   Please enter old password:
   Changing NIS password for walker on hopper.math.grin.edu.
   Please enter new password:
   Please retype new password:

   The NIS password has been changed on hopper.math.grin.edu.

   bourbaki% 

After running the password program, the shell takes over again and issues another prompt. You can invoke as many programs as you like from the shell, one after another, before pressing <Ctrl/D> to leave the shell.


Netscape Navigator

Many materials for this course will be distributed over the World Wide Web rather than in paper copies. To view materials, such as this course's syllabus and this lab, you may follow these steps:

  1. Prepare to utilize the World Wide Web by clicking on the Netscape icon (the picture with N at the bottom panel of the screen).

  2. The first time you run Netscape Navigator on MathLAN, two message boxes pop up.
    1. One box asks you to consent to the terms of Netscape Communications Corporation's licensing agreement;
    2. One box requests permission to create some configuration files in your home directory.
    You should approve both of these requests by clicking on the appropriate word. The pop-up boxes then disappear; you won't see them on subsequent uses of Netscape Navigator.

  3. Initially, Netscape Navigator displays a World Wide Web document containing its logo, version number, copyright notice, and such like. After a minute or so, or sooner if you click inside its window, the program replaces this document with a startup page entitled ``The origin,'' which is an entry point to the Mathematics and Computer Science Department's web site.

  4. A scroll bar appears along the right side of the window. Practice scrolling material shown in the window up and down:
    • Scroll down by moving the mouse to the bottom part of the scroll bar and clicking the left mouse button.
    • Scroll up by moving the mouse to the top part of the scroll bar and clicking the left mouse button.
    • Move up or down by moving the mouse to the shaded part of the scroll bar, holding the middle mouse button down, and sliding the mouse up and down.

  5. Practice moving and resizing the Netscape window.
    • Move the Netscape window by moving the mouse to the labeled bar near the top of the window, depressing the left mouse button, and dragging the window around the screen.
    • Resize the Netscape window by moving the mouse to the small border of a window or to the small corner border, pressing the left mouse button, and moving the border to a new position.
    • In the future, you may find it convenient to move the Netscape window to the upper left of the screen.

  6. To find material for this course, scroll down the "origin" page for the Mathematics and Computer Science Department, click on the line Computer Science and Mathematics Courses; this takes you to the department's home page. Now scroll down this page to find the entry for this course, Fundamentals of Computer Science I, and click on it to locate the syllabus for this course. Next, click on one of the Schedule links to view the current class schedule. (The .dvi format displays material in one type of viewer, the postscript link uses another viewer, and the pdf link uses yet another viewer. If you use the postscript option and the schedule appears upside down, the schedule may be flipped over by moving the mouse to the "orientation" menu and selecting the "swap landscape" option. If you choose the pdf option, the schedule runs down the page rather than across it -- but the schedule will print on paper as desired.)

  7. Click on the line Labs to find a listing of all labs currently developed for this course. Check that this lab is available as Lab 1.

Netscape Navigator options

Each MathLAN user can configure Netscape Navigator to reflect her or his own preferences. Between logins, these preferences are stored in a file in the user's home directory; when Netscape Navigator is started during a later session, they are reinstated from that file.

Every user of Netscape Navigator on MathLAN should at some point perform two specific configuration steps:

  1. Establish a base page -- a starting point for browsing. Here are the Uniform Resource Locators or URLs of some good choices:

    To establish your base page, within Netscape, bring up the Edit menu from the menu bar and select the Preferences operation. A pop-up window appears, allowing you to configure many features of the general appearance of Netscape Navigator. Choose the Navigator option. The rectangle labeled Home Page Location contains the URL of the ``Welcome to Netscape'' document at Netscape Communications Corporation; this is what Netscape Navigator uses by default as a base page. Replace the contents of this rectangle with one of the URLs shown above. (This does not have to be a permanent change; you can change your mind about this configuration at any time within Netscape Navigator.)

    To erase the current contents of the Home Page Location box, move the mouse pointer to the left of the first character in the box, press the left mouse button and hold it down, and drag the mouse pointer rightwards until the entire URL is displayed in reverse video, white letters on a black background. Then release the left mouse button and type the new URL; the old one will vanish as soon as you start typing. Once you have entered the new URL, move the mouse pointer onto the button marked OK at the bottom of the pop-up window and click on it with the left mouse button.

  2. Reduce the disk cache to zero. (The disk cache is a collection of files, stored in your account, containing copies of recently examined documents and graphics. While MathLAN has considerable disk space, there is no need to waste the space to maintain large disk caches; these caches have little effect on the performance of Netscape Navigator in most cases.)

    To reduce the size of the disk cache, bring up the Edit menu again and select the Preferences operation. Again a pop-up window appears. Click on the right-pointing triangle next to Advanced and then click on the Cache option. Erase the number (typically 5000) that appears in the rectangle labeled Disk Cache and replace it with 0. Finally, click on the OK button at the bottom of the pop-up window.


The DrScheme programming environment

Many of the fundamental ideas of computer science are best learned by reading, writing, and executing small computer programs that illustrate them. One of our most important tools, therefore, is a computer program designed specifically to make it easier to read, write, and execute other computer programs: a programming environment named DrScheme.

To start DrScheme, click the mouse on the large, round, red icon containing the Greek letter lambda in the middle of the control panel. Shortly, DrScheme will start up and appear as a new window, with two white rectangular text areas against a dark gray background:

(screenshot)

At the top of the window, just below the frame, is a menu bar, providing ways of activating various operations that DrScheme can perform. Eventually we'll explore a number of these, but for the moment let's just look at one that you're certain to need: the operation of shutting itself down.

Move the mouse pointer onto the word File at the left end of the menu bar and click the left mouse button. A small menu appears:

(screenshot)

Move the mouse pointer onto the word Quit at the bottom of this menu and click the left mouse button. DrScheme responds by popping up a confirmation box of its own, the purpose of which is to make sure that you don't shut down DrScheme by mistake:

(screenshot)

Move the mouse pointer onto the word Quit in the confirmation box and click the left mouse button. Both the confirmation box and the main DrScheme window disappear.

DrScheme language options

DrScheme can deal with computer programs written in any of four dialects of the Scheme programming language. When you start it up for the first time, it expects you to use Beginning Student Scheme, which is a kind of training-wheels dialect that enables DrScheme to catch and diagnose some common mistakes of novice programmers.

Since we want to use consistent materials and language throughout the semester, we're going to proceed directly to ``Full Scheme,'' which is more nearly standard. To inform DrScheme of this decision, we'll need another of the operations accessed through the menu bar. If you exited from DrScheme, restart it now. When the window appears, move the mouse pointer onto the word Language on the menu bar and click the left mouse button to bring up the Language menu. Move the mouse pointer onto the phrase Choose Language and click the left mouse button again to select that operation. Another window appears:

(screenshot)

Move the mouse pointer onto the phrase Beginning Student and press and hold the left mouse button. A menu appears, but it is visible only as long as you hold the left mouse button down. Drag the mouse pointer onto the phrase Full Scheme and then release the left mouse button. The window changes to show the ``Full Scheme'' language options.

Move the mouse pointer onto the word OK and click the left mouse button. The extra window disappears, leaving the DrScheme window. Next, move the mouse pointer onto the word Execute (next to a green arrow, just below the menu bar) and press the left mouse button. DrScheme now expects programs in the dialect it calls ``Graphical Full Scheme.''

DrScheme retains the information that you prefer to use full Scheme, so that when you log in again tomorrow and start DrScheme again, it will automatically expect programs in that dialect. You won't need to use the Choose Language operation again unless you decide that you'd like to experiment with Beginning Student Scheme or some other dialect.


Closing up/Logging Out

If you've successfully logged in, changed your password, started Netscape Navigator, selected your base page, reduced the Netscape Navigator disk cache to zero, opened DrScheme, selected the Full Scheme option, and logged out, you've completed the lab for today. [We will begin Scheme itself in the next lab.]

When one is done using a workstation, one must log out in order to allow other people to use it. To log out, move the pointer onto the footprint icon near the left of the front panel, click the left mouse button, and select the Log out option. A confirmation box will pop up, asking you to verify that you're ready to log out; move the pointer onto the word Yes near the bottom of this box and click the left mouse button. The Gnome windowing system vanishes, and after a few seconds the login screen reappears; this confirms that you're really logged out.

Please do NOT turn off the workstation when you are finished. MathLAN workstations are designed to operate continuously; turning them off and on frequently actually shortens their life expectancy.


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~walker/courses/151.fa00/getting-started.html

created December 29, 1996 by John David Stone
last revised August 23, 2000 by Henry M. Walker

Henry M. Walker (walker@cs.grinnell.edu)