Using the Suns in the Sun Workstation Lab


NEVER, NEVER, NEVER TURN OFF A SUN

or any other computer running Unix, for that matter. Turning these computers off without executing the proper shutdown procedure can cause damage to everyone's files, including your own. Additionally, other people may be using the computer remotely at the same time you are using it, and turning the machine off is sure to anger those people. If you are ever tempted to turn one of these computers off, read the section titled When You Encounter Problems below. If that doesn't help, contact Dr. Bui or Dr. Null. If no help is available, simply leave the computer alone and use a different one if necessary. Report the problem to one of the people listed above as soon as possible.

IMPORTANT: When you finish using one of the Suns, be sure to log out (see the section titled Logging Out below). Otherwise, anyone can sit down at the computer you just left and access and modify your files, send harrassing email as you, and so on.

Availability of Sun Machines and Labs

Unless reserved for a class or seminar, the Sun Workstation Lab is available as long as the Olmsted Building is open to individuals having a valid Sun account and Sun Lab access (available via your PSU Id card which must be activated by the staff assistant).

The machines are on 24 hours a day and available for console and remote access, with the exception of applying patches to the machines. Applying patches to the machines is performed late Sunday morning to early Sunday afternoon. After patches are applied, the machines are rebooted. You should plan your work accordingly. The machines may not be available for other reasons, such as power outages, hardware or software failures, etc. If the reason the machine(s) will be unavailable is known ahead of time (with the exception of applying patches), an email will be sent to the mailing list.

Table of Contents

Getting Started
Using the Mouse with Windows and Menus
Logging Out
Opening More Windows
Using the File Manager
Floppy Disks
Text Editors
Printing
Access via SSH and SFTP
Locking a Computer
Getting Help
When You Encounter Problems

Getting Started

The following discussion (except for running netscape) applies whether you are accessing these computers via ssh or are actually sitting at one of the workstations. If you are sitting at the workstation, the discussions below assume you are using the CDE session desktop. At the login prompt, there is an "Option" menu. On that menu is a "Session" option, where you can set your desktop session to CDE or Gnome (we recommend one of these two). Once you set your session, you can save it (when you log out), which will set the "User's last session" option.

After logging in for the first time, execute the command:

ls
(type the command and then hit the Return key). This will display the files you currently have in your personal directory. You will see the files local.login and local.profile. As long as you haven't asked for the Bourne or Korn shell, you can safely delete the local.profile file. You can also delete the local.login file if you wish.
rm local.login
rm local.profile
Unlike PCs, there is no simple way to recover a file once it has been deleted. If you do delete something you needed, it may have been backed. Backups are not performed regularly on this system, so do NOT rely on this backup system. Contact one of Drs. Bui or Null to check if a file can be restored in this way.

If you execute the command:

ls -a
you will see additional files .cshrc and .profile. As you learn more about Unix (and Solaris), you may want to modify these files to customize your account. For the moment, you can see the contents of these files using the cat command, for example:
cat .cshrc
If these files ever become damaged, you can restore them by copying new ones from the directory /etc/skel. After copying a new .cshrc, you need to execute it (using the source command) to put the customizations it contains into effect. For example:
cp /etc/skel/.cshrc ~/.
source ~/.cshrc

The next thing to do is to read the policy on acceptable uses of these computers. If you are reading a paper copy of this document, start netscape by clicking on the "world" icon located on the lower left of your desktop or by typing:

netscape&
If you have modified your .cshrc file, you may have to enter:
/usr/local/bin/netscape&
When the netscape window appears on your screen, enter the following url in the box labeled Location:
http://cs.hbg.psu.edu/misc/ethics.html
After reading and understanding the policy, you can exit netscape by using the left mouse button to select Quit from the File menu in the upper-left hand corner of the netscape window. Email questions or concerns about this policy to admin@turing.hbg.psu.edu

See Basic Unix Commands for a brief description of more useful Unix commands.

Return to Table of Contents

Using the Mouse with Windows and Menus

All of the following discussion applies only when you are actually sitting at one of the workstations.

In general, the left mouse button is used for selecting, the middle button is for adjusting, and the right button is for bringing up menus. Some specific tips:

Return to Table of Contents

Logging Out

If you are logged in remotely via ssh, simpy type

logout
or hit ^D (otherwise known as control-D). If you are sitting at one of the workstations, the process may be a bit more complicated. If you have opened multiple windows (see the next section of this document), you can exit from all of them and log out by using the mouse to move the pointer outside of any window, pressing the right mouse button to bring up the Workspace menu and selecting Log Out with either the left or right mouse button. If you have windows open when you log out using this method, when you log back in, your desktop will reappear in the same configuration it was in when you logged out. For example, if you three terminal windows open when you logout, those windows will appear (in the same location) when you log back in. Alternatively, use the mouse and left mouse button to navigate among the windows and execute the logout command in each window. When you have successfully logged out, the screen will turn black and eventually the login window will reappear.

Return to Table of Contents

Opening More Windows

All of the following discussion applies only if you are actually sitting at one of the workstations.

There are three ways to open additional windows on your screen.

  1. Right click out of all windows to get the Workspace menu, select Hosts, and then select This Host
  2. Click on the Hosts icon (two bars) located on the bottom of your desktop and select This Host
  3. To open an xterm window, enter the command:
     
    xterm&
    

As described in section Logging Out, you can switch between windows by clicking in the desired window with the left mouse button. To close a window, either enter:

 
logout
or hit ^D while in it.

Return to Table of Contents

Using the File Manager

All of the following discussion applies only if you are actually sitting at one of the workstations.

The Sun Solaris operating system includes a file manager much like that found in the MacIntosh and Windows 3.x environments. The file manager can be started in a number of ways:

  1. filemgr&
  2. /usr/openwin/bin/filemgr&
  3. Use the procedure described in section Opening More Windows for opening a shell window to choose File Manager from the Files submenu of the Workspace menu.

The file manager associates a program with each type of file. For example, double clicking with the left mouse button on a text file icon will bring that file up in a text editor. You can quit the file manager by selecting Quit File Manager from the File menu. Use the man pages as described in section Getting Help to find more information on the file manager.

Return to Table of Contents

Floppy Disks

The following describes the proper procedure for using floppy disks with the Sun Ultras. Not following these instructions may cause the current floppy and subsequent floppies to become unusable.

Mounting a Floppy
Insert your floppy. Then, in File Manager, select Open Floppy from the File menu. After a several seconds, a separate window will open displaying the contents of the floppy. You may then copy files to and from this window to the main File Manager window using drag and drop.

Unmounting a Floppy
In the window that is displaying the contents of the floppy disk, select Eject from the File menu. After a few seconds, you will receive a dialog box indicating that the disk may now manually ejected. Click on the OK button in the dialog box and manually eject the disk.

NOTE: If you get a message saying the device is busy -- that means you are currently using the directory somewhere and you need to change out of the directory.

As a precaution against having your disk corrupted by the previous user improperly dismounting his or her floppy, it is strongly recommended that you give your floppy a volume name when you format it.

Return to Table of Contents

Text Editors

Four text editors are available to you:

  1. vi
  2. emacs
  3. pico
  4. textedit
The editors vi, emacs and pico can be used whether you are sitting at a workstation or are using ssh. The textedit editor can only be used if you are sitting at a workstation. If you have never used any of these editors before, pico is the easiest to learn (but also the least powerful). For more information on any of these editors, check the appropriate man page or info documentation documentation as described in section Getting Help. The info documentation contains much more information than the man page for emacs.

Return to Table of Contents

Printing

All of the following discussion applies whether you are accessing these computers via ssh or are actually sitting at one of the workstations.

Most importantly, NEVER print an executable file -- that is, an a.out file or any other file produced by compiling a program. This files are extremely large and contain no intelligible information when printed.

To print a postscript file or text to one of the B/W laser printers in the lab, enter the command:

lp filename

where filename is the name of the file you want to print. A postscript file will usually have a .ps extension. Many applications (notably Netscape and Adobe Acrobat) produce/print postscript files. You should not have to change anything in the default configuration of these applications to print correctly.

You can also convert a text file to a postscript file and then print it using the enscript command. This allows you to format a text file nicely. For example, the following:

enscript -fCourier8 -2rG filename

will print the text file filename in an 8 point Courier font (-fCourier8), two columns (-2), landscape (-r), gaudy mode (filename, date, etc... at top of page) (-G) to the printer as a Postscript file.

If you change your mind about printing a particular file, use the command:

lpstat -a

to get a listing of all pending print jobs, and then the command:

cancel pid

where pid is your print job id number.

If the job has already started to print, you need to cancel your job at the printer by pressing the orange cancel button.

You can also use sftp from a PC to download your file to that PC for printing.

Return to Table of Contents

Access via SSH and SFTP

All of the workstations in the Sun lab can be accessed via ssh and sftp. (SSH and SFTP are available on the department resource disk. Ask the staff assistant for a copy of this CD.) This is useful for working from a remote location, or for those times when all seats at the workstations are in use. The PCs in the campus labs have ssh installed. Select the Start menu, then Programs, and then (probably) security (IIT changes the folders periodically). Any of the following Sun lab machine names can be used.

