10.001 Customizations

PLEASE READ ME ENTIRELY!

The UNIX operating system which MIT(Athena) uses allows you to customize your personal account through the use of "dot files" (files whose names begin with a '.' character). These dot files are generally located in your home directory and are read by other programs as they go about their business, such as during boot up of a workstation. For 10.001, you should at least modify your environment by editing three dot files named ".cshrc.mine", ".environment" and ".emacs.new". These files, which must be located in your home directory, are automatically executed each time you log in or each time you start emacs.

To access the samples shown below, you must first 'attach 10.001' and then 'cd /mit/10.001/Customizations' to change your working directory.


I) WHAT THE DIRECTORY CONTAINS AND WHAT TO DO WITH IT

The Customizations directory contains three invisible (dot) files: To list all the files in your working directory type "ls -a" at the prompt. This will show a list which includes dot files.

Depending on whether or not you already have .environment and .cshrc.mine and .emacs files in your home directory, you will either:
  1. Copy these files to your home directory and append them to your existing .environment, .cshrc.mine, and .emacs files

    OR

  2. Copy these files to your home directory and then rename them .environment and .cshrc.mine and .emacs

II) WHAT IS IN THE 10.001 CUSTOMIZATION FILES

A) In .environment.new:

Note that if you did not add these lines to your dot files, then you could still type them in manually in every xterm window where they are needed.
setenv COURSE 10.001

This statement makes your default course 10.001 for purposes of turning in and picking up assignments. You can change this to any course for which NEOS (Networked Educational Online System) is in use. With this setting, assignments may be turned in using the command "turnin 1 prob1.c" instead of "turnin -c 10.001 1 prob1.c". If you wish to use turnin or pickup to get assignments for another course, e.g 10.213, then you need to use the "-c 10.213" explicitly to override the default.

#setenv PRINTER homer

(optional) The setenv command with the PRINTER option assigns a default printer for your login session. With this statement, printing is accomplished by simply saying "lpr filename", as opposed to "lpr -Pprintername filename". Also, programs like MATLAB know where to send your output. Presently, if you login at an Athena terminal in a cluster that has a printer, then the default is automatically set to the printer in that cluster, so in general this command is no longer necessary. Hence the command is preceded by a #, Unix code for"ignore this line". However, there may be situations where you wish to print to some specific printer. Use this customization if you want to set your default printer to homer, the printer in 66-080. YOU CAN CHANGE THIS TO ANY OTHER PRINTER YOU PREFER, such as a printer in your living group, etc.

attach 10.001

This statement allows you to access the 10.001 locker.

add gnu

This statement allows you access to the gnu locker. The gnu C compiler (gcc) can be run on SGI's and Suns. 'add' differs from 'attach' in that it also adds the appropriate gnu binaries directory to your path so that you can run gnu programs, most importantly the gnu C compiler, gcc.

add recipes

This statement allows you access to the Numerical Recipes functions in the recipes locker. We will use the ANSI-C version of these recipes in 10.001. Source code is also available in this locker.

add olta

This statement allows you to use the OLTA (On Line Teaching Assistant) utility. OLTA is the method recommended for asking questions outside of class or electronic classroom hours. A TA will respond to your question, if logged in, or else will post a response for you to pick up.

B) In .cshrc.mine.new:

set lineedit

This gives you the very useful ability to scroll through previous commands by hitting the "up arrow" key. This may be used to repeat a command, or correct a typo in a previous command without totally retyping it.

set prompt = "%c%"

This (optional) line changes your prompt from the "athena%" to show your current working directory, for example "~%" for your home directory, "10.001%" for the 10.001 directory, etc.

alias xterm 'xterm -sl 500 -sb'

This gives you scrollable xterm windows. There will be an extra bar at on the left side of the window, and you can see lines that ran off the top of the window by playing the MIDDLE mouse button along this bar. 500 past lines are saved. (Note: scrollable windows don't let you see files viewed by the "more" command; you may want to use "cat" instead).
alias gcc "gcc -Wall -ansi -pedantic $*"

This ensures that your gnu-compiled C code returns warnings whenever possible, including whenever it does not comply with the ANSI standard. It can be very useful for identifying bugs.

C) In .emacs.new:

(global-font-lock-mode t)
This turns on the C-appropriate color scheme in emacs


last modified: