= 5pt plus 3pt

This document briefly describes the computer facilities available on the Unix Cluster at PPPL. Copyright (C) 1993, 1994, 1995, 1996 Princeton University Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

This file briefly describes the Unix Cluster for new users. Created in 1993 with subsequent updates in 1994, 1995, and 1996.

Introduction
************

Preface
=======

This document is intended to help new users become familiar with the Unix Cluster at the Princeton Plasma Physics Laboratory (PPPL).  It describes the Unix workstations at PPPL, and the supercomputers at the National Energy Research Center (NERSC) in Berkely, California.

As a warning: none of the topics here will be covered in great depth---usually just enough information will be provided for you to get an idea of what's available at PPPL. The table of contents will list all the major sections of this manual, and there are numerous references scattered throughout the text that will refer you to the actual manuals that describe the subjects in detail.  If this is the first time you have come in contact with the systems at PPPL, we suggest that you read the chapter titled Getting Started to get a feel for how everything works. Since the computers here are being constantly upgraded, be sure to check the copyright page for the date of the last revision of this manual.  Lastly, to keep things short, there is also an on-line version of this text (access through the info command, that can be accessed should the printed text be unavailable.  Enjoy!

User Responsibilities
=====================

The computers discussed in this document are paid for by the taxpayer, used by many people, and connected to the Internet.  Since these computers are used in research, relatively few restrictions are placed on the way you use these computers. Thus, as a user of these computers you have certain obligations:

  - Make sure you pick a good password (see Choosing and Setting Passwords).  We assume that you are not malicious and so will not intentionally abuse the computers.  We need to be sure that only authorized users gain access to the computers.  Passwords are the main line of defense against computer abuse.  A password that is too short or is a common word can be guessed by malicious outsiders.

  - Please be judicious in your use of the computers.  It's easy, for example, to overwhelm the network, fill up the disks, etc.  If someone notices you doing this, you may be asked to modify your behavior. Don't take this personally; we'll try to find other ways for you to accomplish your work efficiently.

Getting Help
============

Use the man command while in UNIX. For example, to find out more about the command rm, type at the prompt:

     man rm

If you are not certain about the name of the command, use apropos. Typing in apropos quota would give you the names and a brief description of all commands involving quotas. Alternately, for help with the man command itself, you can type man man. You can also read the man pages in Emacs in the Help menu---select Man... and enter your desired entry. If you want a hardcopy about the command rm, type man -t rm.

Also available on-line is documentation for various UNIX systems and commands in the form of information files, or info.  To access these resources, simply type info at the prompt.  If you are familiar with Emacs, you can access the same information with its info mode, accessed via C-h i.

Answerbook
==========

In addition to the conventional man pages, much of the documentation on Sun Solaris systems is accessible via the "answerbook" program.  This includes reference manuals for Fortran 77, Fortran 90, C, etc.

Answerbook requires that your X display support PostScript.  This means:

(1) You are sitting at the console of a Solaris machine.  In this case, just run

answerbook

(you need to have /usr/openwin/bin in your PATH)

(2) On other X displays, you need to run a "Display PostScript Agent". Here's how:

execnx & answerbook

You only need to run execnx once per X session.  And it's not necessary to run answerbook on the same machine that you run execnx.

In addition to the conventional man pages, much of the documentation on Sun Solaris systems is accessible via the "answerbook" program.  This includes reference manuals for Fortran 77, Fortran 90, C, etc.

Software Philosophy
===================

The lab currently supports 2 OSes, Solaris and Digital Unix (DUX). Linux (currently just tern.pppl.gov) may be on the way "in". SUNOS (currently just pobox.pppl.gov) is on the way "out".

As much as possible the same software should be available everywhere, exceptions include:

  - some commercial software

  - little-used software

  - software that we can't get running everywhere

A good deal of the software (emacs, X11R6, TeX, other GNU utilities) are compiled and installed at the same time for Solaris and Dux, so they should both work identically. Much of the software comes as part of the base installation of Linux and so there may be minor differences in versions and configurations there.

VMS users on the VAX cluster computers can get help simply by typing help at the prompt and choosing among the menu items. VMS also has several consultants who can be contacted for any problems relating to the VAXes. They man a help desk in room B152 near the LOB lobby; their extension is 2275.

In addition to the on-line help available through man, NERSC also has consultants available to help users with any problems they might have. If you have an unanswered question and no one at PPPL can help you, simply address your question through e-mail to consultants@nersc.gov or call their toll free phone at 1-800-666-3772. They usually reply within a day or two. There is also a documentation of the NERSC systems available through the document ezfile command while on the Crays.

Emacs provides an on-line tutorial when you type the command CTL-h t. The tutorial, along with command apropros, is also available under the Help menu.

X-Windows also provides xman, a manual browser for the X Window System available by typing xman at the UNIX prompt.

Getting Started
***************

This chapter describes the Unix Cluster, preliminary information about your account, how to access the computers, the e-mail address conventions, and how to read news.

Available Computers
===================

The Unix Cluster is a network of UNIX computers.  This is connected to the VAX cluster (which offers access to TFTR data)and the NERSC supercomputers (in Berkely, Califorinia). At the present time, these are the computers on which you may wish to get accounts on:

The Unix Cluster
     These are a network of Unix workstations (mainly Sun workstations) which share disks and account information.  It consists of the following computers:

     Sun SPARCstation 10's, model 512, belonging to the Theory Division:
          lyman, suntsu, carl

     Suns belonging to the Tokamak Modeling Group:
          lupus, draco, orion

     Suns belonging to the CDX Group:
          ron, tom

     DEC workstations belonging to CPPG
          saturn, jupiter, neptune, mars, mercury, venus

     Other workstations on the cluster:
          pppl, ead03, hydra

The VMS cluster
     These offer access to TFTR data.  They are unsuitable for general purpose computing since they are  usually overloaded. Most people use birch, beanie, hax and rax.

NERSC
     NERSC consists of 3 Cray supercomputers located at the Lawrence Berkeley Laboratory, Berkeley, California: a.nersc.gov (a 16 processor Cray C90), k.nersc.gov (a 32 processor Cray J90), c.nersc.gov (an 8 processor Cray 2), and f.nersc.gov (a 4 processor Cray 2). Crays are for heavy duty number crunching.  Computer time is allocated yearly to PPPL by the Department of Energy (DOE).

With the exception of the VAXes, all these computers run some variant of the Unix operating system.  The VAX cluster uses VMS.

Getting an Account
==================

For an account on the Unix Cluster, contact Lena Scimeca (x2833, E-mail: unixadmin@pppl.gov). She will need to know (1) your full name, (2) your prefered username, and (3) whether you already have an account on NERSC (and if so, what your username is there).

Your username is limited to 8 characters.  By default, the choice of username is your first initial and last name; however, if that is more than 8 characters, or if you already have accounts under another username, you may want to choose another username (such as your last name only or just your initials).

To get an account on the VAXes, CCF, or the NERSC computers, contact: Robert Reed (office: C-Site, PPLCC; Tel: 609-243-3444; E-mail: reed@pppl.gov).  He will provide you with all the forms you need---they will require quite a few signatures which you will have to collect.

Choosing and Setting Passwords
==============================

Your account will be assigned a password initially.  You should change this as soon as possible after getting your account set up.  On the Unix computers, type yppasswd while on the POBOX.PPPL.GOV server. You will be prompted for your old password and asked to select a new password (which you need to enter twice, to guard against typos---the passwords are not echoed on the screen).  This changes your password on all the Unix Cluster computers. VAX cluster computers will inform you during your first login session that your password has expired and prompt you to select a new password from among the choices provided.

Here are some guidelines for choosing a password:

  - Passwords must be at least 6 characters long.

  - Passwords must be changed at least once a year.

  - Passwords should not be a word, username, or personal name.

In addition, the following recommendations will make your password more difficult to guess:

  - The longer the better---however, only the first 8 characters count on Unix systems.

  - Use the password generator on the VAX.  (Type SET PASSWORD/GENERATE=6 on the VAX cluster and keep hitting RET until you see a password you like.  Type CTL-z to get out.)

  - Mix upper and lower case; include digits or punctuation.

Accessing the Computers
=======================

There two main categories of terminals that you should know about: X terminals (including the workstation consoles) and Macintoshes.

X terminals predominate in the Theory Division.  These offer a windowing environment where the windows are controlled by the workstations or supercomputers.

Macintoshes allow connection to the Unix Cluster as a smart terminal running VersaTerm or NCSA Telnet.  Macintoshes running VersaTerm are the main way in which users connect to the Unix cluster from home.

The principle ways of logging into one of the computers here at PPPL include:

 1. Logging in directly via the console and/or through xdm (X Display Manager)

 2. Through the command xrsh from another computer

 3. Through the commands telnet or rlogin from an Internet computer

 4. Through a networked Mac

 5. Through dialing into a terminal server via a modem

Ssh, Slogin, Scp
================

ssh,slogin, and scp are "secure" replacements for rsh, rlogin, and rcp.  You may wish to use them because:

  - These provide a convenient method for establishing X connections on NERSC machines (specifically, a, mcurie, sas).

  - They provide a convenient method for accessing the Unix Cluster from off-site, since (a) rsh access to the Unix Cluster is restricted to a few domains, and (b) ssh optionally offers compression which offers improved throughput on low bandwidth connections.

  - Finally, ssh knows how to forward AFS tokens to remote machines, so you may wish to use ssh within the Unix Cluster.

The following is a quick how-to.  For more information see the man pages, ssh(1), xssh(1), sshd(8), slogin(1), scp(1), ssh-keygen(1), ssh-agent(1),ssh-add(1).

