21
The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S. Visch, Version 2.1: May 18, 2001 Contents 1 INTRODUCTION 1 2 WORD PROCESSING 1 3 GRAPHIC PACKAGES 2 4 MAIL UTILITIES 4 4.1 Xmail ...................................... 4 4.1.1 The basics ............................... 4 4.1.2 How to send email ........................... 7 4.2 XCmail ..................................... 7 4.3 Getting Started ................................ 7 5 NEWS GROUPS (XRN) 9 5.1 Posting your first message .......................... 10 6 RUNNING PROGRAMS 12 6.1 Running Programs in the Background ................... 12 6.2 Setting up Time Delays ............................ 12 7 USING XEMACS 13 7.1 Starting xemacs ................................ 13 7.2 The Basics ................................... 13 7.2.1 Printing a File ............................. 13 7.2.2 Copying Text .............................. 14 7.2.3 Pasting text .............................. 14 7.2.4 Cutting Text .............................. 14 7.2.5 Key Bindings ............................. 14 7.3 Creating a .emacs file ............................. 14 7.4 Creating a .Xdefaults file ........................... 14 7.5 Using your own emacs files ......................... 14 7.6 Using Abbreviations ............................. 15 7.7 Mail ....................................... 15

The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

The Graduate/StaffGuide to Utilities

on the

SUN Computer Network

Department of Mathematics and Statistics

Written by J. S. Visch, Version 2.1: May 18, 2001

Contents

1 INTRODUCTION 1

2 WORD PROCESSING 1

3 GRAPHIC PACKAGES 2

4 MAIL UTILITIES 44.1 Xmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4.1.1 The basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.1.2 How to send email . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.2 XCmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.3 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 NEWS GROUPS (XRN) 95.1 Posting your first message . . . . . . . . . . . . . . . . . . . . . . . . . . 10

6 RUNNING PROGRAMS 126.1 Running Programs in the Background . . . . . . . . . . . . . . . . . . . 126.2 Setting up Time Delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

7 USING XEMACS 137.1 Starting xemacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137.2 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7.2.1 Printing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137.2.2 Copying Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147.2.3 Pasting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147.2.4 Cutting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147.2.5 Key Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7.3 Creating a .emacs file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147.4 Creating a .Xdefaults file . . . . . . . . . . . . . . . . . . . . . . . . . . . 147.5 Using your own emacs files . . . . . . . . . . . . . . . . . . . . . . . . . 147.6 Using Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157.7 Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Page 2: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

7.7.1 Setting up mail aliases . . . . . . . . . . . . . . . . . . . . . . . . 157.7.2 Setting up Folders . . . . . . . . . . . . . . . . . . . . . . . . . . 16

7.8 LaTeX Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167.9 Interactive Spell Checker . . . . . . . . . . . . . . . . . . . . . . . . . . 16

8 USING THE INTERACTIVE SPELL CHECKER 16

9 USING THE THESAURUS 16

10 Multimedia - Ultrasparc 2 Workstation 1710.1 Using sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1710.2 What to do if it locks up! . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

11 Using the CD Writer 17

12 Useful Commands 17

Page 3: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 1

1 INTRODUCTION

Being a graduate or staff member you will need to know more information aboutthe unix system than what is provided in the User’s guide for undergraduates. Thisbooklet is designed to fill that gap by informing you of what additional software isavailable and how one can get help/documentation for each software package.

2 WORD PROCESSING

Our department has the processing package, LaTeX and TeX. Microsoft Wordalthough used by a few staff members is generally not suitable for equations andlayouts as required when doing a thesis and writing papers. Microsoft Word isavailable via terminal server, just type tserverLaTeX is used by the majority of the department, due to

• Its ease of use.

• Flexibility.

• The amount of documentation available, and the good reference guides avail-able. e.g.