alonzo.hbg.psu.edu
babbage.hbg.psu.edu
cantor.hbg.psu.edu
codd.hbg.psu.edu
courant.hbg.psu.edu
cray.hbg.psu.edu
dahl.hbg.psu.edu
dijkstra.hbg.psu.edu
eckert.hbg.psu.edu
erdos.hbg.psu.edu
euclid.hbg.psu.edu
fermat.hbg.psu.edu
fourier.hbg.psu.edu
galois.hbg.psu.edu
germain.hbg.psu.edu
godel.hbg.psu.edu
grace.hbg.psu.edu
hardy.hbg.psu.edu
hamming.hbg.psu.edu
jacobi.hbg.psu.edu
kepler.hbg.psu.edu
konig.hbg.psu.edu
markov.hbg.psu.edu
napier.hbg.psu.edu
noether.hbg.psu.edu
noyce.hbg.psu.edu
nygaard.hbg.psu.edu
pascal.hbg.psu.edu
perlis.hbg.psu.edu
shannon.hbg.psu.edu
tarski.hbg.psu.edu
ulam.hbg.psu.edu
wilkes.hbg.psu.edu
wilkinson.hbg.psu.edu
zeno.hbg.psu.edu
zorn.hbg.psu.edu
As some of these computers will be out of service at times, try several before concluding that none are accessible.

Return to Table of Contents

Locking a Computer

If you are sitting at a computer and need to leave for less than five minutes, it is acceptable to secure your account by locking the computer. This is done in one of the following ways:

  1. xlock
  2. Select the Workspace menu, and Lock Display
  3. Click on the "lock" icon located at the bottom of your desktop
After you execute one of the above commands, a screen saver will appear on the monitor. When you return, remove the lock by pressing Return and then entering your password.

If use of xlock becomes problematic (i.e. if computers are consistently locked for long periods of time), the xlock command will be removed. System administrators reserve the right to remove a lock and log the user out whenever necessary.

Return to Table of Contents

Getting Help

Using man and info

The following discussion of man and info applies whether you are accessing these computers via ssh or are actually sitting at one of the workstations.

If you know the name of the command you need more information on, enter:

man command-name

Some commands will also have additional information available in the form of info documentation. This can be accessed by entering:

info command-name

or

/usr/local/bin/info command-name

If no info documentation is available, then info will display the relevant man pages, so always using info is a good strategy. To see the tutorial on using info, enter:

info
and then hit h to bring up help on info.

If you want to see a list of commands relating to a particular topic, enter:

man -k topic

When all other sources of help fail, ask Drs. Bui or Null.

Return to Table of Contents

When You Encounter Problems

Remember that turning the power off and on never helps when a program locks your screen or some other mishap occurs. All that turning the computer off will accomplish is annoying anyone else who was using it and (likely) damaging the file system. Please read the following before asking for help.

If a power surge occurs while you are sitting at one of the workstations and it loses power, it will often be able to restart itself when power returns. This process can take as long as five minutes or more, so be patient. Eventually, the login window should reappear so that you can log back in and continue working. If the computer can not restart itself, contact Dr. Bui or Dr. Null for assistance. You will be logged out when a power surge occurs, and so your account is secure even if help is not available.

If you are logged in via ssh and a power surge occurs, your connection will be broken. You won't be able to ssh back in until the computer has restarted, which can take five minutes or more as noted above.

The following discussion applies whether you are accessing these computers via ssh or are actually sitting at one of the workstations, except that you may not have to use a separate ssh session if you are sitting at one of the workstations.

If a program you are using crashes, you may get an error message like:

segmentation fault, core dumped
In that case, just remove the core file from the directory you ran the program in (unless you need it for debugging):
rm core
and then continue with whatever you are doing.

If a program you are using locks up a window or your entire screen, do the following:

  1. If you have a usable window on your screen, simply use that window. Otherwise, log into another workstation or go to a PC with Internet access. Then ssh to the machine whose screen is locked. For example, if you are using netscape on the computer grace and netscape causes the entire screen to lock up, go to another computer and use ssh to log back into grace.
  2. Execute the command:

    ps -ef | grep your-user-name

    This will display a list of all of the programs (processes) you have running. The rightmost column displays the names of the programs. Pick the row containing the name of the offending program in the rightmost column, and note the number in the second column (from the left) of that row. This number is referred to as the process id (or simply pid).
  3. Execute the command:

    kill pid

    where pid is the numeric process id from the previous step. This should stop the execution of the offending program.
  4. Check if the program was indeed stopped. If not, return to your second window or log in point and execute the command:

    kill -9 pid

    If this doesn't work, ask one of Drs. Bui or Null for help.
  5. If you logged in from another workstation or PC, don't forget to log out from that machine before returning to work.
The combination of ps and kill is useful whenever you can't find another way to stop a program's execution.

Return to Table of Contents



 
Math/Computer Sciences Home Page