INITIAL SET UP

 1. Run ssh-keygen as follows

            $ ssh-keygen
            ...
            Enter file in which to save the key (~/.ssh/identity): [RETURN]
            Enter passphrase: [ENTER A GOOD PASS PHRASE TO PROTECT THE PRIVATE KEY]
            Enter the same passphrase again: [DITTO]
            ...

     This creates a private+public key pair in ~/.ssh/identity and ~/.ssh/identity.pub.  The first file is protected by (a) Unix permissions, and (b) your pass phrase.  The second file only needs to be protected against writing by anyone except you.

 2. Create ~/.ssh/authorized_keys:

     cp ~/.ssh/identity.pub ~/.ssh/authorized_keys

 3. Create ~/.ssh/authorized_keys on any remote systems you want to access.  E.g., on a.nersc.gov

             mkdir ~/.ssh
             chmod 755 ~/.ssh

     and use FTP to transfer the local copy of ~/.ssh/authorized_keys to a.nersc.gov.

 4. Near the beginning of your ~/.xsession, put

            eval `ssh-agent -s`
            ssh-add < /dev/null
          OR
            eval `ssh-agent -c`
            ssh-add < /dev/null

     depending on whether your .xsession is a /bin/sh or /bin/csh script.  Look at the first line to find out.

     At the end (after the invocation of the window manager), put

     kill $SSH_AGENT_PID.

     Your .xsession may then look like:

            #! /bin/sh
            . /etc/env.default

            eval `ssh-agent -s`                # ADDITION
            ssh-add < /dev/null                # ADDITION

            xrdb $HOME/.Xresources
            ...
            xterm -ls -T `hostname` -n `hostname` -geo 80x50+105+5 &
            twm

            kill $SSH_AGENT_PID                # ADDITION

 5. [OPTIONAL]  Create a file

            ~/.ssh/config

     containing

            Host *.nersc.gov
            User u12345

     where u12345 is your NERSC user name.  (This step means that you won't have to supply a -l u12345 argument to ssh.)  If you want to use compression on certain connections, this can be configured here too.

ONCE PER X SESSION

When you start an X session on your X terminal, the ssh-add command in .xsession will pop up a window for you to enter your pass phrase.

TYPICAL INVOCATIONS

 1. To get a window on a.nersc.gov, do

              xssh -auth ssh a.nersc.gov

     xssh is a ssh-capable replacement for xrsh.  You will need to ensure that your PATH on a.nersc.gov is set in .cshrc and that it included the directory with xterm lives.  For that reason, I suggest you move

            if ( -e /etc/cshrc.nersc ) then
                    source /etc/cshrc.nersc
            endif

     from ~/.login to the end of ~/.cshrc.

     On a.nersc.gov, if you do

            echo $DISPLAY

     you will see it set to something like a:4.0.  This is a special display setting used by ssh for encrypting your X traffic.  Incidentally the encryption is only in effect between NERSC and the machine you ran xssh on. The traffic between this machine and your X terminal is still unencrypted.

 2. To start a window on another machine in the Unix Cluster with your AFS tokens carried over:

            xssh lupus

     With this invocation, the X traffic is not encrypted.  You may wish to insert these xssh commands into your .twmrc as follows

            menu "Programs"
            {
            "Machines"      f.title
            ...
            "draco"         !"xssh draco"
            "a.nersc.gov"   !"xssh -auth ssh a.nersc.gov"
            ...
            }

 3. Accessing the Unix Cluster from off-site.  This requires installation of ssh on the remote machine.  You should ask the system administrator for that machine to do this.  In addition, if your site has AFS, ask for the AFS patches to ssh to be made.  The main site for ssh is

     http://www.cs.hut.fi/ssh

     The AFS patches are available at

     http://www-personal.umich.edu/~dugsong/ssh-afs-kerberos.html

     [In fact, most of the functionality of ssh is available even if it's not installed by a system administrator.]

     If you have a Linux x86 machine, you can install a pre-compiled version with

            rpm --install ftp://ftp.pcuf.fi/linux/security/ssh-1.2.20-2.i386.rpm

Direct Login and Xdm
--------------------

Direct login refers to the short process of either logging in via the workstation console of one of the computers (i.e. Carl in room T145) or inevitably one of the intermediate steps in logging in via any other method (unless you have .rhosts or .netrc set up---more on that later). At some point, you will see a login window in the center of the screen.  Simply enter in your username, press RET, type in your password, and press RET again:

             Username: USERNAME
             Password:

Note that, while your username is echoed on the screen as you type, your password is not. This helps keep your password secure; however, if you have fumble-fingers, the computer may reject your password and you will have to go through the entire process again. To log out, you may simply type logout (on VAX and UNIX systems), exit (UNIX only), or CTL-d (UNIX) at the prompt. Note that xdm is slightly different.

The X Display Manager is a program used to log into the Unix Cluster from an X terminal..  (Be sure to see Windows? for more detailed information on the X-Window system.) The xdm displays a menu on your screen that gives you a choice of machines (i.e. Suntsu, Carl, Lyman) to connect to. Double click with the mouse button on the one you want, and a screen will pop up with a Login: and Password: prompt. Logging out of individual xdm windows are the same as direct login logout; to end the entire session, you must press ALT-SFT-CTL-RET or drag down the center mouse button to Other...... and select Exit XWindows.

Note---the xdm runs a file in your home directory known as .xsession to set up the windows and initial clients. However, if you have an error in your file, you may never get logged in properly to correct it. If this happens, type the F1 key instead of RET after your password. Then the xdm skips your .xsession and runs a default version which puts up only one window. Then you can proceed to correct the problem. (see Starting X, and see Customizing X, for more information about initialization files.)

xrsh and the Display Variable
-----------------------------

When you have already logged into X-Windows, the easiest way to bring up a window to another machine is to drag down the first mouse button and select among the hosts available through your Machines menu (this assumes that your window manager has been configured to do this--- see Customizing X). Another way to accomplish the same task is to simply type xrsh at the prompt, followed after a space by the name of your intended host:

             [lyman|2] xrsh suntsu

What this actually does is run the command xrsh, where the absence of a command following the host name implies the default command xterm, allowing you to open up a window on your selected host. xrsh is simply rsh with some X features built-in. This (with the exception of the Crays) allows you to bypass the normal login procedures and use that computer's facilities with a window at your location (thus actually running the X client on the remote computer). By not incurring the default, you can run commands on remote computers without logging in.

Note---The xrsh method assumes that your ~/.cshrc file on the remote computer contains /usr/X11R6/bin in your PATH. See .login Profile and .cshrc for more information.

One of the most important features about the xrsh command is that it automatically sends along your display environment variable to the remote host when it opens the new window, telling the remote computer where to send the client's output. The command xvms also does this. (see X Clients under VMS.) Displays are called something like lyman:0.0, thx40:0.0, and thx1.pppl.gov:0.0, where the longer form is needed when running a client on a non-PPPL machine. To see what your display is (on UNIX systems), type echo $DISPLAY.

telnet and rlogin
-----------------

If you are already logged into one machine, and/or you are on an X-terminal and your desired host isn't among the menu of choices, there is the option of using either the command telnet or the command for a Remote Login, rlogin.  All of the computers here at the laboratory are connected together via a network, which allows fairly free interchange between systems. For example, suppose our user karney was already logged into Suntsu and now wishes to log onto HAX. He could type and see:

             [lyman|3] telnet hax
             Trying 192.55.106.13...
             Connected to hax.
             Escape character is '^]'.
             Username: karney
             Password:
                         VAX/VMS V5.5-2
       **************************************************************
       *  Warning:  Unauthorized access to this computer system is  *
       *  prohibited.  Violators are subject to criminal and civil  *
       *  penalties.                                                *
       **************************************************************
     Last interactive login on Friday,  9-JUL-1993 11:06
     HAX$

If we had used the command rlogin, the result would have been the same. The only difference between the two commands is that the first is used mostly when dealing with large-scale networks, while rlogin assumes more of a localized cluster of computers and takes advantage of a (presumed to be existing) ~/.rhosts file on the target computer. This file includes a computer name and username on that computer (i.e. your username on HAX may be different from that on the UNIX machines), allowing that user to log in and bypass the normal login procedures. The nice thing about this system is that you only have to give your password once (when you log onto your X terminal).

A file similar to the /.rhosts file is the .netrc file, which holds ftp remote login data. See FTP and Anonymous FTP, and man netrc for more information.

On the PPPL UNIX machines, a useful shorthand version of rlogin is to simply type the name of your intended host:

             [lyman|4] suntsu

Again, as in the case with xrsh, the absence of a command after the host name implies a default command. Here the default is rlogin, allowing you to log in to that computer. In addition, this process requires that /usr/hosts be in your PATH in ~/.cshrc. After logging out (same process as with direct login), the prompt returns to that of your original login computer.

Macs
----

All the Macintoshes in the Theory division, and most of the Macs everywhere else, are connected to the Internet via the LocalTalk cables. For those Macs that don't have VersaTerm, an implementation of Telnet by NCSA is available on the File Server Disk (for Macs without hard disks) and on the hard disk itself. In order to connect to a computer, double-click on the NCSA-Telnet-2.5 Folder icon and then double-click on your desired host. After a while (depending on whether you're working from the hard disk or a File Server) a window will appear with the host's login: prompt.

NCSA Telnet is a combined terminal emulator (VT100 and Tektronics) and a telnet client. With it, you can also connect to several computers at once, and have the output displayed on separate windows, one on top of the other (depending on the Mac's available memory). Simply drag down the File menu once you have already connected to your first host, and click on Open Connection.... On the window that appears, type in HOSTNAME.LOCATION (i.e. lyman.pppl.gov, a.nersc.gov, etc.) in the Session Name box and type a title for the new window in the Window Name box. Click OK and a new window should appear on top of the old one with the new host's login: prompt. To switch windows, drag down the Connections menu and check the window you wish to switch to. When you log out from a machine, the corresponding window should automatically disappear.

Dial-Up
-------

In this section, we will give a brief outline of dialup login procedures using the VersaTerm program on the Macintosh as an example. Assuming that you have a modem at home (and therefore know how to use one), the simple steps have been left out, leaving only the essentials of VersaTerm. Remember that many procedural steps (outside of terminal server phone numbers) should be translated into its counterpart on your system.

From a Mac, modem logins will be made using the Mac's VersaTerm program. Once you have entered the VersaTerm application, drag down the Edit menu and select Edit Phone. On the right of the window that opens up, check to make sure your modem type is listed.  If not, enter on one of the lines the letters ppl-BAUD LEVEL-MODEM BRAND. On the left half of the window, on the line corresponding to that of your modem, type your string followed by the terminal server number 2432925. For example, for the Courier and the new Zoom modems, the entry would be atdt2432925. For Concord modems, type ^M^M\PDM2432925.  The phone numbers you need to use for dialing into PPPL are:

     609 243 2925 -- PPPL modems
     609 258 2530 -- Princeton University low speed (2400 baud) access
     609 258 2710 -- Princeton University high speed (9600 baud and up) access
     1-800-636-3772 (1-800-63-NERSC) -- Nersc toll-free access (not available after
                                        5/1/95)

PPPL modems
...........

Once those options are set, close the Edit Phone window and check that the options on the other menus are set to desired values (i.e. 2400 baud, 8 data bits, no parity, 1.0 stop bits for both Courier and Concord). Very importantly, make sure the DEC VT100 under the Emulation menu is checked. To begin dialing, select your modem type in the Phone menu and wait.  Once the connection has been established (on Concords, the word Initiating appears), press RET every few seconds until Princeton Plasma Physics Lab., etc. appears.  And then you will be asked to give username and password.  The password here is only for the pppl dial-up service.  You can select a password and register it with our Help-Desk at 2275.  For security reasons, please do not use your computer password here.  The following is what you may see on the screen during the dial-up process:

             CDS> AUTODIAL
             CDS> DM2925
             CDS> NUMBER = M2925
                  AUTO-DIALING..
                  DIAL TONE
                  DIALING M2925.....s
                  RINGING
                  ANSWER TONE
                  INITIATING
             RET
             RET
             RET
                 Princeton Plasma Physics Lab.
                 Authorized User Only.
                 Username:  smith
                 Password:  XXXXX
                 PPPL Connection successful, pause 4 sec., press return
             Local> set port flow disable
             Local> telnet suntsu

At the prompt, type in set port flow disable. This allows your commands (which may have some special meaning to the terminal server) to be sent to the remote host as normal commands. (i.e.---If you are running Emacs on Lyman from home, you want to be able to use the search function, CTL-s, without it telling the server to stop the flow of information.) From then on, follow the procedures for a telnet login. To logout, just type logout both at the host prompt and the Local> prompt.

NERSC modems
............

NERSC has a toll free dial-up server number, 1-800-636-3772 (800-63-NERSC).  Using the same procedure described above, you can connect to the NERSC dial-up server.  Once you connect to the server, you will be prompted for a user name and password.  Use nersc for the user name and computing for the password. This will give you telnet access to the NERSC computers only.  (You can then run telnet from one of the Crays to access other computers.)

Preferably, you should request your own dialup username.  You can get this by sending E-mail to dialup-admin@nersc.gov.  You would then enter your NERSC username and password to the dial-up server.  This will give you telnet access to the entire internet so that you can log into the PPPL computers directly.

Princeton University modems
...........................

Tigernet gives you an alternate route to our lab computers when the PPPL modem are busy or down.  You will need to have a Phoenix account to use this facility.

The dial-up number for accessing Tigernet at 2400 baud is 258-2530.  After connecting, type comserv at the prompt for destination. After entering your name and password, a comserv prompt will appear.  At the comserv> prompt, type in telnet and the full name of the computer you want to connect to, such as suntsu.pppl.gov.

The dial-up number for accessing Tigernet via high speed modem (9600 baud and up) is 258-2710.  In order to use this service, you must first register for a Remote Access Account terminal access.  Please send the following information to remote@princeton.edu:

       Name
       CIT system (PUCC/Unix) userid
       University account number to be charged (for faculty and staff)
       Phone number (office number for faculty and staff)
       Service requested: terminal access

You get four hours per month of free connect time for the high speed (9600 baud) modem service.  After that you get charged.  So you should only use this service when the PPPL lines are unavailable.

Accessing Tigernet
==================

The two Princeton Campus network computers available to PPPL are PUCC and Phoenix, which are on Tigernet (the Princeton Campus computer network). To get an account on these computers, you need to go to the CIT building (off Prospect Street) and fill out a short form. Phoenix provides a few of our news items and other information services, and a few X clients (i.e. xwebster) are run on Phoenix and not here. PUCC allows you to get the Princeton library catalogs on-line using the same method as our PPPL library computer---check the library computer instructions for more information.

E-mail Addresses and Forwarding
===============================

This section describes e-mail address conventions and how to foward mail to a preferred mailing address.

E-Mail Addresses
----------------

All the UNIX cluster machines at PPPL use an address of the form USERNAME@pppl.gov. (@theory.pppl.gov, @carl.pppl.gov and @suntsu.pppl.gov, etc., also work, but shouldn't be used.)

All the VAXes, on the other hand, use an address of the form USERNAME@vaxmail.pppl.gov. Again, @rax.pppl.gov and@hax.pppl.gov also work but shouldn't normally be used.

The official PPPL forwarding machine is pppl.gov, which should be added as a suffix to every e-mail address to PPPL sent from off-campus. Usually, an address of simply USERNAME@pppl.gov is enough for the fowarding machine to find the addressee. Aliases for this machine include ppl.pppl.gov, pppl.pppl.gov, and pobox.pppl.gov.

Within PPPL, the extension .pppl.gov is optional. Thus, karney@vaxmail, and karney@ppl are sufficient. On the UNIX cluster machines .pppl.gov is also optional.

Finally, if you would like to mail off-campus, more information about Internet naming systems can be found in Section 7.4 [Internet Domain Name System] of the report, Data Communications and Networking at PPPL (by Jim Snyder). To find out more about sending and reading mail, see User to User Communication.

Fowarding Mail
--------------

At some point in time, you may want to set up a forwarding address so that all your mail is sent to your most frequently used computer. This will relieve you of the hassle of having to log on to each computer system on which you have an account simply to read your mail.

If you want to read your mail on one of the Unix Cluster, you need to get all your mail forwarded there. Contact the postmaster@pppl.gov (Lena Scimeca) and ask her to enter a forwarding address of USERNAME@pppl.gov on the VAXes. This will tell the system to send all your mail to your Sun mailbox.

To forward mail to the VAXes, simply create a /usr/mail/.forward/<username> file on the Suns containing USERNAME@vaxmail.

To check your forwarding address, use finger USERNAME@ppl---the computer will expand and display your preferred address.

Reading News Using rn
=====================

rn is an interactive news read program. To read news simply type rn at the UNIX prompt.  If no newsgroups are specified, all the newsgroups which has unread news are displayed, and then the user is asked for each one whether he wants to read.

rn operates on three levels: the newsgroup selection level, the article  selection  level, and the paging level.  Each level has its own set of commands, and its  own  help  menu.  At the paging level (the bottom level), rn behaves much like the more program.  At the article  selection level,  you may specify which article you want next, or read them in the default order.  At the newsgroup selection level (the top level), you may specify which  newsgroup  you want  next, or read them in the default order.

There are many commands in each level of rn.  However, with a few simple commands like n, p, ?pattern, =, SPC and q, you can browse through the newsgroups easily.  For more information, read the man pages of rn.

Another way to read news is using Emacs.  We will describe it in the chapter on GNU Emacs.

The X Window System
*******************

This chapter describes the X Windows System, how to run it, and several of the most useful clients and utilities. Much of the information presented here was taken from the X Window System User's Guide by Valerie Quercia and Tim O-Reilly, An Introduction to the X Window System by Robert Lupton, and X Windows by Charles Karney.

Windows?
========

The X Window System is the windowing system first developed at MIT and currently in use on the X-terms and many of the other terminals here at PPPL. The term window refers to a defined working area that is graphically displayed as a window on the screen, often terminals can hold many windows at a time.  However, X-Windows holds three primary advantages over other windowing systems in that it's free (always an advantage), it's supported by most major computer vendors (IBM, Sun, DEC, Cray, etc.), and probably most importantly, it's a network window system.

With the X Window System, each window displayed on the screen can be running a separate process---either all on the same computer or on different computers. For example, on one X-term, you could be typing a letter in an Emacs window while you wait for the output of a compiling program (being executed on Lyman) on another window, and yet a third window is monitoring the output on a program running on HAX. As you can see, this makes for a very versatile and efficient system. The windowing system used on Macs cannot run several processes at once, although it can display several windows at a time. Another nice feature is that text can be cut and pasted from one window to another (see Special Buttons).

X-Windows
=========

This section describes X's anatomy, how to start X manually if xdm is unavailable, and mouse button commands for X.

X's Anatomy
-----------

The architecture of the X Window System is based on what's known as the client-server model. X consists of three parts:

 1. X Display Server - a program that keeps track of all input coming from input devices (such as the keyboard and mouse), input from any other clients that are running, and provides display capabilities. As the server receives information from a client, it updates the appropriate window on your screen. The display server keeps track of the hardware, may run on the same computer as a client or on an entirely different machine, and is the only part of X that must be machine-specific.

 2. Clients - application programs that perform specific tasks. These tasks can include keeping track of incoming mail (xbiff), terminal emulation (xterm), and even providing an on-line manual for X (xman). Very importantly, since clients need not be machine-specific (only the server interacts directly with the hardware), they can be ported easily from system to system.

 3. Window Manager - a program that handles negotiations between the different clients as they fight for screen space, colors, and sunlight. The window manager used at PPPL is twm, which is shipped with the standard release of X from MIT. It's the window manager that controls the moving of windows, converting windows to icons and back, and a large variety of other tasks. When you start up X-Windows, a file in your home directory known as ~/.twmrc (see Customizing X.) will be read to set up the look-and-feel of your screen.

Starting X
----------

Depending on whether or not your particular system is using Xdm (see Direct Login and Xdm, you may or may not need to start X manually. Manual start-ups are rare, which is why it will be included in this section instead of the section on logging directly into X-Windows.

For a manual start up, log in to the console directly, then type in xinit (open xinit on the Guido console).  This runs the script .xinitrc which sets the default values for your initial windows. If the script file is missing, you'll just get an xterm window and you'll have to start twm manually by typing in twm & at the prompt (a titlebar will appear above the window).

Normally, there are four text files in your home directory ~ that contain all the information needed for xdm to start an X-Windows session. They are:

  * .xsession - a file run by xdm to start your initial windows. The file .xinitrc is the manual start-up counterpart.

  * .Xresources - a list of preferences for fonts, colors, window sizes, etc. (Used by all X clients.)

  * .twmrc - an initialization file for the window manager, twm. This is where you can specify what options will be on the Machines menu, etc.

You should already have these files in your home directory---if not, you can easily copy them from the /u/default file area.

Special Buttons
---------------

Most of the windows on the screen will have a titlebar that has six regions: a square with a solid circle in it at far left, a square containing dashed lines, a name for the window, an area that fills in when the cursor arrow is within the window, a square containing a star, and finally a square containing smaller squares at far right. Click on the far left box to turn the window into an icon (click on the icon to get it back), clicking the second square produces a window menu (for zooming in, refreshing the window, etc.), clicking the square with the star brings that window to the top of the screen (if you have many windows stacked on top of each other), and the far right window resizes the window (a set of lines dividing the box into 9 boxes will appear---hold down the first mouse key, move the outline to a desired size, and release the key---the window will be resized).

The cut-and-paste feature of X-Windows is used for copying or cutting text from one window and pasting it onto another. To copy text from a regular xterm window, simply highlight the text by clicking the first mouse button at the beginning of the section and dragging it until the end. To copy from an Emacs window, click at the beginning of the section with the first button and at the end with the third button. To paste the last copied text, simply move the cursor into your desired window and click the second button---your last selected text will be pasted at the position of the cursor.

The table below gives a list of default commands defined in the .twmrc file for the mouse and some special buttons. Mouse buttons are numbered left to right by default, but this can be reversed in your .twmrc. The modifier will either be unused or be the key META (which usually is ALT or ESC, depending on your keyboard set-up). Where is the location where the command works, where the root window is the background behind any window.

     Button  Modifier  Where         Action
     _____________________________________________________________
     First    None     Root          Opens the Machines menu
     Second   None     Root          Opens the Window Opls menu
     Second   None     Root          Opens the TWM Windows menu
     Second   Meta     Window        Iconise (close) the window
     Second   Meta     Icon          Un-iconise (open) the window
     First    Meta     Window/Icon   Move the window
     First             TitleBar      Move the Window
     Second            TitleBar      Raise/Lower the window
     Third             TitleBar      Cycle all windows up one
     First    Meta     Window/Icon   Bring window to the front
     Third    CTL      Window        Opens the VT Fonts size menu

Important X Clients
===================

This section describes some of the most useful X clients available on the VAXes.

X Clients
---------

Many more clients exist than would be possible to document in this text, ranging from games to terminal emulators to such well-loved masterpieces as sendmail. Some programs, such as Emacs, are not fully-fledged X applications, but make use of some X features, such as moving the cursor with the mouse. Some of the most important and most useful X clients are:

  * xterm - a VT100 and Tektronix terminal emulator

  * Emacs - an editor (see GNU Emacs, for more in-depth info...)

  * xnetload - strip chart showing workload on various workstations

  * xbiff - mail notification, announces new mail

  * xclock - analog or digital clock display on root window

  * xdvi - allows a pre-print preview of files produced by TeX

  * xman - on-line X Window System manual browser

  * xcalc - on-line scientific calculator

  * xhost - control access to your screen from other machines

  * info - read info files (documentation for many programs such as Emacs, etc.)

  * ghostview - PostScript previewer

  * xdbx - X interface to dbx

Most of these clients are described more fully in the X Window System User's Guide.

X Clients under VMS
-------------------

From one of the Suns, the quick way of getting a separate window into one of the VAXes is to type, for example, xvms hax. You'll need Lena Scimeca to set up proxy access for you on the VAX cluster for xvms to work. Eventually this will pop up a window to HAX---you won't have to give your username or password and when you start up additional X clients, they'll already know where to display. Another method is to type xrlogin hax & at the UNIX prompt, and then something like

        HAX$ set display/create/node=thx40/transp=tcpip

to tell HAX where to display its output (in this case terminal thx40).

There are relatively few X clients available to the VAXes; those important few being emacs, xterm, xdvi, and a clock. There is also term, a DEC window. However, running just about any client on the VAXes tends to be painfully slow. The procedures for starting the clients are as follows:

  - To get into Emacs, type setup emacs at the first VAX prompt and then emacs at the next prompt. This automatically runs Emacs in the background.

  - To open up an xterm in the background, type setup xterm and then spawn/nowait/input=nl: xterm.

  - To xdvi a file, type setup tex and xdvi FILENAME.dvi.

  - To run a clock in the background, type clock:==$decw$clock and then spawn/nowait/input=nl: clock.

Other Utilities
===============

As with the X clients, there are far too many utilities available than can be described here. Here is a list of the most commonly used utilities:

  * xrsh - runs a remote X client

  * xmag - magnifying glass

  * xev - event tester

  * xhost, xauth - access control programs

  * Xauth - exports access code to remote hosts

  * xfd/xselfont - displays font samples

  * xlsfonts - lists fonts

  * xmodmap - changes up keyboard mapping

  * xdpyinfo - gives information about the current server

  * xwd - dumps window image

  * xwud - displays window image from dump

  * xrdb - loads resources into the X server

  * xsetroot - sets root color and cursor type

  * xcolor - shows available colors

Most of these utilities are also described more fully in the X Window System User's Guide.

Customizing X
=============

Now that you're feeling more comfortable with X, there are four text files in your home directory that you can modify to customize your environment (see Starting X). The two that will be briefly discussed here are .xsession and .twmrc, both of which are initialization files. Any changes to these files will show up the next time you log on or if you run the Re-read .twmrc option in your Window Opsl menu (assuming it's set up).

The .xsession file starts your initial windows. Listed in the file will be such things as which clients (such as xclock and xbiff), will automatically be started with your X-Windows session. This file can be edited by bringing up ~/.xsession in Emacs. The commands used will be the same as those used in your .twmrc file.

Your twm initialization file can be edited by bringing up the file ~/.twmrc. The file will be divided into sections, each dealing with such specific details as the geometry and colors of your xterm windows, the settings for the mouse button commands (see Special Buttons), which clients, icons, and icon managers will be shown, and what programs will be listed in your mouse button menus. (For more complete information about the commands and syntax used in the file, see Reference Pages (X Window System User's Guide).) Some of the more useful X programs (such as xnetload) can be found in the directory /usr/X11R6/bin.

X Window Security
=================

You may not know that anyone with access to Internet anywhere on the world can peek at your X Window screen with a few UNIX commands at their finger tips.  Giving others unlimited access to our display leaves a lot of potential for serious damage.  Therefore, it is necessary to have access control on our X servers.

In this section, we will introduce Host-based access control, User-based access control and other schemes to secure our X server.

Host-Base Access Control
------------------------

Host-base access control only allows clients from authorized hosts to have access to your display.  Command xhost adds or deletes host names to the list allowed to make connections to your X server.

     xhost -

restricts clients from other hosts to connect to your X server. To add a host, ccf.pppl.gov, to your authorized host list, type:

     xhost ccf.pppl.gov

On the Unix Cluster SUNs, it is not necessary to include each host in the authorized host list because the home directory including ~/.Xauthority is shared on the UNIX cluster. To check the status of Host-based acess control, type:

     xhost

If you see

     access control disabled, clients can connect from any host

on the screen, your X terminal is not secured.  You can put

     xhost - > /dev/null
     xhost a.nersc.gov ccf.pppl.gov ...

in your .xsession file to enable the access control and add authorized hosts automatically when you start an X session.  No one should have xhost + in their .xsession file.

The major drawback of Host-base access control is that all users on your authorized hosts have access to you X server.

User-Based Access Control
-------------------------

User-based access control is more restricted than the Host-based access control.  Only authorized users from other hosts can connect to your X server.  When you start an X session through the normal procedure, a machine-readable code is generated and stored in .Xauthority in your home directory.  This authority code is like a key to the user's host and the server.  A client from other hosts must present this code to connect to your X server.  Suppose you start an X session on carl.pppl.gov and turn on the Host-based access control using xhost -. You will not be able to run a client on f.nersc.gov before exporting the authority code from carl.pppl.gov to f.nersc.gov.

On Unix Cluster, the command to export the authority code to other target hosts is Xauth.  Xauth runs xauth on the target host.  Therefore, xauth must be in the PATH on that host. This is usually achieved by including /usr/X11R6/bin (or perhaps /usr/bin/X11) in PATH in ~/.cshrc.

To export the authority code from carl.pppl.gov to Cray UNIX machines like f.nersc.gov, on carl type:

Xauth -l Cray-user-name f.nersc.gov

A pPassword to f.nersc.gov is required.  If you have a .netrc file which contains 'machine f.nersc.gov login Cray-user-name password Cray-password' on carl.pppl.gov, no password is needed.

To export the authority code from carl.pppl.gov to other UNIX machines like ccf.pppl.gov, on carl type:

Xauth -l ccf-user-name ccf.pppl.gov

Password to ccf.pppl.gov is required.  If you have a .rhosts file which contains 'carl.pppl.gov carl-user-name' on ccf.pppl.gov, no password is needed. You can compare the authority code with command 'xauth list' on all machines.

With correct settings in the .rhosts file on the target host or .netrc file on the local host, you can put command lines

     xhost - > /dev/null
     Xauth f.nersc.gov a.netsc.gov ccf etc.

in your .xsession file to transfer the authority code to other hosts automatically at the beginning of an X session.

Other Security Tips
-------------------

The other element of security with X terminals is restricting access to the X terminal itself.  Key points.

  * Log out when you go home at night.

  * Use xlock when away from your office.  You can do this with a menu entry such as

          "Lock"      !"xlock -remote -mode pyro -nice 1 -delay 100000 &"

     in .twmrc.

  * Use xautolock to lock the screen.  With a command line like

          xautolock -locker 'xlock -remote -mode blank' &

     in your .xsession.  When no activity is performed within 10 minutes, the screen is automatically locked.  The screen is blanked and a changing pattern is put on the screen.  If a key or a mouse button is pressed, then the user is prompted for the password. After entering the correct password, the screen is unlocked and the X sever is restored.

  * Use Secure Keyboard to type password.  Secure Keyboard is an option of the xterm client.  You can enable it by holding down the CTRL key while pressing the first mouse button and dragging to Secure Keyboard. It prevents others from monitoring your key strokes. The xterm window should change color if the Secure Keyboard is enabled.

For more information, please read xauth, xhost, Xauth and Xsecurity manual pages.

UNIX
****

This chapter describes the UNIX system (currently in use on the Suns, and NERSC), useful commands, and shells. Much of the information in this chapter was taken from Introducing the UNIX System by Henry McGilton and Rachel Morgan, An Introduction to UNIX by Robert Lupton, and UNIX by Charles Karney.

The UNIX System
===============

The UNIX operating system was developed by the Computing Science Research Group at Bell Laboratories in New Jersey. An operating system is basically a supervisory program responsible for managing hardware resources, accessing files, and interacting with users. UNIX is interactive (it allows for input commands, executes them, and displays appropriate responses, etc.), multi-tasking (it can run several processes at the same time), and is a multi-user operating system (it can attend to more than one user at a time---a natural consequence of the multi-tasking feature). For a more complete description of the UNIX system for new users than can be described here, refer to Introducing the UNIX System and the appropriate man pages..

Organization
============

The UNIX system is composed of three major parts:

The Kernel
     Manages the resources of whatever computer system it lives on---to keep track of disks, tapes, printers, terminals, communication lines, and any other devices.

The File System
     Organizing structure for data. Perhaps the most important part of UNIX, the file system is a repository for data and provides the means of organizing the layout of data storage through a directory structure.

The Shell
     Command interpreter. Although the shell is just a utility program and not properly part of the system, it is the part that the user sees. The Shell listens to your terminal and translates your requests into actions.

Useful Commands
===============

This section describes the UNIX command format and some of the most useful commands for working with files, directories, compiling, printing, piping/redirecting, and processes.

UNIX Command Format
-------------------

UNIX system commands are words that may be followed by any combination of options (a - followed by a letter), an expression, and/or filenames. Options modify the action of the command in some way, or tell the command exactly how to operate. The filename is the name of the file which the command is to modify in some way. Expressions describe a character string which is used as input to the command. In the example,

             [lyman|5] rm -fr johnny.b good.news

rm is the command to be executed on the two files johnny.b, and good.news with the two options f and r. Generally the order of the arguments following the commands is command OPTIONS EXPRESSION FILENAME(S), but be sure to see man COMMAND for more information about each specific command and available command options.

File System
-----------

The UNIX system knows about three kinds of files, namely, directories, ordinary files, and special files. The UNIX file system is a hierarchical directory structure (tree-structure) starting at the root, called /. The levels on the tree are also separated by a /---the leaves are ordinary files and nodes which are not leaves are files known as directories.

Each directory always contains the two special characters . and .., which are pointers to itself and its parent, respectively. Thus, /usr/man/man1/./tcsh is equivalent to /usr/man/man1/tcsh and /usr/man/man1/../cat/tcsh is the same as /usr/man/cat/tcsh. This brings up the idea of absolute and relative pathnames: a directory or file specified without a preceding ~ or / will be sought for relative to the current directory; any other specification will be sought for under /, the system root.

File and directory names can be made up of any characters. To avoid conflict with shell, however, you should stick with the characters A-Z, a-z, 0-9, . , _ , and -. Upper and lower case letters are distinct. The following is a listing of some of the most useful commands used for working with files:

  * cat - prints the contents of a file on the screen (by default). Useful concurrent commands include head and tail (prints default first and last 10 lines, respectively).

  * more - presents the contents of a file a page at a time on the screen. Pressing SPC will allow you to scroll through the display.

  * rm - remove a file or many files.

  * mv - move a file from one place to another.

  * cp - copy a file or a number of files.

Directories
-----------

When you log in, you are automatically placed in your home directory (which is referred to as ~ or $HOME). The following are some of the most useful directory commands and their uses:

  * pwd - Print Working Directory, displays the current working directory on the screen.

  * cd - change directories. Typing cd by itself is an easy way to get back to your home directory.

  * ls - lists the contents of a directory. Useful options are l (long listing) and a (lists dot files---hidden files such as /.rhosts).

  * mkdir - create a new directory. If the new name doesn't start with a /, it is taken relative to the current directory.

  * rmdir - deletes an empty directory. If it isn't empty, you must either delete everything in it separately or use the command rm -r.

  * ln - establishes a link between two files (especially between directories) to allow direct access of one from the other.

Compiling
---------

UNIX programmers generally use C as their main language, but Fortran seems to be the perennial favorite at the lab. UNIX compilers are also used as linkers (except on the Crays), so there is usually no need to explicitly call the loader (ld).

The general format for compiling and linking two modules is as follows (using fortran code as an example):

             [lyman|6] f77 -c file1.f
             [lyman|7] f77 -c file2.f
             [lyman|8] f77 -o outfile file1.o file2.o

The option c means compile, don't link, and the option o links and specifies the name of the executable file (in this case outfile). To execute the program, just type its name: outfile. To run the optimizer use option O, to keep debugging information use option g (except on the Crays).

The following is a listing of some of the options we have available for working with code:

  * f77 - standard UNIX fortran compiler, understands Fortran-77. Expects source code filenames to end in .f or .for.

  * cc - C compiler, expects source code filenames to end in .c.

  * gcc - GNU project C and C++ compiler (v2.4). Also requires that filenames end in .c.

  * make - maintains, updates, and regenerates related programs and files. Useful for re-compiling and re-linking after making small changes---make only updates the files that are affected. gmake is the GNU version.

  * RCS - file containing multiple revisions of text, an access list, a change log, descriptive text, and some control attributes.

  * dbx - utility for source-level debugging and execution of programs written in Sun C, C++, Fortran, Pascal, Modula-2, and ANSI C. xdbx is the X Window System interface to the dbx debugger.

Printing and Process Commands
-----------------------------

Since UNIX is a multi-tasking system, there are a number of commands used to suspend and restart jobs, run processes in the background, and send information to a printer for output. (More detailed information about the printers can be found in Printing Options.) Listed below are some of the most useful commands for working with processes and printing:

  * ps - lists all of your current processes.

  * COMMAND & - puts a process in the background. The shell can deal with n processes at once, of which at most one is run in the foreground.

  * kill - stop a background process from continuing with kill PROCESSID. The process ID (PID) number is listed in the left column when you invoke ps. The computer may choose to ignore some kill commands (such as killing one's own shell), but kill -kill PID is a sure murder). Kill current process with CTL-c.

  * who - lists all the users who are logged on.

  * finger - find out interesting information about specific users. You can also finger people off-campus, provided you know their computer addresses.

  * lookup - find room and phone numbers of Princeton staff and students through the on-line campus phone book.

  * lpr - type lpr FILENAME to send the file to a printer queue for printing. Use the option d to print a DVI file.

  * lpq - lists the jobs that are currently on the queue.

  * lprm - remove a job from the queue by typing lprm JOB# (the job number is given by the lpq command). lprm will not work for any of the Suns except Lyman. Contact the super-user (Charles Karney) with any problems.

Other Useful UNIX Commands
--------------------------

  * gsh - global shells can run clients on many hosts

  * which - locate a command; display its pathname or alias

  * locate - lists files in databases that match a pattern on Unix cluster computers

  * llocate - find files that match a pattern on local host

  * labphone - Plasma Physics Laboratory on-line phone book

  * homeaddr - Plasma Physics Laboratory home address book

  * ph - Princeton University on-line phone book

Redirection and Piping
----------------------

Many programs accept input from the keyboard/mouse and provide output to the terminal---also known as standard input and ouput. The shell also allows you to redefine your input and ouput with the symbols > (output to) and < (input from). With general commands, the lack of these symbols incur standard I/O as a default. For even more flexibility, the symbol | (known as a pipe) allows you to channel the output of one process directly into another process as input.

Some examples of redirection:

             mail karney < message.tmp
             lpr -r < junk.txt
             ls -l > listing.txt

Some examples of piping:

             dviselect example.dvi 2-3| lpr -d
             cat data.txt | more
             ls -l /test | grep texi

Remember that these symbols can be combined together, and that pipelines can be chained together without limit. All commands in pipes are run simultaneously, in other words, UNIX process creation is cheap!!

About Shells
============

This section describes two of the special features of shells: .login/.cshrc and wild-card characters.

.login Profile and .cshrc
-------------------------

As you probably remember from the first section, the outermost layer in the UNIX structure is the Shell, or command interpreter. The Shell, however, is simply a program called upon to interpret the commands users type, and as such, there are many different versions of the Shell. The two most widely used shells are the Bourne Shell (sh) and the C-Shell (csh). The shell that you will probably be using is tcsh, an improved version of the older csh (Use the ps command to determine which shell you are using). You can easily switch shells by typing in the name of the desired shell at the prompt (provided that your PATH has been suitably configured).

Besides several cosmetic changes, tcsh offers two important new features:

  * Emacs-style command line editing. CTL-p and the up-arrow key recalls the previous command, the left and right-arrow keys allow cursor movement within the line, etc.

  * File name and command name completion. Type TAB and tcsh will complete the command or file name as much as possible, making it much quicker to enter long names.

The Shell runs automatically when you log on, and provides you with the capability to design your own commands and customize your environment.

When you log in, your shell will execute a startup file known as .login. This file will contain specific commands that you would always want to execute at the beginning of each login session (such as checking for new messages). The .login file that the new user gets looks like this:

             [lyman|9] cat .login
             tset -I
             if ( $?DISPLAY ) then
               cat /etc/motd
             endif
             rn -c

To have the date and time echoed at login, just insert the command date; to set certain characters to special meanings use command stty (i.e. stty erase '^H' kill '^U').

Your .cshrc is another initialization file that contains directions that you want to be done for every shell (such as setting up aliases for your favorite commands). The typical .cshrc file is:

             [lyman|10] cat .cshrc
             setenv EDITOR emacs
             setenv PATH .:$HOME/bin:/usr/lang:/usr/ucb:/bin:/usr/bin:
             /usr/local/bin:/usr/X11R6/bin:/usr/hosts:/usr/games
             setenv MANPATH /usr/lang/man:/usr/man:/usr/local/man
             setenv TEXINPUTS .:$HOME/tex:/usr/local/lib/tex/inputs//
             setenv HOST `hostname`
             set history = 40
             set ignoreeof noclobber notify filec
             if ( `basename $shell` == csh ) then
                     set prompt = "[$HOST|\!] "
             else
                     set prompt = "[%M|%h] "
             endif
             unset autologout
             umask 022

The PATH setting above is very important since it tells the shell where to look for the programs that you enter as executable commands. Note that the current directory . is searched first, followed by your home ~/bin, and finally various system directories. To set an alias such as having bye mean logout, simply insert alias bye 'logout' in the file.

Wild-Card Characters
--------------------

The shell also facilitates the ease in working with files through filename expansion---matching filenames with wild-card characters or meta characters:

  * * matches any character string (sequence of characters)

  * ? matches any single character

  * [A-Z] matches a range of upper-case characters, etc.

Note that the shell does the expansion, not the program (unlike VMS). Thus, a command like cd foo* is perfectly O.K. as long as you have only one file beginning with foo, but cp *.c *.c .bak probably won't do what you want. After performing the expansion, the shell locates the command you want using the current PATH (see .login Profile and .cshrc) and runs it passing the blank-delimited command-line arguments as arguments to the program. Control returns to the shell when the program finishes running.

GNU Emacs
*********

This chapter describes the Emacs editor and the special features of Emacs. Much of the information in this chapter was taken from the GNU Emacs Manual by Richard Stallman.

The Emacs Editor
================

The best editor to use is GNU Emacs, an advanced, self-documenting, customizable, extensible, real-time display editor. With Emacs, you can edit several files simultaneously, open multiple windows on the same document, define keyboard macros, and undo mistakes. Emacs automatically indents programs in languages like Lisp and C, supports facilities for reading and writing mail, and creates back-up files. It is also quite easy to learn, and is available on the VAX cluster as well as all the UNIX workstations. An on-line tutorial is available with CTL-h t in Emacs. There are also several copies of the GNU Emacs Manual floating around the Theory Division.

Entering and Leaving Emacs
==========================

The usual way to invoke Emacs is to simply type emacs at the shell prompt (on VAX, see X Clients Under VMS). If you are running X-Windows, Emacs will also usually be listed in the Programs menu. Until the new Emacs Version 19 becomes default, the only way to access it is by typing emacs-19 at the prompt or by adding it to your X-Windows initialization files (see Customizing X).

There are two ways of exiting Emacs---suspending Emacs and killing Emacs. Suspending means stopping Emacs temporarily and returning control to the shell (same as iconising the Emacs window), allowing you to return later and resume editing on the same job.  Killing Emacs means exiting from the session entirely---invoking Emacs again will start a new editing session. To suspend Emacs, type CTL-z (or iconize the window with the mouse). To kill Emacs, type CTL-x CTL-c (exit option also available under File menu in Emacs-19).

Buffers, MiniBuffers, and the Screen
====================================

Emacs divides the screen into several areas: a text window which displays text and echoes what you type, a mode line which describes what is going on in that window, and an echo area or minibuffer window for special information and commands.

The text window displays the buffer, which is a copy of the file you wish to edit. When you make changes, the changes are only in effect in the buffer until to decide to save the changes. Emacs will then replace your original file with the contents of the buffer. The mode line near the bottom of the screen (just above the echo area) contains text that looks like ------Emacs: FILENAME. Its purpose is to indicate which buffer is being displayed, which major and minor modes are in use (to the right on the line), and whether the buffer's text has been changed.

At the bottom of the screen is the minibuffer window, which is used to display messages, error messages, and echo command arguments. When the minibuffer is in use, the terminal's cursor will move into the window. Typing RET after your command will tell Emacs to execute the command, typing CTL-g will cancel the command and exit the minibuffer.

In Emacs, there is also a menu across the top of the screen and a scroll bar along the right side of the screen. The menu contains many useful commands for editing operations like cutting and pasting, for switching buffers, exiting Emacs, and getting help. Simply click and drag down to the command you want. Clicking and dragging with the middle mouse button on the scroll bar allows you to easily peruse through text.

Characters, Keys, and Commands
==============================

This section will briefly describe several of the features available in Emacs. Specific commands will not be included here as they are easily available in the GNU Emacs Manual and the GNU Emacs Reference Card. The reference card is located in the file /usr/doc/misc/emacs-refcard.dvi on lyman---use lpr -d emacs-refcard.dvi on lyman to print it out.

Cursor Motion and Searching
     When Emacs is running, the terminal's cursor shows the location at which editing commands will take effect. Emacs also has various facilities for searching for specified text in either direction.

Setting Marks
     Many Emacs commands (such as kill-region and fill-region) operate on specified regions in the buffer. To specify text for such a command to operate on, you set the mark at either end of the region and move the cursor to the opposite end.

Killing and Deleting Text
     Emacs uses two methods of removing text from the buffer: killing text and deleting text. Killing text (also known as cutting) erases text and saves it so you can yank (also known as paste) it back later. This is the most common way of moving or copying text in Emacs. Deleting text, on the other hand, removes the text permanently.

     Emacs also has an Edit menu which allows for copying, cutting, and pasting text. You can mark the text using the mouse buttons (see Special Buttons) or by highlighting your selected text---simply click the left mouse button at the beginning of the region and drag it to the end. Then choose your desired function from the Edit menu.

Error Recovery
     Emacs also has several standard commands for recovering lost text, canceling commands, and undoing changes. Again, Emacs has many of these functions listed in the File and Edit menus for convenient use.

Handling Files
     In order to edit a file in Emacs, you must specify the particular file to be copied into an Emacs buffer. This is known as visiting the file.

     To create a new file, just visit it. Emacs will print (New File) in the echo area and you will get a blank buffer. If you make any changes and save them, the new file is created in your directory. Emacs also has an auto-save facility and creates temporary back-up files. Auto-save is implemented every 300 (by default) keystrokes and whenever it gets a fatal error (such as when you accidentally kill an Emacs job). See the GNU Emacs Manual for more detailed information regarding back-up files and auto-saving. Again, Emacs has menus that emcompasses many of these commands.

Buffers and Modes
=================

This section describes multiple buffers in Emacs and major and minor modes for editing.

Handling Multiple Buffers
-------------------------

The text you are editing in Emacs resides in an object called a buffer---any changes you make are saved in the original file only when you save the buffer. Emacs allows you to hold many buffers-in-waiting while you work on one (and only one) buffer, the selected buffer. When Emacs makes multiple windows, each window contains a buffer, but only one window can contain the cursor at a time. Most Emacs commands operate only on the selected buffer.

Emacs also has a Buffers menu which allow you to switch between buffers at the click of a mouse button.

Major and Minor Modes
---------------------

Emacs has many different major modes, each of which customizes Emacs for editing text of a particular sort. Major modes are mutually exclusive---each buffer can have only one major mode at a time. Usually Emacs determines which mode to use based on the file name or some text in the file. To explicitly select a new mode type META-x MODENAME-mode. The following is a listing of most of the major modes:

  - Fundamental - default mode for editing normal text.

  - Lisp - modes for editing Lisp code (there are four of them).

  - Fortran - mode for editing Fortran code.

  - C - mode for editing C code.

  - Texinfo - mode for editing TeX source code.

Minor modes are options which you may use to customize your editing environment. All minor modes are independent of each other and the selected major mode. As with the major modes, type META-x MODENAME-mode to toggle a minor mode. The following is a list of minor modes:

  - Auto-Fill - allows you to enter text without having to break lines explicitly. Emacs inserts newlines automatically as necessary to prevent lines from becoming too long.

  - Overwrite - causes ordinary printing characters to replace existing text instead of shoving it over. For example, if the cursor is on the b in foobar, typing a g will produce foogar, instead of the usual foogbar.

  - Abbrev - allows you to define abbreviations that automatically expand as you type them. See the GNU Emacs Manual for more detailed information.

The file ~/.emacs is another customization file located in your home directory which allows you to tailor your working environment. In it you can set default modes, associate commands with preferred keys, and other features designed to make life easier. Again, refer to the GNU Emacs Manual for more detailed information.

Other Functions of Emacs
========================

In addition to edit files, Emacs can do a lot more.  In this section, we describe how to read and post news, read manual pages and other information with Emacs.  Emacs also provides an easy way to read, write and sending mails.  The detail of Emacs mail utility is given in the chapter on User to User Communication.

Read and Post News
------------------

To invoke the news uitlity of Emacs, type M-x gnus in the Emacs window.  A list of newsgroups will appear in the text window and some instructions will be shown in the echo area.  Move the cursor to the newsgroup you wish to read and then type a space SPC.  The window will split into two parts. The upper portion contains the directory of this newsgroup and the lower portion displays the contents of the selected news item.  Again you can move the cursor and type SPC to select and read a particular news article. When you finished reading one newsgroup, type q to go back to the newsgroup window.  Type q again to quit the news reading session.

To post news, type a in the newsgroup window.  A question will appear in the echo area of the window.  Suppose you want to post a news message 'Test' in news group 'pppl.test'.  Give a y answer.

Are sure you want to post to all USENET? (y or n) y

Following this, answer few more questions in the echo area.

            Newsgroup: pppl.test RET
            Newsgroup: RET
            Distribution: pppl RET
            Subject: Test RET

An article window will open.  After entering in the news message, type C-c C-c to send out the news.  Use q to exit the session.

Read Information
----------------

For reading documentation, Emacs runs the info program.  To start info, type C-h i in the Emacs window.  An info window will open to display a list of major topics with instructions in the upper part of the window. Click on a topic with the middle button on the mouse or move the cursor to it and type (RET) to open the selected topic. Again click on the key word of interest, the information will be shown in the window.  Type d to return to the topics window.  Type q to exit info session.

Read Manual Pages
-----------------

To read manual pages using Emacs, type M-x man. In the echo area, you will be asked to supply the manual page name.  Type in a name and a RET.  the manual page will appear in the window.  Type q to exit. The advantage of reading manual pages with Emacs is that you can use the search command C-s to find the kay word in the text.

Run FTP with Emacs
------------------

With Emacs you can bring in a file from a remote host just like to find a file on the local host.  Suppose you want to get file ~u4221/test1.f from f.nersc.gov, type:

              C-x C-f
              /f.nersc.gov:~u4221/test1.f

The file will appear in the Emacs window if your .netrc has an entry somthing like:

machine f.nersc.gov login u4221 password xxxyyy

Otherwise, password is required. See FTP and Anonymous FTP, for additional information.

Working with Disks, Files and Printing
**************************************

This chapter describes the file system on the Suns and NERSC, the various disks, methods for accessing and transferring files on different machines, and printing options. Much of this information was taken from Computer Networks by Charles Karney.

Disks
=====

This section describes the file systems used on the Suns and the Crays and how to access Sun files.

The Network File System
-----------------------

Your home directory (and files) on the Suns are stored on physical disks (your home disk), referred to as /user1, /user2, etc. So that you don't have to worry about which physical disk your directory is located on, the disks are mounted---in other words, when you log in, the computer takes care of locating your home directory whether the physical disk is on Lyman, Tom, Orion, etc.

On any UNIX system, your home directory on your home disk can be referred to in any of three ways: as /u/USERNAME, as ~USERNAME, and as $HOME. If you are working in csh or tcsh (see About Shells), you can also refer to your home directory as simply ~.

If there is ever a need to find out exactly which disk is your home disk, type ypmatch USERNAME auto.home. To find out your uid/gid (NERSC group ID), type ypmatch USERNAME passwd. Your password will also appear in encrypted form.

Home, Scratch, and Temporary Disks
----------------------------------

The Unix Cluster has many storage locations for files of varying priority:

  - Home disks should be used primarily for your important files and source code. Back-ups are done nightly for home disks and kept for a few months---if ever you lose a file, there is a good chance it can be recovered if it was in your home directory. However, NO ARCHIVING is available for files. In addition, there is also a quota set on the memory available for individual use (set at a default of 5 MB, but easily changed). To store a large file indefinitely, it should either be saved in CFS (storage facility in Berkeley) or put it on tape (available for only five dollars). To find out what your quota is and how much memory is already in use, type /usr/local/bin/quota -v.

  - Scratch disks are the next level down from home disks in priority. Unlike home disks, there is no quota on how much memory alotted to each user; however, scratch disks are only backed up on a weekly basis and all contents are purged every 60 days. As with home disks, scratch disks are shared between machines, so you can access your files on a scratch disk no matter which computer you're on. Scratch disks are also referred to as /scratch1, /scratch2, etc.

  - Temporary disks are for, you guessed it, temporary files of low priority. As with scratch disks, there is no quota on memory. NO BACK-UPS are made for temporary disks, and all contents are purged every 30 days. Top-level files are purged with every new login session. An important thing to note is that the /tmp temporary disk is NOT shared between machines. The temporary disks that is shared between machines is  /gtmp.

NERSC File System and Accessing the Suns
----------------------------------------

The NERSC file system differs from that used on the Suns in that home directories on the Crays have a very small quota even though they are backed up. The Cray does provide users work disks that have no quota, but these are every thirty days. CFS should also be used for files on the Crays that you wish to save indefinately. The Crays also have /tmp disks, which is actually where the work disks are located (work disks just have their space already organized into user directories). /tmp is used for temporary system files, and all files in this directory are deleted without backup after about 48 hours. (The tmp quota is 491 Mbytes, excluding work directories. For more information, see work and /tmp under the document ezfiles command on the Crays.)

Since the Crays use UNIX, it is an easy matter to access files on the Suns. This comes in especially useful because Often the best way to take advantage of these computing facilities is to access your files on the Suns indirectly from the Crays. On these machines, your home directory is referred to by typing:

  - Crays: /nfs/pppl/theory/userN/USERNAME

The /userN simply refers to the disk number where your home directory is physically located. See The Network File System.

Accessing and Transferring Files
================================

This section describes various methods for accessing and transferring files on the Suns, the Crays, VAX, and other computers.

FTP and Anonymous FTP
---------------------

Ftp is the user interface to the ARPANET standard File Transfer Protocol (FTP). For convenience, from here on after FTP will be referred to as the main file transfer program used in Theory and PPPL. It allows two-way transfer of binary and text files between the Suns, the VAXes, and the Crays. FTP also works on the Macs under NCSA Telnet (you must run it on the remote machine), but other methods prove more convenient (see Accessing from a Mac). If the remote machine with which FTP is to communicate is specified, FTP immediately attempts to connect to the server on that host; otherwise it directly enters its command interpreter mode and displays the prompt ftp>.

The best way to learn FTP is through example, so here's what it would look like to run FTP on Lyman to copy the file intro.texi from Cray A:

        [lyman|12] ftp a.nersc.gov
        Connected to a.nersc.gov.
        220 a FTP server (Version 5.2 Fri Sep 7 14:09:58 CDT 1990) ready.
        Name (a.nersc.gov:karney): u6225
        331 Password required for u6225.
        Password:
        230 User u6225 logged in.
        ftp> get intro.texi
        200 PORT command successful.
        150 Opening ASCII mode data connection for intro.texi (3697 bytes).
        226 Transfer complete.
        local: intro.texi remote: intro.texi
        3697 bytes received in 0.042 seconds (86 Kbytes/s)
        ftp> bye
        221 Goodbye.
        [lyman|13]

The most useful commands while in the ftp> command interpreter are:

  * get - copy remote files to the local computer. mget can be used to get multiple files using one command line.

  * put - copy local files to the remote computer. mput can be used to put multiple files using one command line.

  * pwd, cd - print working directory and change directory of the remote computer.

  * lcd, lcd . - change local directory and print local directory (changes to the current directory and echoes it on the screen).

  * binary, ascii - toggles between binary and ascii transfer modes.

  * ?, help - generates a complete list of command options.

  * bye, quit - terminates the ftp session and exits to shell.

The file .netrc is very useful for transferring files because it allows the user to save time from the tedious task of having to log in and enter a password every time to run FTP. In the above example, when FTP looked in your .netrc file and found a.nersc.gov, your username, and your password, you would bypass the login procedure and save time. However, since this also forces the user to store passwords in unencrypted form in the file, using the .netrc method is strongly discouraged. If you will be using FTP very often, look into getting an NFS mount (see Accessing Files through NFS and Emacs).

Many hosts also offer a service known as anonymous FTP, which allows users without accounts on the remote machine to have limited access in retrieving (and sometimes storing) files. The convention is to type anonymous as the username and give your real username as the password. Anonymous accounts are usually restricted to FTP only---free software such as Emacs, X-Windows, and TeX are obtained this way.

RCP
---

RCP is a program very similar to FTP, also used to copy files between computers. However, RCP isn't available on as many computers as FTP and is mainly used to copy files between UNIX machines. Instead of looking in .netrc for login information, it looks in /.rhosts (just like rsh rlogin---an entry in /etc/hosts.equiv would do just as well).

RCP works just like the UNIX command cp (see File System) except that:

 1. Filenames must be prefixed with HOST: or USER@HOST:.

 2. Pathnames thus prefixed are relative to the user's home directory on the remote machine.

 3. You must be careful about the use of special characters (*, ?, etc.).

A command like rcp phoenix.princeton.edu:intro.texi /tmp/ would copy the file intro.texi from Phoenix (on main campus) to the local file /tmp/intro.texi. By switching the arguments around, i.e. rcp intro.texi phoenix.prinecton.edu:/tmp/, the file would be copied from the home directory to the remote computer's /tmp/ directory . See man rcp for more detailed information.

Accessing from a Mac
--------------------

In order to access your files on the Suns from a Macintosh without using FTP, you must first have certain directories and files set up on the Sun:

 1. Create the directory ~/mac using mkdir ~/mac.

 2. Switch to that directory using cd ~/mac.

 3. Create two subdirectories within it:

                mkdir .finderinfo
                mkdir .resource

 4. Edit the file ~/.afpvols to include ~/mac:lyman (USERNAME) (create the file using Emacs, if necessary).

Any files stored in the ~/mac directory will be accessible to both the Macs and the Suns. Note, however, that the files must be compatible with Mac applications in order for them to be of any use (i.e. PostScript files).

Once you have everything set up, it's simple to access your Sun files from the Mac:

 1. Drag down the apple menu and select Chooser.

 2. Select AppleShare.

 3. Select PPL-ENET PH2 for the AppleTalk Zone.

 4. Select Theory in the FileServer box. Click on O.K.

 5. Login to the Suns as a registered user.

 6. Close the Chooser.

You will now have access to your ~/mac files on the Suns. There should be an icon containing your username on it at the lower right---click on it and a window will open that will contain your files.  (For more information, see the man pages for Apple-UNIX FileServer, man AUFS.)

Accessing Files through NFS and Emacs
-------------------------------------

As mentioned in the Disks section (see Disks), the Network File System provides a way for disks to be mounted so that files on one workstation are easily accessible to the others. A combination of directory names and standard UNIX commands will allow you to access, copy, and transfer files between the Suns. (Accessing Disks from the Crays, for info about those machines.)

At PPPL, there is also no need to use FTP to transfer files between the Suns and the VAXs---the Suns can mount the VAX disks. The way we have this implemented, the Sun directory /n/usc/karney is the same as the VAXs karney$:[000000]. This allows access to VAXs files as if they were local files. Also, since the name spaces on the VAXs and the Suns are different, the NFS server converts the Sun filename to a form acceptable to the VAXs (i.e. the back-up file intro.tex~ becomes INTRO.TEX$9E;1). It's especially convenient to link your home directory to your VAXs directory, i.e.:

             [lyman|14] ln -s /n/vms/karney ~/vms

Now, ~/vms will refer to your VAX directory. Note---the Sun file system doesn't support version numbers. If you edit VAX files on the Sun, you will lose all but the latest version! Also, VAX mounting of user files is not provided automatically---see Lena Scimeca (Rm. A127) to make the necessary changes on the VAX side. She will also take care of any other mounting necessary.

Another option that comes in especially useful for editing remote files is to use Emacs to run FTP. If you specify visiting a file with a filename of the form /HOST:FILENAME or /USER@HOST:FILENAME, Emacs will run FTP for you.

Printing Options
================

The Theory division has three Sparc printers: sparc1 (the default when you use lpr), sparc2, and sparc3 (in the hallway outside Steve Jardin's office, Rm. A132). In addition, we are hooked up to many Apple LaserWriters around the lab. Both Sparcs and LaserWriters support anscii text, PostScript, and TeX .dvi files done with the lpr -d. The Sparcs also support troff output via lpr -t.

The current default of lpr is sparc1.  To override the default and set a personal preferred printer, type setenv PRINTER PRINTERNAME. Or, lpr -PPRINTERNAME FILENAME will execute that particular job on the chosen printer. A full list of printers, their locations, and special capabilities (laser, color, etc.) is located in the printer database in /etc/printcap (clearer information about PPPL printers can also be found in a file of the same name on Cray A, accessed via pview).

Printing some files may require the use of special commands or options:

Plain Text
     Use lpr, or, for multicolumn printing, lptops | lpr.

PostScript
     lpr

TeX .dvi Files
     lpr -d

CGM Files
     ctrans -d ps.mono FILENAME | lpr

man Files
     Use env TROFF=groff TCAT=lpr man -t -T /usr/local/lib/groff/tmac/tmac.an gzip. This needs groff installed; otherwise, get psroff running.

Multipage Output
     Use multips < FILENAME | lpr. This script has the great advantage of allowing you to print n pages per physical page.See Dvips.

User to User Communication
**************************

This chapter describes various communications utilities of UNIX and VMS, as well as the Emacs utility for reading and sending mail.

UNIX Communication
==================

UNIX provides a mail and talk service for all users. Mail is a convenient, fast, and free way to send memos and messages to other users on the networks. Talk allows visual communication by copying lines from your terminal to that of another user (and vice versa). Another lesser used utility is write, which allows you to type a complete message to another user's screen and then wait for a reply.

Using UNIX Mail
---------------

Enter the UNIX mail utility with the command mail. This will automatically load any new messages, with the last received message printed out first. After printing each message, a prompt of ? will be displayed as the computer waits for a command. To scroll through your mail, type + to go to the next message and - to go to the previous message. Typing q, x, or CTL-d will exit you from the mail command, and typing ? will print a complete list of commands for operations such as fowarding and deleting mail, etc. If you had no new messages, typing mail will prompt the response No mail for USERNAME, and return you to the system prompt.

To send mail through UNIX type mail USERNAME@HOST at the system prompt.  Enter a subject at the prompt and proceed to type your message below. To end, send the message, and exit from the mail command, type CTL-d or type . on a line by itself and press RET. It's also possible to send timed messages with the command at, as well as mail users not on the local network, provided you know their e-mail addresses. For more information about mail, see man mail.

Pine
----

If you are not partial to the UNIX mail utility, there is always Pine. Pine is a freeware program from the University of Washington that is considerable more user friendly than the standard utility, to activate pine type pine at the prompt.

Talk and Write
--------------

The talk and write commands are similar in that both provide a method of instantaneous communication. Talk, however, is used more frequently than write because talk provides a way for dividing the screen into two windows---one for outgoing messages and one for incoming messages. With write, the two parties must agree ahead of time to prevent simultaneous sending and receiving of messages---since there is only one write window, you would end up with garbage on your screen. In this section we will only discuss the talk command. (See man write for more information.)

Talk only works between users on the same local network. To talk to another user, type talk USERNAME@HOST. Something like this should appear on the other person's screen:

        [suntsu|1]
        Message from Talk_Daemon@suntsu at 11:13 ...
        talk: connection requested by karney@lyman.
        talk: respond with:  talk karney@lyman

Thsi will continue beeping on the other person's screen until either the connection is accepted or you end the attempt with a CTL-c. If accepted, talk breaks up the screen into two windows and communication can proceed until either party ends the session with a CTL-c. (See man talk for more information.)

Emacs Mail Utility
==================

Using the Emacs facility is probably the most convenient way to read, write, and send mail.  Unlike UNIX and VMS, Emacs allows for editing mail before it's sent---a definite advantage for fumble-fingered users.

To get into the read-mail mode, type META-x rmail in an Emacs window. This will also automatically load any new messages into Emacs. The command n will scroll you foward to the next message, and p will take you back to the previous message. All saved message will contained in your ~/RMAIL file on UNIX. For a complete list of commands while in rmail mode, simply type ? or use the Describe Mode option in the Help menu of Emacs.

Emacs also supports a mail mode with the command META-x mail (or simply CTL-x m) in an Emacs window. This mode allows you to write and edit the same way you would edit any Emacs file. Simply enter the recipient's address in the To: header, type in your text, and enter CTL-c CTL-c when done. This will send your mail and automatically exit you from the mail mode. Other options available are described more fully through the command CTL-h m (again the Describe Mode in the Help menu of Emacs).

Mail Cross Posted to News Group and BULLETIN
============================================

Mail sent to the pppl, abstracts, tftr_physics, and certain other mailing lists is now cross posted to news and BULLETIN.  If you use news or BULLETIN, you may prefer to receive the information this way.

The correspondence is:

         Mailing list         Newsgroup            BULLETIN folder
         ---------------------------------------------------------
         pppl                 pppl.general         NEWS
         abstracts            pppl.library         LIBRARY
         tftr_physics         pppl.tftr.physics    pppl.tftr.physics
         tftr_news_info       pppl.tftr.news       pppl.tftr.news
         outages              pppl.outage          OUTAGE
         APS/AIP mailings*    pppl.news.aps        pppl.news.aps

(* Robert Park's What's new and AIP's FYI mailings.)

On Unix platforms, you can access news via Emacs (M-x gnus), rn, trn.

On VMS platforms, you can use BULLETIN.

On Mac/PC platforms, you can use various news readers (see the HELPDESK for details).  You need to set your news server to news.pppl.gov.

On most platforms, you can use WWW browsers (lynx, netscape), with a URL of, e.g., news:pppl.general

The Newsgroup postings don't expire, so news constitutes a convenient archive.

Mail Attachments
================

Many people receive E-mail attachments encoded in various ways (base64, binhex). This note describes how users of the Unix Cluster can read such attachments. The steps are:

 1. decode the attachment

 2. the attachment may be directly viewable on the Unix Cluster. If not, then use WinDD to open a window on a Windows NT machine to view it. (Or else use a Mac or a PC.)

 1. DECODE THE ATTACHMENT

     If you read your E-mail using Rmail in Emacs, decoding your attachments is easy. When looking at a message with attachments, type "!". This will create a buffer "*metamail*" with the decoded message. Exactly how the decoded attachments are displaying will depend on the type of attachment. For example, gif files may be displayed directly on your screen.

     The most common (and from a Unix user's point of view the most troublesome) sorts of attachment, are MS Word documents and the like encoded with binhex or base64. You should see a message stated that these have been unpacked into a directory ~/PC/incoming.

     In order to go back to reading your E-mail in Emacs, type C-x k RET to kill the "*metamail*" buffer.

     If you use some other E-mail reading program, then you need to arrange to pipe you message through the metamail program, e.g., with metamail < /tmp/message

     Notes:

       * binhex messages can only be decoded on Solaris and Linux platforms at this time.

       * Some older E-mail software includes binhex attachments in a non-standard way that metamail doesn't understand. You might be able to decode these by running unbinhex on the message with unbinhex /tmp/message.

       * Some of you may have an application/mac-binhex40 entry in your ~/.mailcap which invokes "toaufs". I recommend that you delete this. The system mailcap has an entry which uses "unbinhex". This differs from toaufs, in that the format for the Mac resource fork is tailored to the netatalk Appletalk server, which will probably replace the CAP server.

       * If you invoke metamail directly, you may want to set the environment variable METAMAIL_TMPDIR to ~/PC/incoming. (Emacs does this for you, if it's not already defined.)

 2. VIEWING THE ATTACHMENT

     Presuming that the attachment is in a format which requires MS Word (or whatever) to read, then if you are running on a X-capable desktop (i.e., an X terminal, Unix console, Mac running MacX, etc.), you can view it by running WinDD to connect to the Windows NT machine, ntsrv1.pppl.gov. Alternatively you can access the file directly from a Mac or a PC.

       - X access. If your X terminal is manufactured by Tektronix and if of sufficiently recent vintage, then execute the command

                    xpsh windd -geometry 1024x768 -c -h ntsrv1 -keysym_only -nd -x &

          Otherwise, execute

                    windd -geometry 1024x768 -c -h ntsrv1 -keysym_only -nd -x &

          on any Solaris or OSF/1 platform in the Unix Cluster. These commands can easily put on menu entries in .twmrc, e.g., with an entry like

                    "WinDD" !"xpsh windd -geometry 1024x768 -c -h ntsrv1 -keysym_only -nd -x &"

          This will prompt you for your Unix username and password and then connect you to a Windows NT machine called ntsrv1.pppl.gov.

          By default, the "H:" drive should be connected to your Unix directory ~/PC. Access this via FileManager (in the "Main" group in Program Manager), open the "incoming" folder, and double-click on the file created in (1) to view it using the appropriate application.

          When finished log out of ntsrv1 by selecing File->Logoff in the Program Manager. Only a limited number of people can use WinDD, so don't hog it.

          (Note that the mounting of ~/PC on H: is currently unreliable. We are trying to remedy this.)

          If you think that Backspace and Delete are doing the "wrong" things in WinDD, try including

                    WinDD*keytranslations:#override \n\
                         <Key>Delete: { 0x0E } \n\
                         <Key>BackSpace: { 0xE0, 0x53 }

          in ~/.Xresources.

       - Mac access. In Chooser, select AppleShare->PPL-ENET PH2->CLUSTER. Connect with your Unix Cluster username and password, and you should be offered an AppleShare volume called PC. This corresponds to your Unix directory ~/PC. Double-clicking on the file you just created in (1), should fire up the appropriate application.

          (This relies on the netatalk AppleTalk server running on tern. This is a workalike to the older(?) CAP AppleTalk software running on other Unix Cluster nodes (which for AppleShare advertizes itself as Theory and Unix). We will probably phase out the use of CAP. So if you have files in a CAP volume, I suggest you move them to the netatalk volume, by mounting your AppleShare directories in Unix and CLUSTER and dragging the files from the "Unix" volume to the CLUSTER volume.)

       - PC (Windows 95/NT) access. In Filemanager, select Disk/Connect Network Drive. Then enter a drive letter into the Drive field and

               \\TERN\USERNAME

          into the Path field, where USERNAME is your Unix user name. For this to work under Windows 95, your "Windows network name" must be your Unix username. This should prompt you for your Unix Cluster password and then connect you to a Windows (SMB) file server running on tern.pppl.gov with Netbios name TERN. H: will then correspond to the Unix directory ~/PC. You may have to configure a WINS server for this to work correctly. In "Control Panel->Network->Protocols ->TCP->WINS Server->Primary WINS Server" enter ntsrv1.pppl.gov's IP address 192.55.106.28. If you are browsing the network, you'll also need to know that TERN is in the workgroup CLUSTER.

Tex and LaTeX
*************

This chapter describes TeX and LaTeX, how to use and run LaTeX, many special features of LaTeX, and printing special effects through the use of PostScript. Much of the information here was taken from LaTeX: A Document Preparation System - User's Guide and Reference Manual by Leslie Lamport.

What ARE TeX and LaTeX?
=======================

The LaTeX document preparation system is a special version of TeX, a structured typesetting and text formatting utility. Typesetting refers to the process of turning ordinary text files (in this case, files with special embedded LaTeX commands) into printed output. It's the typesetter that decides such things as the length of the printed line, what style of type to use, how much space to leave below the section headings, and the document's general appearance. Through the use of special commands, the writer can create tables and lists, enumerate examples, use special fonts, and many other conveniences designed to give the text a professional polish. Currently it is only available on HYDRA (Digital Unix V3.2C), but not WAVE (DU V4.OB), or jupiter, mars, mercury, neptune, saturn, venus (DU V4.OD).

Both TeX and LaTeX are particularly suited for producing high-quality documents with mathematical text. LaTeX, however, is actually a collection of high-level commands, called macros, which are designed to simplify the use of TeX and allow the user to concentrate on his or her writing rather than on formatting commands. The added power and flexibility that this provides is the reason we recommend the use of LaTeX. This chapter assumes that by now you already have a good working knowledge of LaTeX, so only necessary information that isn't included in the manual will be discussed here. For a more basic introduction, see LaTeX: A Document Preparation System - User's Guide and Reference Manual.

Running LaTeX
=============

The LaTeX source file is a text file, the name of which generally includes a .tex extension (TeX files also use the same extension---TeXinfo extensions are .texi). LaTeX files contain special commands which include characters such as %, \, and }. The file sample.tex is a sample LaTeX file which documents how to prepare input files for typesetting simple documents. LaTeX files are best edited using Emacs.

In the current version of TeX and LaTeX, the default TEXINPUTS is .:$HOME/tex:/usr/local/lib/texmf/tex//.  Similar to PATH, TEXINPUTS allows the computer to find the information necessary to run TeX and LaTeX. If you keep your personal TeX macros in ~/tex, then you can safely delete any definition of TEXINPUTS that you have in ~/.cshrc.  However, if you keep your personal macros elsewhere, e.g., ~/TeX, then you should define TEXINPUTS as

setenv TEXINPUTS .:~/TeX:

TeX will look first in the current directory, then in ~/TeX, and then use the default path.

To typeset a LaTeX file, use the command latex. For example,

             [lyman|15] latex sample.tex

would tell the computer to typeset the sample program according to the embedded commands and create a .dvi (DeVice Independent) file named sample.dvi. (If there is only one file including the name sample, a command like latex sample would work just as well.) Two programs that run in concert with TeX and LaTeX are makeindex and bibtex, which automatically construct indices and a bibliography, respectively, when the necessary information is included. This DVI file can be previewed on the screen before printing with the command xdvi, i.e. xdvi sample.dvi.

The standard method for printing LaTeX documents is to use the command lpr -d, where the d option implicitly invokes dvips to convert your DVI file into PostScript for printing. The dvips command should be invoked separately if the special effects needed are unavailable to DVI files.

Dvips
=====

The dvips command is used for translating a DVI (DeVice-Independent) file, produced by TeX or some other processor (such as GFtoDVI), to PostScript. PostScript is a language intended for driving laserprinters. With PostScript, one has much greater flexibility for customizing printed documents---PostScript provides commands that allow for overlays, the insertion of figures, printing multiple logical pages on one physical page, rotating the pages, etc. (See man dvips.)

To convert a DVI file to PostScript, type dvips FILENAME. This converts the entire file to PostScript (not allowing for redirection or piping of input or output) and pipes it to the printer. The f option must be used to redirect the output. PostScript also handles overlays via header files, done with the option h. For example,

             [lyman|16] dvips -h draft.pro -f sample.dvi > sample.ps

would print DRAFT across each page and the f option combined with a redirection and filename would put the contents into a separate file---the convention is to change the extension to .ps. A similar program copy.pro prints COPY across each page. Once the file is in PostScript form, only lpr is needed to print. In an analog to xdvi, PostScript files can be previewed with the command ghostview.

Once the file is in PostScript form, many options are available. One of the most useful is multips, which can output multiple logical PostScript pages on one physical page and print the pages in two orientations (landscape and portrait). Output must either be piped to a line printer or redirected into a file. See man multips and man pr for more information on printing formats.

Special Features
================

This section describes styles and style options to LaTeX, as well as how to include figures and graphics in LaTeX files.

LaTeX Styles and Style Options
------------------------------

One of the advantages of LaTeX is the existence of macros, preset codes that can be called in LaTeX commands to produce a specified output format. In the directory /usr/local/lib/tex/inputs exists numerous files followed by the extension .sty---these are style files. Styles and style options allow you to print articles that match specific journal requirements, include equations, print Greek letters, etc.

Some LaTeX styles and style options include:

  * article - standard style meant for short documents

  * report - standard style meant for longer documents

  * book - standard style meant for actual books

  * 11pt, 12pt - (style options for article and report styles) produces 10% and 20% larger type sizes.

  * twoside, twocolumn - (style option for article and report styles) formats the output for double-sided and/or two-column output for printing.

  * aip, nf - (style options to article) formats for American Instistute of Physics and Nuclear Fusion journals, respectively.

  * equations - provides the option of several additional equation formats for all styles.

Many other styles and options are also available, common ones being PPPLletter/PPPLmemo, abstract, revtex, and the options aps and osa. Be sure to see the /usr/local/lib/tex/inputs directory and the Styles topic on the VAXes with the command help latex.

There are also several options for special PostScript fonts:

             avantgarde
             chancery
             palatino
             bookman
             ncs
             times

The style option psgreek must be used in order get uppercase Greek letters to come out properly. The styles and style otions are contained in the first line of the LaTeX file, i.e. \documentstyle[equations, aps, 12pt]{article}. Note that NONE of these special effects can be previewed with xdvi---the file must be first converted to PostScript and previewed with ghostview. See also /usr/local/doc/tex/dvips.info for more information on special fonts.

Including PostScript Graphics
-----------------------------

There also exist several style options for including PostScript graphics:

  * pspic - replacement for LaTeX primitive drawing commands

  * rotate - allows for rotation of selected TeX text. Also provided with multips (see Dvips)

  * epsf - for inclusion of encapsulated PostScript files

Often, graphics are produced by separate programs, converted into PostScript, and then included by inserting special commands in the appropriate section of the text file. To convert a gmeta graphics file into PostScript, type either:

             ctrans -d ps.mono gmeta > gmeta.ps

or,

             gplot -dPS gmeta > gmeta.ps

Again, the convention is to add the extension .ps to PostScript files. Both commands will convert the metafile into PostScript and redirect the output to the specified file. However, users have sometimes complained of problems using one method and not the other, which is why both methods have been included here. When the command is run, the computer will inform you of whether the metafile could be encapsulated, or put into a form from which the computer can read dimensions for insertion into the text file.

To include an encapsulated file in the LaTeX file, first specify the epsf option in the document style command:

             \documentstyle[epsf](STYLE)

At the specific location for the figure in the document, include the following commands:

             \begin{figure}
             \epsffile{gmeta.ps}
             \caption{You can insert a caption with this command...}
             \end{figure}

If the metafile couldn't be encapsulated, you would have to guess the dimensions of the figure through trial-and-error. The computer processes dimensions in terms of points---replace the second line above with the estimate of \epsffile[100 100 200 200]{gmeta.ps} and work from there. If you fail to provide dimensions for an un-encapsulated PostScript file, the computer will use default point values. Afterwords, you can dvips the LaTeX file (the computer will take care of the figure insertion for you) and preview the file using ghostview.

Dviselect and Spell Checking
============================

dviselect is a command that can be used to extract pages from a DVI file, creating a new DVI file. This allows you to print only selected pages of your document---useful when checking sections of a newly edited source file for bugs. For example,

             [lyman|17] dviselect intro.dvi 38-40 | lpr -d

would select pages 38, 39, and 40 of the file intro.dvi and pipe them to the default line printer for printing. Note that the option d must still be used to print a DVI file not yet converted to PostScript. By also specifying an output file, the smaller DVI file can also be retained separately. See man dviselect for more information.

The best spell-checking utility to use for TeX and LaTeX files is probably Emacs Ispell. The commands are:

  * META-x spell - check the spelling of the word at the cursor.

  * META-x spell-buffer - check the spelling of each word in the buffer.

  * META-x spell-region - check the spelling of each word in the region.

  * META-x spell-string STRING - check the spelling of the specified word.

Printing TeXinfo Documents
==========================

Most of our TeXinfo documents are in the directory /usr/doc/texinfo. TeXinfo files are treated the same way as normal TeX and LaTeX files---to read them, you need to copy them from ../texinfo to your home directory, i.e.:

             [lyman|18] cd /usr/doc/texinfo
             [lyman|19] cp gzip.texi ~
             [lyman|20] cd

Once you have the file, turn it into a DVI file with the command gmake (i.e. gmake gzip.dvi). If this gives an error message because additional files are needed that haven't been copied, retry the command with the addition:

         env TEXINPUTS=/usr/doc/texinfo:${TEXINFO} gmake gzip.texi

This allows the computer to search for the necessary files(s) in the appropriate place. Once you have the DVI file, read it on screen with xdvi or print it out with lpr -d.

Other Softwares Available on the Unix Cluster
*********************************************

Macsyma (Sun Only)
==================

Macsyma is an interactive symbolic, numerical and graphical mathematical problem solving tool.  It offers symbolic and numeric manipulation and solution capabilities in algebra, calculus and numerical analysis; 2D and 3D report-quality graphics; interfaces with mathematical text processors; and a user programming enviroment.

We have three versions of Macsyma on the Unix Cluster.  Macsyma version 418 runs on all SUNs except that we have only one license; only one person can use it at a time.  An older version 417 is installed on suntsu.  Another version is the DOE version called 'maxima' which runs on all SUNs.

To run Macsyma version 418, type:

macsyma

A Macsyma window opens on the screen.  On the title bar, there are 11 menus which provide all the operations offered.  Click and drag to the one you want and a second window will open to give you more choice as well as examples for demomstration.  There is a help menu which gives instructions on how to use Macsyma.

To exit Macsyma, type:

quit();

Maple
=====

Maple is an interactive computer algebra system.  Expressions  are read  from standard input and the results are produced on the  standard output as  each  input  expression  is read.  Maple has the ability  to algebraically  manipulate  unbounded  integers, exact  rational  numbers, real numbers with arbitrary precision, symbolic formulae, polynomials, sets, lists, and equations. It can solve systems of equations and differentiate and integrate expressions.

Maple is available on all the Unix Cluster machines To run Maple, type:

maple

To exit Maple, type:

quit

For more information, read manual pages on Maple(type man maple at the prompt).

Mathematica (Sun Only)
======================

Mathematica  is   an interactive  system  for  doing mathematical computation. It handles numeric, symbolic, and  graphical  calculations  and incorporates a high-level programming language.

We have Mathematica version 2.2.2 installed on suntsu.  It includes an X Window system version of the notebook-based interface.

To run it on an X terminal on sutsu, type:

mathematica

A window will open.  In this new window, type in a mathematical operational command and a shift-return to enter it.  The results as well as graphs will appear in this window.  To quit, click on 'file' on the menu bar and drag to 'Quit'.

If you type

math

on suntsu at the system prompt, it runs like Mathematica 2.2.1 which reads lines of input, waiting until a syntactically complete expression  has  been entered, then evaluates the expression and prints the result. To quit, type Quit and a carriage return.

We have four Single-Machine licenses at this time.  Only four users can run it simultaneously.

For more information on Mathematica, please refer to:

S. Wolfram, Mathematica: A System for Doing  Mathematics  by Computer, Second Edition, Addison-Wesley, 1991

NetScape
========

NetScacpe is another Internet World Wide Web browser. It is a tool to obtain and display information.  It can provide all the functions given by Gopher, News Readers and FTP programs.

We have the NetScacpe for the X Window System installed on our Unix Cluster.  To run it on any node, type:

netscape &

A NetScacpe window will open.  To obtain online information, simply click on the proper button.

To logout of NetScape, click on File on the command bar and drag to Exit.

Mpeg (Orion only)
=================

mpeg creates movies that you can view with mpeg_play.  You'll also need to use the program ppmtoyuvsplit to get your frames into a form that mpeg likes. To run it, type:  mpeg at the prompt.

Answerbook
==========

In addition to the conventional man pages, much of the documentation on Sun Solaris systems is accessible via the "answerbook" program.  This includes reference manuals for Fortran 77, Fortran 90, C, etc.

Answerbook requires that your X display support PostScript.  This means:

(1) You are sitting at the console of a Solaris machine.  In this case, just run

answerbook

(you need to have /usr/openwin/bin in your PATH)

(2) On other X displays, you need to run a "Display PostScript Agent". Here's how:

execnx & answerbook

You only need to run execnx once per X session.  And it's not necessary to run answerbook on the same machine that you run execnx.

In addition to the conventional man pages, much of the documentation on Sun Solaris systems is accessible via the "answerbook" program.  This includes reference manuals for Fortran 77, Fortran 90, C, etc.

IMSL Fortran Numerical Libraries
================================

Version 3.0 of the IMSL Fortran Numerical Libraries have been installed on the Unix Cluster.  This offers functionality similar to the NAG numerical library.

Here's how to link to the library with the different software platforms that we have

Solaris usage: f77 -o test test.f -L/usr/local/lib -R/usr/local/lib -R/opt/SUNWspro/lib -limsl -lsocket

OSF/1 usage: f77 -o test test.f -limsl

SunOS usage: /usr/lang/f77 -o test test.f -limsl   # f77 1.x or /usr/lang/new/f77 -o test test.f -L/usr/local/lib/new -limsl # f77 3.x

The two different options for SunOS are for the two different version of the Fortran compiler under SunOS.  Most people will probably want to use the first form.

For documentation on the IMSL routines themselves, run the program

imslhelp

For more details on how to compile and link with IMSL, see /usr/local/vni/notes/fnl/README.

Sendfax
=======

Members of the Theory Division may use this to send faxes.  (It may be possible to allow others to use it to send faxes which don't involve a toll call--this is still under investigation.  The fax(1) command is also available to sending faxes via the Campus fax gateway.)

Anyone may use it to receive a fax.

The advantages of using this fax service compared to a regular fax machine are:

  - can send a fax from your office or from home;

  - better quality when the document originates on the Unix Cluster;

  - easier to send faxes to multiple recipients;

  - can view received faxes on an X terminal;

  - can incorporate a fax into another document.

(A) SENDING FAXES

Here's how to send a fax:

       sendfax -d "name@number" file...

where name is the recipient's name (which appears on the cover sheet), number is the phone number and file... is one or more files to be sent. This and the other fax commands work on any Unix Cluster computer except for pppl.gov.

The phone number may be in one of two forms

(a) international standard: + country-code area-code number, e.g.,
+1-609-243-2662    (the Theory Division's regular FAX number)
+44-1235-868-554   (somewhere in the UK)

what you would have to dial, e.g., 2662 9-011-44-1235-868-554

The forms in (a) and (b) are equivalent, since the fax software knows how to strip off local prefixes (including how to deal with PPPL and PU extensions).  The hyphens are optional.  The "+" in (a) is required. Letters can be used instead of digits, e.g., +1-800-FLY-PANAM.

Pauses in the dialing sequence (e.g., to wait for a second dial tone) are indicated by a comma (= 1 second).  Calling card numbers should be surrounded in #'s to prevent their being listed on the cover sheet.

Acceptable files to send via sendfax are: text PostScript TeX DVI files tiff The last file format is the one used internally by the fax software.  See later for how to view and print tiff files.

TeX files are converted with dvips -P fax

which uses fonts whose resolution matches that of high-resolution faxes (204 x 196 dots/in).

Multiple recipients can be specified with multiple -d's.  Other useful options for sendfax (should normally go BEFORE the -d options) are: -n suppress cover page -D notify when sent (default is to notify only on error) -r specify subject for cover page -c specify comments for cover page

For more details see sendfax(1).

Use faxstat -s to list the status of jobs awaiting transmission.  Use faxstat -d to list the jobs that have been completed.  See faxstat(1) for details.

Use faxrm id to cancel transmission of fax, where "id" is the job id (shown by sendfax and faxstat).  See faxrm(1).

(B) RECEIVING FAXES

Tell the sender of the fax to use +1-609-243-3438 as the fax number.

Procmail
========

procmail(1) is a convenient filter for your incoming E-mail. It allows you

  - to divert mail from mailing lists to a separate mailbox

  - to filter out junk mail, etc.

This is all based on matches made to various fields in the header.

For the full documenation, see the man pages procmail(1), procmailrc(5), procmailex(5).

A couple of tips for using procmail on the Unix cluster:

  - To have procmail filter all your mail, create a mail

               /usr/mail/.forward/USERNAME

     containing the single line

               | /usr/local/bin/procmail #USERNAME

     Substitute your username for USERNAME. The two "s ARE part of this file. The documentation procmail(1) includes an "exec. With our mail setup, this is forbidden.

  - If you use Emacs to read your mail, then you need to ensure that Emacs moves mail carefully from the mailbox that procmail uses to an Emacs rmail file. Here's how:

       - Suppose you are on the widget@anyplace.net mailing list, and suppose that you keep your mail in the directory ~/mail.

          ~/.procmailrc should then contain something like:

                    MAILDIR=$HOME/mail :0: * ^TOwidget@anyplace.net IN.widget

          ~/mail/IN.widget is your "inbox" for this mailing list.

       - create an rmail file ~/mail/widget, e.g., by outputting an rmail message to a file of this name within Emacs. Then, while in the buffer for ~/mail/widget, type

                    M-x set-rmail-inbox-list RET IN.widget RET

          Now any incoming mail for widget@anyplace.net goes to IN.widget. To read this mail, read ~/mail/widget in Emacs and type g (for Get mail).

Basis
=====

Basis 11.5 has been installed on the Solaris machines in the PPPL Unix Cluster. basis is an interactive scientific computer interface developed at LLNL. See http://www-phys.llnl.gov/X_Div/htdocs/basis.html for details.

To use basis, you need to set

          setenv BASIS_ROOT /usr/local/basis
          or
          BASIS_ROOT=/usr/local/basis export BASIS_ROOT)

basis and related program may then be found in $BASIS_ROOT/bin.

NCAR Graphics
=============

NCAR Graphics version 4.0.1 is now installed on the Unix Cluster. It is the recommended plotting library for the FORTRAN library.

In order to use this version of NCAR Graphics, you need to do (as before)

setenv NCARG_ROOT /usr/local

DOCUMENTATION:

The documentation is available via the WWW at URL

http://w3.pppl.gov/ngdoc/

Postscript versions of the documentation are available in

/usr/local/doc/ncarg

SOURCES: The sources for this version of NCAR Graphics are in

/usr/sources/commercial/ncarg

CAUTION:

On SunOS 4.x systems (lyman, suntsu, carl, orion), you need to use f77-2.0.1 to compile your program (not f77 or f77-1.4). The scripts ncargf77 and nhlf77 are set up to use f77-2.0.1.

Unfortunately f77-2.0.1 may not be able link against other libraries compiled with f77. If this is a problem, I suggest using one of the Solaris systems (draco, lupus, ron, tom, ead03).

HOW TO GET THE OLDER VERSIONS:

To get to the older versions (3.2 and 4.0) of NCAR Graphics, you need to defined NCARG_ROOT as follows:

setenv NCARG_ROOT /usr/local/ncarg.3.2 setenv NCARG_ROOT /usr/local/ncarg.4.0

In addition, you will need to include $NCARG_ROOT/bin in your definition of PATH, before /usr/local/bin.

Enscript
========

This translates text into postscript.Allows, e.g., 2 col printing in landscape mode, duplex printing(if the printer supports it), headings, various forms of highlighting. Documented via the man page enscript(1).

Python
======

Python is a high-level modern programming language; it is interpreted, interactive, and object-oriented. It is often compared to Tcl, Perl, Scheme or Java. There is a Numerical extension to it which gives it array and mathematical capabilities similar to IDL or Matlab. It has an interface to Gist, a nice graphics package in Yorick which is well-designed for scientific applications, and an interface to the Tk package for developing GUI's. In essense, Python is a kind of a free IDL, with a more modern OO-capable interface.

Further information on Python can be found at http://w3.pppl.gov/~hammett/comp/python.html

Matlab
======

Matlab is a language created specifically to ease the creation of programs that involve a great deal of math or are needed for the development of algorithims. To activate matlab, type matlab at the prompt. If you need further information on matlab, type helpwin immediately after starting the application.