{ LaTeX User’s guide and reference manual by Leslie Lamport.

{ The LaTeX Companion by Goossens, Mittelbach, and Samarin.

• Ease of transferal to other universities, journals and book publishers.

• The number of experts within and without, that can be called upon for assis-tance should the need require.

• Comes with a set of macros under the group name pstricks . Pstricks isdesigned for high quality graphics, and sophisticated manipulation of text, andcan reshape and position any object whether it be text or graphics. You canalso add colour and gray shadings as required.

• Allows you to modify text existing in postscript pictures, using the psfragmacro.

6 20 40 60 80 100

−2.75 −1.5 −0.25 1 2 0 1 2 3

Acceleration m/s 2 Velocity (km/hr)

Plot of Smoothed average fuel consumption

Fu

elC

onsu

mpt

ion

(ml/s

)

Page 4: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 2

3 GRAPHIC PACKAGES

There are several graphic packages available such as• xfig

A difficult package to use, but is quite flexible, and was formerly the mostpopular amongst staff and postgrads.

Picture contributed by Burkard Polster

• IslandDrawLess easy to use than xfig, but comes with both an online manual and a

published one.

Picture contributed by John Hannah

• pstricksWhile not strictly a graphics package, and needs to be used within latex, it is

easy to use and is very versatile as anything that can be done on xfig can bedone using pstricks. See previous pages for examples of its use.

• MatlabWhile not strictly a graphics package, it can still produce some nice looking

graphics such as.

Curletts Rd

Hansons Ln

Middleton St

Wharanui Rd

Matipo St

Division St

Clarence St

Manderville St

Ric

carto

n R

d

Ble

nhei

m R

d

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

4am 8am 12pm4pm 8pm12am0

0.2

0.4

0.6

0.8

1

Time

Veh

icle

Vol

ume

Vehicle Volume for the week

For manuals see John Spain

• Maplemaple similarly to matlab can produce graphics but tends to be more limited

than Matlab.

• xvxv is used primarily for looking at pictures, but can also be used for selecting

windows or portions of the screen.

Page 5: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 3

• Glview (See Rick Beatson for details)

• Gnuplot (See Darlene Heuff for details)

• paprportInstructions on use available from Bob Broughton or off the department web

page.

• OmnipageAllows one to translate scanned typed pages into text.

Page 6: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 4

4 MAIL UTILITIES

4.1 Xmail

4.1.1 The basics

Select Mail from the left mouse menu; xmail will come up automatically iconised.Upon deiconising the window you can click on Newmail to view your email. Seebelow for an example which includes an explanation inside the message area.

Important Note: Always make sure you exit xmail and the end of each session, asotherwise xmail will not work properly the next time you use it (you won’t be ableto delete messages).

xmail•xmail 1.6 - “usr/spool/mail/mathyou”: n messages k new> A.Friend Thu Sep 5 08:00 16/449 A message

A.Lecturer Thu Sep 5 08:35 16/458 Second messageA.Student Fri Sep 6 13:23 16/458 Third message

Press <Middle-Mouse-Button> for help on any window

Fpnext Fpsave FpFolder Fpcopy Fppreserve FpDelete FpNewmail Fpquit

FpPrint Fpsend Fpreply FpFile:

Message 1:From A.Friend Fri Sep 6 09:06:11 1996Return-Path: <A.Friend>Received: from ssst25.math.canterbury.ac.nz by math.canterbury.ac.nz (4.1/SMI-4.1)id AA17810; Fri, 6 Sep 96 09:06:08 NZSReceived: by ssst25.math.canterbury.ac.nz (4.1/SMI-4.1)id AA12751; Fri, 6 Sep 96 09:06:07 NZSDate: Fri, 6 Sep 96 09:06:07 NZSFrom: A.FriendMessage-Id: <[email protected]>To: Y.UnixSubject: Subject: some topicStatus: RO

Here is an example message which starts with a banner. The banner tells you who sent you the message,the time at which it was sent, with the other details which are of no interest. After the banner comes themessage itself, which is what you are reading at present.

Pressing the middle mouse button anywhere on the xmail window, will give you a mini help window, givinghelp for that specific area. Pressing the shift-? key by this message will also give a list of the keyboard keydefaults that duplicate command button actions.

The command buttons Folder and print, will not work effectively until you first customise xmail via a .mailrcfile in your home directory.

Note: You must first select the folder you wish to enter by “clicking and holding downthe right mouse button, then move the mouse to the folder you wish to use and then release thebutton”. Next you must open the folder by “clicking the left mouse button on the folder button”.i.e. this is a two step process.

Whenever the newmail command button becomes reverse video, new mail has arrived. some white text to

make latex do what I want.

Page 7: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 5

Customising XmailThere are several options that you may wish to change with xmail. To follow is a listof options that you can change, and details of how to change them.

1. The default editor(which appears each time you wish to email someone).To modify your default editor you will have to create a .mailrc file tosetenv VISUAL="xedit"

2. Creating an indented prefix for repliesWhen replying to a message it is common practice to include an indented prefixto the portions of their message that you wish to include. This can be done byincluding into your .mailrc fileset indentprefix=’’>’’So if your original message wasTwo trains 200 miles apart are moving toward each other; each one isgoing at a speed of 50 miles per hour. A fly starting on the frontof one of them flies back and forth between them at a rate of 75 milesper hour. It does this until the trains collide and crush the fly todeath. What is the total distance the fly has flown?

Then using the reply-included option (capital R), you could send the followingresponse.

>Two trains 200 miles apart are moving toward each other; each one is>going at a speed of 50 miles per hour. A fly starting on the front>of one of them flies back and forth between them at a rate of 75 miles>per hour. It does this until the trains collide and crush the fly to>death. What is the total distance the fly has flown?

The fly actually hits each train an infinite number of times before itgets crushed, and one could solve the problem the hard way with pencil andpaper by summing an infinite series of distances. The easy way is asfollows: Since the trains are 200 miles apart and each train is going 50miles an hour, it takes 2 hours for the trains to collide. Therefore thefly was flying for two hours. Since the fly was flying at a rate of 75 milesper hour, the fly must have flown 150 miles. That’s all there is to it.

The original message

Your answer

Note that each of the lines from the original message is included with yourmessage but is prefixed with a “>”.Note for this example there are no message headers, these would normally alsoappear but can be easily edited out, as was done here.

3. Removing of message headers.It is not possible to remove all the header from messages but you can removemost by adding to your .mailrc file.retain nothingIt should be noted that the word “nothing” is just a dummy word. You canachieve the same effect by using the ignore and ignorealways statements in-serted in your .mailrc as follows.ignore Return-Path Received Date Message-Id Network Site Clas-sification Status From To Subjectignorealways

Page 8: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 6

4. Setting up the default printer.You can set up a default printer for xmail by adding to your .mailrc file a state-ment such asset printmail="/usr/local/bin/a2ps -nH -nn -ns -p -1 lpr -l-h -Prm404"where a2ps converts the message from text to postscript and the postscript fileis then transferred to the lpr statement for sending the file to the down stairsprinter.

5. No displaying of deleted messages.Whenever you delete a message, then by default xmail will continue displayingthat message rather than going to the next undeleted message. To fix thisinclude into your .mailrc fileset autoprint

6. Enable special casing.To enable the special-casing of exclamation points (!) in shell escape commandlines as in vi include into your .mailrc fileset bang

7. Setting up a mail folder.There are two types of mail folders,

• Those that store incoming email

• Those that store outgoing email

Firstly one needs to create a directory such as mail folder in which to store thefolders.e.g. mkdir mail folderNext you will need to include the statement below in your .mailrc file whichinforms xmail of what your mail directory is called.set folder=mail folderTo store your incoming email into your mail directory, you can firstly set up adefault file viaset MBOX=+readboxThe leading plus sign identifies the mail file as existing within the mail direc-tory and is a shorthand notation for the full mail directory path name.Additional mail files can be created by

• Creating a file within the mail directory.

• Saving the incoming email using the save command button.

Note: Should your files stop being automatically transfered from xmail to yourreadbox file upon exiting, chances are that you are somehow running an extraxmail file somehow (ps -u mathyou). To store all your outgoing email, you willneed to add to your .mailrc fileset outfolderset record=postboxNote the file postbox can get very big if you aren’t careful, so it pays to emptyit regularly.

8. Adding a signature.This can either be done by

• creating a .signature file followed by selecting the autograph option.

Page 9: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 7

• creating a .Signature file followed by selecting the Autograph option.

• adding to your .mailrc fileset sign="Bob Broughton, [email protected]"followed by selecting the autograph option.

• adding to your .mailrc fileset Sign="Bob Broughton, [email protected]"followed by selecting the Autograph option.

Note autograph and Autograph allow you to include either of the two predefinedsignatures, but not both at once.

9. Setting up groups of people to a single name.In cases where you have a group of people you wish to send the same message,for example statistics lecturers, you can assign them an alias within .mailrc asfollows.alias stats j.brown e.chacko m.faddy i.hudson m.reale

4.1.2 How to send email

Click the mouse on the button that says send, if your xmail is set up to use theeditor xedit, then an xedit window will appear. This xedit window will have fourlines already in it.

To: Here you enter a single email address i.e. the recipientSubject: Here you enter the subject on which this email is aboutCc: Here you add any additional email addresses you wish.Bcc: Leave this part alone.

Underneath you can start typing out your email and once finished click on saveand then quit.

A new window will appear which will ask for confirmation of the email addressdetails. Click on deliver if satisfied. You may wish to test it by sending email toyourself first.

4.2 XCmail

4.3 Getting Started

Type xcmail &

Page 10: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 8

To read new mail click

Page 11: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 9

5 NEWS GROUPS (XRN)

• Start by selecting News from the left mouse menu, or type in xrn in yourx-window

Firstly the xrn window will appear, followed by an Information window which willinform you that it has created a file called .newsrc for you. This file while initiallyempty will later contain a list of all the news groups, and even later will also includereferences as to which you wish to read, and which you do not.

• Iconise the Information window or click on the icon “dismiss”.

• Click on the icon “quit”, this will get you out of xrn’s “add” mode

You now will have to wait for the file .newsrc to have the total list of news groupstransferred into it.

• Click on the icon “All groups” (A list of topics will appear)

• Move down the list using the icons “Scroll forward” and “Scroll backwards”until you find a news group of interest e.g. alt.algebra.help

• Select it with the left mouse button.

You now have several ways in which you can include it.

1. SubscribeThis will result in this news group being included into a “news groups ofinterest” list according to its position in the alphabet.

2. Subscribe firstThis will place the news group at the beginning of the list.

3. Subscribe lastThis will place the news group at the end of the list.

4. Subscribe after groupThis allows you to place the news group after another news group.

• Click on the icon “Quit” (returns you to News group mode)

You will now be presented with a list of the news groups you selected plus thenews group “news.announce.newusers”, this news group contains articles on howyou should behave on news groups, in particular the article “FAQs about FAQs”contains information about a ftp site where you can obtain faqs (frequently askedquestions, or rules of conduct). In some groups they will post copies of their faqsfrom time to time, others may not have any, so it pays to read the group for a whilebefore you start posting so that you can find out if they have one, or at least get afeel of how the members think. It does pay to read the faqs when their is one, asquite often the faq’s contain the information you are looking for. It becomes veryfrustrating to other members of the news group if people keep asking questions forwhich the answer is in the faq, so make sure the question isn’t there before you ask.

To read a news group

• Select the news group you wish to read

• Click on the icon “Read”

Page 12: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 10

This will give you a list of articles in that news groupe.g.+ 5037 Re: wossin a name [22] Eccles

5038 I have the spon [9] Neddy5039 Re: "Name of a dog! Rover!" [45] Blue Bottle

You will also have one of the articles being displayed immediately below.The “+” before 5037 indicates that this article is either being read or has been

read at an earlier date, this allows you to keep track of which articles you have read.The numbering of the articles are set from when they first appeared on our

university site, e.g. if alt.algebra.help had first appear in July of 1995, then the firstarticles received after that date would have been numbered 1, the second 2, and soon, until the present time which could be in the thousands. You will notice that whenyou join a news group then will invariably not be starting at 1, this is due to all newsgroup items only having a finite life because of problems of storage. Frequently youwill find that articles will disappear after a period only a few days depending on thegroups importance, i.e. recreational news groups have lower priority to scientificones such as sci.math. It is important to note that alt.algebra.help is not consideredby computer services to be a science group because of its “alt” prefix.

You will also notice that some of the articles have the prefix “Re:”, this stands fora reply, i.e. Someone is posting a response to an earlier post. One should note thatsometimes a reply will appear on site before the original message, this is due to thelocation of respective posters and the links between us and them.

The numbers such as [45] just informs you of how many lines the article has,although at times this can be deceptive as some posters forget to include carriagereturns.

After the number is just the names of those who posted the article. .

• Select articles by clicking on them with the middle mouse button.

There are several options of which several are self explanatory, as with any of theicons, you can always move the mouse on them to get some details as to what the iconmeans. The rot-13 icon for instance allows you to decrypt an encrypted message1.

5.1 Posting your first message

• Return to news group mode

• Select the icon “All Groups”

• Find the news group uoc.test

• Subscribe to it

• Click on “Quit”

• Select it using the middle mouse button

• Click on “Post”

A Composition window will know appear which will include a header.

• Type in a name of a topic to the right of the word subject.

• Beneath the header type in your message1To encrypt you have to do it manually

Page 13: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 11

• Click on “send”

Congratulations you have now post your first article. Once you are reading a newsgroup no updates will appear until you first

• Quit from the group

• Click on “rescan”

• Select the group again.

Your message should now be there. Now to respond to your original post.

• Click on “followup”

• Click on “include article”

You will now have your original message included with some indentation, this helpswhen having conversations on the internet so that everyone can keep track of whosaid what.

• Type in a followup message

• Click on “send” and you have finished.

You will need to exit, rescan, and re-enter before you can read your followup.

Important Note: Reading news groups takes a lot more time than you may firstthink, learn to be selective not only in which group to read but which articles also.e.g. Do not read all of rec.arts.startrek.current just after a movie release, as on lowtraffic days you are looking at about 500 articles a day, as even being selective cantake a lot of your time. Reading news groups can also be addictive so be careful.

Page 14: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 12

6 RUNNING PROGRAMS

Programs on the unix system are generally run in what is called “The Foreground”and are run at the time when you are logged onto to your computer. You can alsorun your programs in the background with a possible time delay.6.1 Running Programs in the Background

All programs can be run in the background as long as they don’t require humaninput whilst they run. Why run programs in the background? Running programs inthe background is faster especially in terms of graphics and allows other to use theterminal while your program(s) are running, especially when a program may takeweeks to run.To run a matlab script file fred.m in the background, just write

unsetenv DISPLAY; nice +19 matlab < fred.m > output &

To run a maple script called fred in the background you must insert the word quitto the end of the file fred before typing

unsetenv DISPLAY; nice +19 maple < fred > output &

To run a SAS script called fred in the background write

sas fred &

SAS will store output into files fred.log and fred.lst

For large SAS jobs, type

sas -work directorypath fred &

Where directorypath gets you from the home directory to the directory you arerunning sas from.

Note: Be patient some packages will only send output to a file when the outputhas reached a certain size, thereby saving time.

6.2 Setting up Time Delays

You can set up a time delay on a process using the “at” command. Example. To set atime delay on printing a large file, enter the full print statement into a file e.g. doit,then save the file and typeat -f doit -m 0100this will inform the at statement that you wish to execute the statements containedwithin the file doit at 1am.

Page 15: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 13

7 USING XEMACS

Xemacs is the most powerful editor available in our department, it is also a mailtool and a news reader as well as other applications. The result being that is verymemory intensive, hence if your editing is simple, it is prefered that you use a lesspowerful editor such as xedit.Note you should never need to open up more than one xemacs at a time, asyou can always switch between files using the buffer menu.

7.1 Starting xemacs

Type “xemacs &”

7.2 The Basics

You can learn some of the basics by typing Ctrl-h t(that is the control key and the h key simultaneously followed by the t key).

This command will put you through a tutorial on xemacs which not only informsyou of the commands but also of the syntax. e.g. what is meant by the terms “buffer”and “file”. It is important that you go through the tutorial at least once as by theend you should know how to

• Move around the document using key combinations; although the necessity ofknowing the key combination for going to the next paragraph is up to you, butC-l (ctrl-l) for instance can be useful when editing.

• Emergency break, C-g.

• Manipulating windows (please note the definition they give of windows forxemacs, which differs from the standard definition).

• Add and remove text, this is the standard method plus several additional oneslike deleting words etc.

• Use the undo command C-x u, which allows you to do multiple undos.

• Find (open) and save files.

• Use the menus.

• Differentiate between C-w and cut.

• Exit (note you should use C-x C-c not C-z).

• Use the info pages.

• Read the mode line.

• Search.

• Use the online help facility (this is not the same as info) by typing ctrl-hctrl-h ctrl-h (yes three times)

7.2.1 Printing a File

Select print-postscript from the file menu, do not use the icon as the icon does notwork.

Page 16: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 14

7.2.2 Copying Text

Select the area by clicking with the left mouse button at the beginning and withthe left mouse depressed moving down to end of the area, then either use the “copy”key on your keyboard (where available) or ctrl-ins (ctrl+insert-key) or click on the“copy” icon. Another way of selecting your area is to mark your starting point withctrl+space and then using key combinations you can select the area you wish.

7.2.3 Pasting text

Select place you wish the text to be inserted with the left mouse and either usethe “paste” key on your keyboard(where available) or shift-ins (shift+insert-key) orclick on the “paste” icon.

7.2.4 Cutting Text

Select the area you wish to cut, and then either use the “cut” key on your keyboard(where available) or ctrl+w or click on the “cut” icon.

7.2.5 Key Bindings

Typing ctrl-h b will give you a complete list of key bindings. Which you can thenprint or edit for your personal reference.

7.3 Creating a .emacs file

A .emacs file lets you set up your own options for running xemacs,e.g. you can set up your own key bindings, your own defaults, your own variables.For an example of a .emacs file see “/usr/local/xemacs/lib/xemacs-19.14/etc/sample.emacs”.Note though that some keys such as the function keys you should modify with cau-tion as some of these have already been given definitions under unix such as F1 beingiconise. This sample file comes complete with documentation on possible options youmay wish to include. You may also wish to examine defaults.el and site-start.el inthe directory “/usr/local/xemacs/lib/xemacs-19.14/lisp” for options you may wish touse.

7.4 Creating a .Xdefaults file

A .Xdefaults file contains information on the fonts, colours, etc. that you wish a win-dow to have, in this case your xemacs windows, you can similarly define options foryour xterm windows. An example can be found under “/usr/local/xemacs/lib/xemacs-19.14/etc/sample.Xdefaults”.

7.5 Using your own emacs files

You can create or modify existing emacs files and place them in your emacs directory;this may require linking them via your .emacs file. If you feel your file maybe usefulfor general use, tell Bob Broughton, and he may have it transfered onto one of thexemacs subdirectories.

Page 17: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 15

7.6 Using AbbreviationsTo aid with typing you can use abbreviations e.g. ccc = Christchurch City Council.Abbreviations can be set up in a .abbrev_defs file with each mode being able tohave its own set of abbreviationse.g.

(define-abbrev-table ’matlab-mode-abbrev-table ’( ;; Matlab mode("ti" "title(’" nil) ;; The first part denotes the abbreviation("ax" "axis(" nil) ;; The second part denotes what you have("eva" "eval(sprintf(’" nil) ;; abbreviated, you must then always finish("ev" "eval(" nil) ;; the abbreviation with a nil.))

(define-abbrev-table ’c-mode-abbrev-table ’())

(define-abbrev-table ’text-mode-abbrev-table ’(("bi" "\\begin{itemize}" nil) ;; It is important to note that you("ei" "\\end{itemize}" nil) ;; must double the number of \’s

))

(define-abbrev-table ’global-abbrev-table ’( ;;This mode allows you to("existance" "existence" nil) ;;make your abbreviations("teh" "the" nil) ;;global which is handy for)) ;;common typos e.g. teh

To toggle the abbreviation mode click the right mouse between the brackets onthe bottom of the emacs window and select Turn on abbrev-mode.

7.7 Mail

Click on the mail icon, a new window will appear. This window is broken up intotwo sections, the top section contains the list of people whom have sent you an emaileach of whom you can select using middle mouse. The bottom section will displaythe current email message. Do not try and print messages using the upper printicon, use one on the left instead. Note this icon creates a dummy file called “darmok”in your home directory which will be deleted automatically after printing.

7.7.1 Setting up mail aliases

Create a file .vm in your home directory and insert entries such as(define-mail-alias "vc" "[email protected]")or(define-mail-alias "govt" "[email protected] [email protected]”)Where the first part is the alias and the second part is the list of email addressesyou wish to add. Note: Each alias must be only one line and to activate the aliasyou must add a space after the alias.

Page 18: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 16

7.7.2 Setting up Folders

To set up folders for automatic transferal after clicking auto-archive, include in your.emacs file(setq vm-auto-folder-alist ’ ;; This must be inserted at the beginning.

(("From:" ;; This is the part of the mail header you

;; wish xemacs to examine.("P.Renaud" . "maths") ;; The first part indicates ‘‘from’’ whom I("B.Taylor" . "maths") ;; received the message, the ‘‘.’’ is a("A.Witt" . "maths") ;; separator, the ‘‘maths’’ informs xemacs("I.Coope" . "maths") ;; to store the messages in the file ‘‘maths’’.("M.Hickman" . "maths")("J.Brown" . "stats") ;; Similarly the these three would be stored in("E.Chacko" . "stats") ;; the file ‘‘stats’’("M.Faddy" . "stats")

)("Resent-From:" ;; This is useful when you have a mailing list

("[email protected]" . "anzstat")("[email protected]" . "anzstat")

))

)

7.8 LaTeX Mode

Xemacs has various modes including the LaTeX mode which are designed to aidpeople in writing LaTeX. To initiate LaTeX mode just make sure your file has a .texextension.

7.9 Interactive Spell Checker

Xemacs allows you to use ispell within the xemacs environment, for details on itsuse see the man page man ispell

8 USING THE INTERACTIVE SPELL CHECKER

To find the list of options available with ispell, type man ispellSome of the more useful options are

• -t The input file is in TeX or LaTeX format.

• -p file Specify an alternate personal dictionary.

e.g.ispell bad-spelt-fileispell -t bad-spelt-fileispell -p your-dictionary bad-spelt-file

Note: You will be given a list of possible alternative words, just type thenumber; with cases of more than 10 alternatives you will be required to hit morethan one key, e.g. 0-9 for the 9th alternative.

9 USING THE THESAURUS

The thesaurus on our system has now been replaced with a WWW version,available via

netscape /usr/local/WWW/roget/index.html &.

Page 19: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 17

10 Multimedia - Ultrasparc 2 Workstation

The department has one Workstation (a physical computer) available for staffand student use, everything else are just computer terminals (they connect to phys-ical computers such as in the machine room). This machine is intended for runningfast graphics and sound.After logging in as normal, you will find a single xterm window appear. This will beyour only xterm window unless you type “xterm &” in the xterm window.10.1 Using sound

You can play au sound files via cat filename.au > /dev/audio

Matlab has several sound functions. i.e. auread, auwrite, wavread, wavwrite,sound, and soundsc.

10.2 What to do if it locks up!

Firstly what you do not do on any account (aside from it being on fire) is turn itoff, others are also logged in remotely and will not appreciate having their processesstopped. Instead you log onto another machine, rsh usp2-0 and using ps and kill(or kill -9) remove the processes causing the problem. If in doubt see a computertechnician.

11 Using the CD Writer

We have a windows machine set up in room 615 with a CD writer for staff andpostgrads use. Using the software package Easy CD Creator you can

• Copy files onto CD.

• Copy computer CDs

• Copy music CDs

• Erases CDs (in case you have a read/write CD).

The Easy CD creator lives up to its name, and gives instructions as you go, the onlyproblem is that it is case insensitive so if you have one file called Thesis.tex andanother called THESIS.tex, it will not allow you to copy both.

For files located in scratch areas it is recommended that you copy them over tothe Users drive (E:). Remember to remove them once you are finished copying

12 Useful Commands

For those needing to use Microsoft Windows applications type in an xterm window

tserver (with no &)You will be given a choice of two, they are essentially the same with some slightdifferences.

For those wishing to change shells e.g. csh to tcsh, type

passwd -r nis -e username (replace username with your own).

Page 20: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Guide to Utilities (created on May 18, 2001) 18

For switching from dos text file to unix text file type dos2unix and to reversethe process unix2dos

top - displays the top 50 processes on the system and periodically updates thisinformation. Raw cpu percentage is used to rank the processes. If number is given,then the top number processes will be displayed instead of the default.

top -u displays only the processes that you are running. kill - allows you to killa process. e.g. kill 1920, kills the process with that number found via top.

quota - Because of space limitations due to the cost of backups everyone is allo-cated a disk quota. This quota can easily be exceeded if you don’t remove unwantedfiles, .dvi files, or never delete any of your email. Once this limit is exceeded thereis also a hard limit where files not be saved if you reach this limit, this includes filesyou already have, i.e. if you reach the hard limit, then do xedit file, and click on saveexpect your file to disappear. If you exceed your soft limit for more than 3 days, anyfiles you save after that time will be gone. Also after the 3 days you will not be ableto log on either because the log on process requires a file to be created, in which casesee a technician.For these reasons it is important that you keep a regular check on your quota viaquota or quota -v. If you log off everyday then you will automatically get a warn-ing message when you log back on. If you stay logged on no such message will begiven.

compress, uncompress As disk quota is limited in makes sense to compress fileslike “fred” which are not currently in use, the syntax is compress fred, you can docompress multiple file via compress *. To uncompress type uncompress fred.

zip, unzip - To compress a file e.g. “fred” using the “zip” method type zipfred.zip fred. Or a group of file “fred.*” type zip fred.zip fred.* (noteunlike with compress, all files are stored in the one file). To unzip (reverse theprocedure) just type unzip fred.zip

uuencode, uudecode Binary files can not be sent over the internet without firstconverting them into ascii format either using uuencode or mpack. For uuencodingof a binary file fred.gif type uuencode fred.gif fred.gif > fred.gif.uu. Toreverse, type uudecode fred.gif.uu.Note 1: uuencoded files do not usually have any distinguishing suffix but the firstline of the file will be something like begin 640 chart.gif Note 2: When uude-coding a file make sure that the file’s name is not the same as the one mentionedin the first line or the uudecoding will overwrite itself which will result in only apartial image in the case of a large file.

mpack, munpack As an alternative to uuencoding you can use mpack, which thesame as mime format which

Page 21: The Graduate/Staff Guide to Utilities · 2019-10-07 · The Graduate/Staff Guide to Utilities on the SUN Computer Network Department of Mathematics and Statistics Written by J. S

Indexbackground, 12

cd writer, 17

dos2unix, 17

foreground, 12

glview, 3gnuplot, 3graphics, 2

islanddraw, 2

maple, 2matlab, 2multimedia, 17

news groups, 9

omnipage, 3

paprport, 3pstricks, 1, 2

tcsh, 17thesaurus, 16time delays, 12tserver, 17

unix2dos, 17

windows, 17

xcmail, 4xemacs, 13xfig, 2xmail, 4xrn, 9xv, 2