berserk user’s guidembelab/computer/berserk-users/pdf/berserk-users.pdfberserk user’s guide -...

33
- -4pc - -4pc Berserk User’s Guide Eric Nodwell Scott Webster Copyright © 2002-2004 Eric NodwellScott Webster This document can be freely redistributed according to the terms of the GNU General Public License. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Table of Contents Introduction ..................................................................................... 3 What is the Berserk computer system? ........................................................ 3 Introduction to Command Line Linux ......................................................... 3 Guidelines - Getting Along With Other Users .................................................. 4 Use the cluster Luke! ....................................................................... 4 Berserk Features ................................................................................. 4 Printing .................................................................................... 4 Setting default print options ............................................................ 4 Setting print options from the command line .............................................. 6 Using xpp or kprinter instead of lpr ...................................................... 6 Printing to espresso (colour laser printer) ................................................. 7 Setting the Default Printer .............................................................. 7 How to cancel a print job ............................................................... 8 How to print to a Berserk printer from Physics ............................................ 8 Windows Networking: Accessing Berserk from a lab Windows computer ......................... 8 FTP: Sending and receiving large data files .................................................... 9 Outgoing FTP ......................................................................... 9 Incoming FTP ......................................................................... 9 Floppies and CDs ........................................................................... 9 How do a use the floppy/cdrom drive? ................................................... 9 Burning CDs .......................................................................... 9 The Trash: Restoring accidently deleted files .................................................. 11 Sound .................................................................................... 12 Configuring Sound ................................................................... 12 Playing Audio CDs ................................................................... 13 Scanning Images .......................................................................... 13 Software on Berserk ............................................................................. 13 Text Editors ............................................................................... 13 Kate ................................................................................ 13 jpico and nano ....................................................................... 13 Emacs and XEmacs ................................................................... 13 Vi, Vim and Elvis .................................................................... 14 LaTeX .................................................................................... 14 1

Upload: others

Post on 18-Aug-2020

35 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

- -4pc - -4pc

Berserk User’s GuideEric Nodwell

Scott WebsterCopyright © 2002-2004 Eric NodwellScott Webster

This document can be freely redistributed according to the terms of the GNU General Public License.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU FreeDocumentation License, Version 1.1 or any later version published by the Free Software Foundation; with noInvariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in thesection entitled "GNU Free Documentation License".

Table of ContentsIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

What is the Berserk computer system?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Introduction to Command Line Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Guidelines - Getting Along With Other Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Use the cluster Luke! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Berserk Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Setting default print options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Setting print options from the command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Using xpp or kprinter instead of lpr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Printing to espresso (colour laser printer). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Setting the Default Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7How to cancel a print job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8How to print to a Berserk printer from Physics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Windows Networking: Accessing Berserk from a lab Windows computer. . . . . . . . . . . . . . . . . . . . . . . . . 8FTP: Sending and receiving large data files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Outgoing FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Incoming FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Floppies and CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9How do a use the floppy/cdrom drive?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Burning CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

The Trash: Restoring accidently deleted files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Configuring Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Playing Audio CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Scanning Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Software on Berserk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Kate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13jpico and nano . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Emacs and XEmacs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Vi, Vim and Elvis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1

Page 2: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Kile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14TeXmacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Word Processing and Office Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14OpenOffice (StarOffice) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14KOffice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15WordNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Reference Managers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Pybliographer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Image Manipulation and CAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15QCad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15The GIMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Inkscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Sodipodi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16gThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Mathematics and Number Crunching (and some Plotting). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Maple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Mathematica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Igor Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Octave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Numerical Python, Scientific Python, SciPi and MayaVI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18FDTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18FElt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Plotting and Scientific Graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Grace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Gri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19GnuPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Mathematical and Scientific Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20GPeriodic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20g3data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Qalculate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Anjuta and KDevelop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Lahey Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20GCC Compiler (versions 2.95 and 3.2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Intel C/C++ and Fortran Compilers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21ATLAS, LAPACK and BLAS linear algebra libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21GNU Scientific Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22netCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22noweb - Literate Programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Bluefish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Quanta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Viewers and Players. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23XMMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23RealPlayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Handy Little Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23wget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23ImageMagick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24KSnapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24ps2eps, ps2pdf and pstoedit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2

Page 3: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pcLaTeX Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Getting Started with LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Using Emacs to edit LaTeX files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Generating HTML from LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Generating accents in LaTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Drawing circuit diagrams with LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Changing the print margins or paper size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Counting the number of words in a LaTeX file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Emacs Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Changing the font size in Emacs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Inserting special characters such as a degree sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Removing the Toolbar and Scrollbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Mutt Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Using mutt and IMAP to read your physics e-mail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Customizing the colours in mutt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Using emacs as the mail editor with mutt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Keyboard shortcuts in Mutt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Pretty Printing in mutt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Additional Assorted Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29My DOS text files look funny in my Linux text editor (or vice-versa)!. . . . . . . . . . . . . . . . . . . . . 29Quick command-line spell checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Complex Variables in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Accessing a Windows Share from Berserk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Using PostScript tools to change the page size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Renaming a group of files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30A Fast and Elegant Window Manager: Blackbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Customization of X programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Using DocBook to create documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

IntroductionThis is the user documentation for the Berserk computer system in the MBE and Nano labs (Department of Physics,University of British Columbia). It is impossible to document every aspect of a complex and constantly changingcomputer system. In any case a complete documentation would be too long and nobody would read it. However,we hope to provide new users with enough tips and nudges to help them get started and to help avoid frustration. Wehope to also show them some useful tricks which they might otherwise never discover. Finally, this is the place wherewe record all those details which we would otherwise forget ourselves.

There is a companion manual for system administrators, which is also available from the web site.

What is the Berserk computer system?Berserk is multi-talented Linux machine running Debian Linux (http://ww.debian.org[http://www.debian.org]). Itruns programs, contains the harddrives with users’ data, acts as a file server for Windows and Mac machines, backsup data onto tapes, and much more. Berserk is a dual-processor MP2000+ Athlon machine with 2 GB of RAM and atotal of 240GB of hard disk space.

Associated with Berserk are a bunch of X-terminals, basically each a keyboard, mouse and large monitor. Some ofthem have sound cards and speakers. We use LTSP (Linux Terminal Server Project, http://www.ltsp.org to run ourX-terminals).

3

Page 4: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Introduction to Command Line LinuxThere’s a lovely introduction (which I wrote) to using Linux, particularly command line-oriented stuff, which you canfind here[../../linux-intro/html/index.html]. It’s not long, and I especially recommend it if you intend to you berserkfro programming.

Guidelines - Getting Along With Other UsersBerserk is a shared facility. If you hog all the resources, you will make other people mad, and since we all know eachother, that is Not A Good Thing. Keeping that in mind, here are some rules.

1.There is no fixed system for allocating resources. We expect that people will work things out with others to theirmutual satisfaction. This means it’s important to talk other users!

2.Calculation jobs on berserk should always be "niced", so that people who are using the system interactively don’tget the impression that the system is sluggish. This is easy to do: just precede your command with the wordnice. For example, instead of running "mycalc inputfile" run "nice mycalc input file".

3.Don’t stay logged in to an X-terminal when you are not around. This prevents other people from being ableto use that terminal. It is also a security risk. If there is something you need to keep running, you don’thave to remain logged in to do this. See the section on Keeping a job running after you log out[../../linux-intro/html/long-calculations.html]in the Command Line Introduction to Linux.

4.Long calculation jobs should be run on the steamengine cluster, not on berserk, unless there is some reason theycan’t run on the cluster (RAM requirements for example).

5.The amount of data which can be backed up is limited. Therefore every user has a nobackup directory. (If youdon’t have one, just create one - only the name is important). Anything in this directory doesn’t get backed up.Please use it for your large data files, mp3 files, CD images and other such things. Usedu -h to determine yourdisk usage (the option--max-depth nwheren is a number may be useful.)

Use the cluster Luke!Berserk is not really intended for long-running calculation jobs. There are now several clusters available for suchpurposes, our own steamengine cluster[http://www.physics.ubc.ca/mbelab/computer/steam_user/html/index.html]being one. Another cluster which anyone in physics can get an account on is the physics vn cluster. If you wantan account on this system, contact Matt Choptuik ([email protected][mailto:[email protected]]). Formore information refer to the web site[http://laplace.physics.ubc.ca/People/matt/Doc/VN/overview.html]. In additionWestgrid will be coming on-line "soon" and will supposedely obsolete all other clusters.

Berserk FeaturesPrinting

4

Page 5: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Setting default print options

If you want to change the default print options, there are a number of ways you can do this. From the web interface(http://localhost:631), click on the Configure button for the printer in question.

Alternatively, from the KDE Printing Manager, click on the Instances tab, then click on Settings. (A few of theoptions in the KDE Control Center are KDE-specific: they won’t apply to non-KDE programs.)

5

Page 6: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

As a third alternative, you can use the command line; see below.

Setting print options from the command line

It is easiest to set print options usingxpp or kprinter (see above). However, if you prefer to use the command line,this can of course be done too. To list all available options for a printer, use:

lpoptions -p optra_color -l

To set a particular option as default, use something like:

lpoption -p optra_color -o PrintQuality=Pres -o MediaSize=Tabloid

If you want to change the options for a single print job, use the -o flag with lpr:

lpr -p optra_color -o PrintQuality=Pres -o MediaSize=Tabloid yourfile.ps

Using xpp or kprinter instead of lpr

6

Page 7: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Many programs use lpr to print. This is not so convenient if you want to specify printer options, such as paper typeand print quality. In this case, you can usexpp or kprinter instead. Either of these commands will open a dialog boxfrom which you can choose print options. Programs which uselpr almost always have a setting in the print dialogfor the print command. Just change this toxpp or kprinter .

Matlab and Acrobat Reader are examples of programs which use lpr to print. (KDE programs use kprinter by default.)

xpp andkprinter can of course also be used from the command line to print postscript or text files:

xpp file.ps

Printing to espresso (colour laser printer)

In order to print directly to espresso, the colour laser printer on the 2nd floor, you need to have an account on physics,and the account name must be the same as on berserk. If this isn’t the case, you can always print to a file, copy thefile to physics, something like:

scp out.ps you@physics:.

and print it from there withlpr -P espresso out.ps.

Setting the Default Printer

For example:

lpoptions -d nano_lj4

You can also do this through the web interface or the KDE control center.

7

Page 8: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

The environment variablePRINTER will probably override this default setting. You can change thisenvironment variable with the command:

export PRINTER=nano_lj4

You can add the above line to your.bashrc file or your.bash_profile to make a permanent change.

How to cancel a print job

For the Lexmark printers, if the jobs is already printing the easiest way is from the control panel on the printer itself.Press the Menu button until Cancel Job appears on the LCD display, then press the Select button.

You can of course also cancel jobs from the web interface http://localhost:631[http://localhost:631], or from the KDEPrinting Manager.

If you prefer the command line, use for examplelpq -P nano_hp1to find jobs numbers and then for examplelprm-P nano_hp1 1234to remove a job;lprm -P nano_hp1 -will remove all your jobs.

How to print to a Berserk printer from Physics

Use the option-P optra_t@berserkor similar, for example:

lpr -P optra_t@berserk somefile.ps

If printing directly from a program, most programs allow you to specify print options.

Windows Networking: Accessing Berserk from a lab Win-dows computerIf you create a user account on a Windows machine in the lab with the same user name and password as your Berserkaccount, then you automatically get access to your home directory on Berserk (through Network Neighbourhood)and either the mbeuser directory or the nanolab directory, depending on which lab you are in. You can map thesedirectories to drive letters for convenience. If you use a different user name on the Windows machine, then Windowsmight ask you to enter a name and password when you try to access Berserk, or it might just fail.

8

Page 9: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

If this doesn’t work for you, come see an Administrator. The problem is most likely that you aren’t on theSamba users list, which is easy to fix.

FTP: Sending and receiving large data filesOccasionally you need to send or receive data files which are too large to email. For this purpose, an anonymous ftpserver is set up on berserk.

Outgoing FTP

•Put your file(s) in the directory/var/ftp/pub .

•Tell the person you want to send the files to to download the files fromftp://berserk.physics.ubc.ca/pub .They should log in as "anonymous", with no password.

•Don’t forget to eventually delete the files from/var/ftp/pub . Remember the whole world can downloadthem from there.

Incoming FTP

•Tell the person who wants to send you files to upload them toftp://berserk.physics.ubc.ca/incoming .They should log in as "anonymous", with no password. Nothing can be downloaded from this directory.

•When the files arrive, copy them from/var/ftp/incoming to your home directory and delete the originals.

Floppies and CDs

How do a use the floppy/cdrom drive?

To read a floppy or a CD-ROM, you must mount it first:

mount /mnt/floppy

mount /mnt/cdrom0

mount /mnt/cdrom1

The contents of the floppy or the CD are inserted into the file system at the specified directory. You can now readand write files as usual. Before you remove the floppy or the CD-ROM, you must unmount it with a command likeumount /mnt/floppy.

Burning CDs

9

Page 10: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

The CD burner in Berserk is 24x-10x-40x speed. As usual, you have your pick of software for CD burning.

Here are some general tips for CD burning.

Tip

•The ISO CD standard is really lousy (max. filename length 30 characters, doesn’t distinguish lower/uppercaseletters, max. subdirectory depth 6). There are various schemes to overcome these limitations, but they aren’tnecessarly compatible. This accounts for much of the pain of burning CDs.

•You should select the burn-safe option is there is one, since the hardware supports it. Some of the software(i.e. k3b) detects this automatically.

•"On-the-fly" burning will be a little bit faster, but might fail if there is a heavy load on berserk.

•For more detailed instructions, consult the CD-Writing HOWTO http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html.

Burning CDs with GUI programs

There are several graphical programs for burning CDs. Tryk3b or xcdroast.

Burning data CDs (command-line)

To create an image, put all your data file in one directory, say~/toburn . Create the image with

mkisofs -r -o /tmp/image1.raw ~/toburn

The-U option will allow all filenames and directory structures, but violate the ISO standard.

The-J option will write the Microsoft standard Joliot extensions, so that long filenames appear correctly on Windowsmachines.

To burn an image to a CD, use

cdrecord -v speed=16 dev=ATAPI:0,0,0 driveropts=burnfree -data /tmp/image1.raw

10

Page 11: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

The device number might not be ATAPI:0,0,0 if the system is reconfigured and I don’t update the docu-mentation. You can find out what it is withcdrecord -scanbus(for scsi drives) orcdrecord dev=ATAPI-scanbus

Copying data CDs (command-line)

To copy data CDs, you first need to get a CD image

readcd dev=1,0,0 f=/tmp/cdimage.raw

You can then use the cdrecord command above to write this image.

Burning a collection of music to an audio CD (command-line)

To burn an audio cd from.wav files:

cdrecord -v -eject speed=4 dev=ATAPI:0,0,0 driveropts=burnfree -dao -pad *.wav

This worked for me (Scott) on April 5, 2004. I tried the same thing usingk3b’s default settings (16x speed etc.) andgot an audio CD with skips in it.

Copying an audio CD (command line)

To grab the CD image, with a TOC (table of contents) file:

cdrdao read-cd --driver generic-mmc --datafile /tmp/cdimage.raw /tmp/toc-file

Burn it with

cdrdao write --driver generic-mmc --datafile /tmp/cdimage.raw /tmp/toc-file

In theory, it should be possible to use both drives like this:

cdrdao copy --source-device 0,0,0 --source-driver generic-mmc --driver generic-mmc --buffers 64

This didn’t work for me; let me know if you get it to work. The "source-device" likely needs to be changed here aswell.

The Trash: Restoring accidently deleted filesBerserk is configured so that files which are deleted or overwritten get moved to the user’sTrash directory. Thereis a limit of 50MB to the size of this directory. However, it only when you log in that the Trash directory is actuallycleaned, which happens by deleting the oldest files first until the total size of deleted files is under 50MB.

For convenience, the following aliases are defined for every user:* 0.60+1em

* 0.60+1emhardrmDeletes an item without moving it to the trash. Useful for deleting CD images!

11

Page 12: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc* 0.60+1emtrash_off

Disables the trash (in the current console), so that anything which is deleted vanishes forever!This may be useful if for some reason the trash causes some problem with a particular program,or if there is some performance issue. If your simulation constantly creates and destroystemporary files, your trash could get huge without this.

* 0.60+1emtrash_onEnables the trash again if it has been disabled.

One peculiarity is that you cannot delete files in yourTrash directory. This is intentional, because it saves you fromcommands likerm -rf . Should you wish to delete files in your trash directory, you must first set this environmentvariable:

export PROTECT_TRASH=NO

The behaviour of the trash can be configured. If you wish to modify it, copy/etc/libtrash.conf to.libtrash in your home directory and edit it. There are copious instructions included in the file.

Sound

Configuring Sound

Sound will work from any terminal which has a sound card and speakers. When playing sound, there are severaloutput options. Usually whatever program you are using will have at least a couple of these options in its settings orconfiguration. The following list is very much an ordered list! The options at the top are the best, and it gets worseas you go down. (This just applies to our particular setup, where the terminals are using NAS.)

•NAS (Network Audio System)

•OSS (Open Sound System)

•esd (eSound)

•aRts (Analog Realtime Synthesizer)

12

Page 13: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

KDE programs always use aRts, which is the worst choice. So it’s best to play sounds with non-KDE programs.

In general, for playing various audio files,xmms is a good choice.

Playing Audio CDs

To play audio CDs, insert them in the drive in berserk, then runxmms. Open a new file (or URL) and enter either/dev/cdrom0 or /dev/cdrom1 . The former is the top CD-ROM drive in the case.

Scanning ImagesBerserk has a Umax Astra 2200 scanner connected to it. This is a pretty decent colour scanner, which even hasback-lighting for scanning negatives if you should want to do that. Using the scanner is easy. Just put the thing youwant to scan on the scanner bed (the scanner is in the office in room 443), then from any terminal, run eitherxsaneor xscanimage. Both of these programs are quite easy to use. You can also scan from within theGimp if you arefamiliar with that image-editing software. From within the GIMP, choose Xtns, Aquire Image, umax from the menu.

Software on BerserkThere is a lot of software on berserk. This list is not comprehensive. If you use something useful which is not on thislist, please be kind enough to add it, so that others may benefit!

On Linux systems there tend to be many different programs which do very similar things. Within each section,programs are listed approximately according to the order which we might recommend them. This may mean that theeasiest to use are listed first, or it may mean that the one with the most features is listed first.

There are two predominant Desktop Environments for Linux: KDE and Gnome. Both (as well as WindowMaker andvarious other window managers) are installed on Berserk. You can always run any program, whether it belongs toKDE or Gnome, in any window manager. Most users are using KDE, so in the list below where there is both a KDEand Gnome program for a specific function, I have listed only the KDE program unless the one for Gnome has someparticular advantage.

Most of these programs can be found in the KDE menus if you hunt around a bit. Or you can start them from thecommand line. Usually you just enter the name of the program in small letters with no spaces. (So for example youcan start QCad with the commandqcad).

Text Editors

Kate

Kate is the KDE text editor. If you want a text editor with a graphical interface, this is a good one. It displaysmany structured documents (such as HTML files or programming code) with colouring and highlighting, and has lotsof other bells and whistles.

jpico and nano

These are small easy-to-use console editors which are good if you just want to quickly edit a small file and you don’twant to learn emacs or vi. They are both derivatives of the pico editor, and they both display a couple of lines ofcommon commands at the top or bottom of the screen, so that you don’t really need to know anything to start usingthem. Since they run in a console, they are faster and lighter than Kate, much may be a consideration if your’reaccessing berserk over a slow remote connection, or you’re just logged in with a console and not an X-terminal.

13

Page 14: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Emacs and XEmacs

The most famous text editor for geeks. If you learn to use this editor, you’ll never need another editor. It runs inconsole or in graphics mode. You can use it to read your e-mail, or write and compile Latex files, or as a C codeeditor/debugger or whatever. It usually can show document structure with highlighting and coloring.

I recommend emacs over xemacs: xemacs looks better but emacs is actually more functional.

See thetips section for emacs.

Vi, Vim and Elvis

These are all variants of the classic Vi editor which some people prefer to emacs. You probably want to use vim orelvis instead of vi.

LaTeXLaTeX is a document mark-up language for creating papers, books and theses. It is very popular in the physicalsciences, because it does awesome equations. Everything you need to use LaTeX is on berserk.

See thetips section on using LaTeX.

Kile

This is a GUI editor for LaTeX, with pull-down menus from which you can select special LaTeX characters andformatting.

TeXmacs

If you like emacs and you’re writing something in LaTeX, you might want to give this a spin. From the web site(http://www.texmacs.org/):

"GNU TeXmacs is a free scientific text editor, which was both inspired by TeX and GNU Emacs. The editor allowsyou to write structured documents via a wysiwyg (what-you-see-is-what-you-get) and user friendly interface. Theprogram implements high-quality typesetting algorithms and TeX fonts, which help you to produce professionallylooking documents. The high typesetting quality still goes through for automatically generated formulas, whichmakes TeXmacs suitable as an interface for computer algebra systems."

Word Processing and Office Software

OpenOffice (StarOffice)

An office suite from Sun, which is a virtual clone of Microsoft Office. It does an excellent job ofreading and writing Microsoft Office files. Is also available for Windows. You can get the Win-dows version for free from http://www.openoffice.org. It is also installed on the physics server, refer tohttp://www.physics.ubc.ca/clab/staroffice.html.

You can run it either from the menu, or by enteringoofficeon the command line.

14

Page 15: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

Star Office and OpenOffice are identical, except that StarOffice includes a database component and costsmoney.

KOffice

Unlike OpenOffice, KOffice isnot a clone of Microsoft Office. This may be either an advantage or a disadvantage,depending on your feelings about Microsoft Office. I find the interface to be much more logical and useable. It mayhave have not quite a many features as OpenOffice, and it is not quite as good as reading the Microsoft Office formats.Onebig bigadvantage if you use any tools which generate PostScript graphics (quite common in Linux) is that, unlikeMicrosoft Office or OpenOffice, when you import a PostScript graphic, it is displayed with a very high quality on thescreen (and you’re not required to print to a PostScript printer).

The main components of KOffice are kpresenter (presentations), kspread (spreadsheets) and kword (word processing).There are other components for drawing, graphing, equations, flowcharts and so on. For some of these things there isother software on berserk which does the job better.

Tip

When importing a PostScript graphic into KOffice, you may have to runps2epsion your PostScript file first.

WordNet

WordNet is a dictionary, not just a spell-checker, but a real, honest to goodness dictionary with meanings in context.For example, to get an overview of the meanings of "date", enter the commandwn date -over. Most people will preferto use the graphical version, which you start withwnb.

Reference Managers

Pybliographer

Pybliographer is a very nice, full-featured reference manager with an attractive interface. Note that you startthis program with the commandpybliographic, since thepybliographer command starts the command-line version,which you probably don’t want.

Homepage: http://pybliographer.org

Image Manipulation and CAD

QCad

QCad is am easy-to-use 2D CAD program.

Homepage: http://www.qcad.org/

The GIMP

A very powerful image manipulation program for such tasks as photo retouching, image composition and imageauthoring. Handles every imaginable format for bitmap images.

There is a good manual which is separate from the on-line help. It is at/usr/share/doc/gimp-manual/html/index.html .

15

Page 16: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Homepage: http://www.gimp.org/

Inkscape

Inkscape is a vector-based drawing program which seems quite easy to use.

Homepage: http://www.inkscape.org

Sodipodi

Sodipodi is a vector-based drawing program. It is similar to Inkscape (which is in fact derived from it), but I find theuser interface less intuitive). It may however be more powerful.

Homepage: http://sodipodi.sourceforge.net/

gThumb

gThumb is a photo management program that is very useful for organizing albums of digital images etc. It also makesweb pages of your photos.

Homepage: http://gthumb.sourceforge.net/

Mathematics and Number Crunching (and some Plotting)

Matlab

Everyone knows Matlab. Presently Matlab 6.1 is installed.

16

Page 17: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

Matlab seems to need special treatment (as of version 6) no run with nohup. Suppose you want to run yourmatlab script calledmyscript.m . Start it like this:

nohup nice matlab -nojvm -r myscript

Notice that we don’t use the ampersand (&). Matlab justs seems to hang if you do. Now hit CTRL-Z to getthe command prompt back. Usejobs to see your job. It will be marked as stopped. Assuming that it hasjob number 1, get it running withbg %1 (bg stands for "background"). Now usejobs again to confirm thatit is running.

The-nojvm flag tells matlab to start without the java interpreter. A consequence of this is that matlab doesn’tuse a graphical display, so it doesn’t get killed when you log out.

Maple

Version 7 is installed. Access GUI withxmaple and text-window version as justmaple. Please see some of the linksbelow for useful hints.Review of firstyear mathemat-ics with Maple,http://www.botik.ru/~duzhin/maple/Maple.htm[http://www.botik.ru/~duzhin/maple/Maple.html]Calculus Iwith Maple V,http://courses.ncsu.edu/classes-a/maple_info/www/MA141Contents.html[http://courses.ncsu.edu/classes-a/maple_info/www/MA141Contents.html]MapleTech,http://web.mit.edu/maple/www/plibrary/mtn.html[http://web.mit.edu/maple/www/plibrary/mtn.html]Maple Problems,http://www.cs.utah.edu/~zachary/[http://www.cs.utah.edu/~zachary/]Maple at MIT,http://web.mit.edu/afs/athena/software/maple/www/home.html[http://web.mit.edu/afs/athena/software/maple/www/home.html]

Mathematica

Mathematica isn’t actually installed on Berserk, however you can run it from physics with ssh:

ssh yourid@physics mathematica

Replace yourid with your actual user id on physics.

Mathematica will complain about missing fonts. Just ignore these messages - the fonts are indeed present on berserkand its X-terminals.

17

Page 18: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

You can’t run Mathematica if you’ve logged on using X-Win from a Windows machine. In this case thefonts are indeed missing.

Igor Pro

The Windows version of Igor Pro runs reasonably well under Wine emulation on Berserk. Start it with the commandigor.

Octave

From the web site (http://www.octave.org/):

"GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenientcommand line interface for solving linear and nonlinear problems numerically, and for performing other numericalexperiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

Octave has extensive tools for solving common numerical linear algebra problems, finding the roots of nonlinear equa-tions, integrating ordinary functions, manipulating polynomials, and integrating ordinary differential and differential-algebraic equations. It is easily extensible and customizable via user-defined functions written in Octave’s own lan-guage, or using dynamically loaded modules written in C++, C, Fortran, or other languages."

Documentation is in/usr/share/doc/octave2.1-doc and/usr/share/doc/octave2.1-htmldoc .

Numerical Python, Scientific Python, SciPi and MayaVI

Python is a high-level language which is a joy to program. My experience is that it makes a very good replacement forMatlab. Python scripts are also portable (they run on Unix, Windows, Macs, etc...)

Numerical Python adds a fast, compact, multidimensional array language facility to Python. Most of what you needto do numerical programming in Python is here.

Numerical Python Homepage: http://www.pfdubois.com/numpy

ScientificPython is a collection of Python modules that are useful for scientific computing. In this collec-tion you will find modules that cover basic geometry (vectors, tensors, transformations, vector and tensorfields), quaternions, automatic derivatives, (linear) interpolation, polynomials, elementary statistics, non-linear least-squares fits, unit calculations, Fortran-compatible text formatting, 3D visualization via VRML,and two Tk widgets for simple line plots and 3D wireframe models. For details consult the manual at/usr/share/doc/python-scientific/HTML/Scientific.html

Scientific Python Homepage: http://starship.python.net/~hinsen/ScientificPython/

SciPy is an open source library of scientific tools for Python. SciPy supplements the popular Numeric module,gathering a variety of high level science and engineering modules together as a single package. SciPy includes modulesfor graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms,ODE solvers, and others.

SciPy homepage: http://www.scipy.org/

MayaVi is a free, easy to use scientific data visualizer. The manual is at/usr/share/doc/mayavi/guide/book1.html.

18

Page 19: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

FDTD

To get FDTD and CAD running properly and fast you need to make sure your LD_LIBRARY_PRELOAD and PATHenvironment variables are set correctly. Both need to include/usr/local/lumerical . It seems that for maxi-mum performance LD_LIBRARY_PRELOAD also needs to include/usr/local/lumerical/lib/bin/glnx86

One way to accomplish this would be to add the following to your.bashrc :

if [ -z "$LD_LIBRARY_PATH" ]; thenexport ←↩

LD_LIBRARY_PATH="/usr/local/lumerical:/usr/local/lumerical/lib/bin/glnx86"else

export ←↩LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lumerical:/usr/local/lumerical/lib/bin/glnx86"

fiexport PATH=$PATH:/usr/local/lumerical

FElt

FElt is a free system for introductory level finite element analysis. It is primarily intended as a teaching tool forintroductory type courses in finite elements. In a command line environment, FElt uses an intuitive, straightforwardinput syntax to describe problems. It also includes a graphical user interface for workstations that allows the user toset-up, solve and post-process the problem in a single CAD-like environment.

Project homepage: http://felt.sourceforge.net

Plotting and Scientific GraphicsAlso check out the programs in theMathmematics section, some of which can generate plots.

Grace

Grace is a graphical 2D plotting tool. It has powerful data manipulation and analysis and generates very high-qualityplots.

Homepage: http://plasma-gate.weizmann.ac.il/Grace/

Gri

Gri is a language for scientific graphics programming. The word "language" is important: Gri is command-driven, notpoint/click.

Some users consider Gri similar to LaTeX, since both provide extensive power as a reward for tolerating a learningcurve.

Gri can make x-y graphs, contour graphs, and image graphs, in PostScript and (soon) SVG formats. Control is providedover all aspects of drawing, e.g. line widths, colors, and fonts. A TeX-like syntax provides common mathematicalsymbols.

Homepage: http://gri.sourceforge.net/

19

Page 20: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pcGnuPlot

A widely-used script-based plotting program. I haven’t used it myself, since I prefergri.

Mathematical and Scientific Utilities

Units

This is a handy little program for converting units. It knows over 2000 different units! (e.g. kg to MeV/c^2) Just typeunits in a console and follow the prompts.

GPeriodic

A periodic table.

g3data

g3data is used for extracting data from graphs. In publications graphs often are included, but the actual data is missing.g3data makes the extracting process much easier.

Qalculate

Qalculate is a powerful calculator program with the ability to make plots etc.

Qalculate Homepage: http://qalculate.sourceforge.net/

ProgrammingProgramming languages and utilities is where Linux really shines. So much so that I’m not even going to try to mentioneverything which is available on the system in this regard. Everyone has their favourite programming language andthey are all well-supported in Linux (well except for the Microsoft Visual family!). I’ll just note a few special thingshere.

Anjuta and KDevelop

Anjuta is a versatile Integrated Development Environment (IDE) for C and C++. It has been written forGTK+/GNOME, and features a number of advanced programming facilities. It is a graphical interface to the col-lection of command line programming tools available for Linux and UNIX systems.

Another C/C++ IDE is KDevelop. KDevelop is very slick, but is more specifically oriented to writing programs usingthe KDE libraries. For more generic programming, Anjuta seems to be preferable.

Homepage: http://www.anjuta.org/

Python

I just have to mention Python, because it is my favourite programming language. It is concise, readable, and portable(run it on Windows as well). With the Numerical and Scientific modules (seethe section above), it can do a lot ofwhat Matlab does, and with a surprisingly similar syntax.

Homepage: http://www.python.org/

20

Page 21: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Lahey Fortran

A version of fortran which can generate parallel-tasking code for multi-processor machines. If you’re interested,borrow the manual (in the nanolab).

GCC Compiler (versions 2.95 and 3.2)

GCC is the standard Linux C/C++ compiler. Version 2.95 is very stable; version 3.2 produces faster code but in rarecases might cause problems. To use version 3.2, use this command before compiling or linking:

export CC=gcc-3.2

G77 will compile Fortran 77 code, but not newer Fortran 90 or 95.

Intel C/C++ and Fortran Compilers

Intel C and Fortran Compilers are available in/opt/intel/compiler70 . These compilers generate code whichis supposedly faster than gcc. In particular, I have observed that the gcc compiler is only able to submit 2 simultaneousfloat operations using Intel SSE extensions, while the icc compiler can submit 4 simultaneous float instructions, so youmay see a large improvement if you can a lot of float-length floating point operations. For double-length precision,there is less difference. Documentation is in/opt/intel/compiler70/docs .

To run the fortran compiler, you must first set some environment variables. This can be done by calling:

. /opt/intel/compiler70/ia32/bin/ifcvars.sh

For the C/C++ compiler, the script is:

. /opt/intel/compiler70/ia32/bin/iccvars.sh

You can put this line in your.bash_profile to avoid typing it in every terminal.

ATLAS, LAPACK and BLAS linear algebra libraries

First the acronyms: LAPACK (Linear Algebra PACKage) is the standard open-source linear algebra library. BLAS(Basic Linear Algebra Subprograms) provides the basic underlying matrix operations, things like matrix inversionand factorization. ATLAS (Automatically Tuned Linear Algebra Software) is a project to generate highly optimizedBLAS and LAPACK libraries. These libraries are widely used; Matlab for example uses them as its linear algebraengine.

The default version of ATLAS on the system is optimized for Athlon processors, which is what we have in Berserk.If this is fine with you, you don’t have to do anything special to use ATLAS other than link to them - they are on thestandard library path. If however you are compiling your program to run on another computer with Intel processors,you should use the libraries optimized for the Pentium III. Programs compiled for the Pentium III run just fine onAthlon processors, but the reverse isnot true! The Pentium III ATLAS libraries are in/usr/lib/sse/atlas ; touse them, add the path to your LD_LIBRARY_PATH variable before compiling:

export LD_LIBRARY_PATH=/usr/lib/sse/atlas

You should first check whether there are any other paths in LD_LIBRARY_PATH which you want to preserve (echo$LD_LIBRARY_PATH ). If so, it is better to do:

export LD_LIBRARY_PATH="/usr/lib/sse/atlas:$LD_LIBRARY_PATH"

You can find documentation in/usr/share/doc/atlas-doc .

21

Page 22: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

BLAS Homepage: http://www.netlib.org/blas/

LAPACK Homepage: http://www.netlib.org/lapack/

ATLAS Homepage: http://www.netlib.org/atlas/

GNU Scientific Library

GSL provides a modern Applications Programming Interface (API) for C programmers, while allowing wrappers tobe written for very high level languages.

The library covers the following areas,

ComplexNumbers

Roots ofPolynomials

Special Functions

Vectors andMatrices

Permutations Sorting

BLAS Support Linear Algebra EigensystemsFast FourierTransforms

Quadrature RandomNumbers

Quasi-RandomSequences

RandomDistributions

Statistics

Histograms N-Tuples Monte CarloIntegration

SimulatedAnnealing

DifferentialEquations

Interpolation

NumericalDifferentiation

ChebyshevApproximation

SeriesAcceleration

Discrete HankelTransforms

Root-Finding Minimization

Least-SquaresFitting

PhysicalConstants

IEEE Floating-Point

Homepage: http://www.gnu.org/software/gsl/

netCDF

NetCDF is a standardized file format optimized for storing scientific data. There are APIs for C, Fortran, Python, Perland everything else. Matlab also reads and writes NetCDF files.

To see the documentation for the C interface, browse to/usr/share/doc/netcdf-doc/guidec.html/index.html. The Fortran interface documentation is at/usr/share/doc/netcdf-doc/guidef.html/index.html .

noweb - Literate Programming

"Literate Programming" is embedding documentation for a program within the program itself. Itworks with many different languages. If this sound interesting to you, I recommend that you check outhttp://shelob.ce.ttu.edu/daves/lpfaq/faq.html

noweb Homepage: http://www.eecs.harvard.edu/~nr/noweb/

Bluefish

22

Page 23: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

From the Bluefish website: "Bluefish is a powerful editor for experienced web designers and programmers. Bluefishsupports many programming and markup languages, but it focuses on editing dynamic and interactive websites."

Bluefish Homepage: http://bluefish.openoffice.nl/

Quanta

Quanta is a web development tool designed for quick web design. It is affiliated with the KDE project.

Quanta Homepage: http://quanta.sourceforge.net/

Viewers and Players

XMMS

XMMS is a good multimedia player. It can play most any audio format.

In the preferences section, choose OSS as the output plugin.

RealPlayer

RealPlayer is used to play various media formats from Real Networks. These are often used for streaming video onthe web.

To set up RealPlayer for the first time you need to follow the following steps:

Open a terminal.

Type the commandunset LD_PRELOAD

Typerealplay to start RealPlayer.

Click onView -> Preferences, then choose thePerformancetab.

SelectEsound support.

Shutdown RealPlayer and restart. Everything should now be functional.

All this will only work if your terminal uses the esd sound daemon. Ask the administrator if you have trouble.

Handy Little UtilitiesThese are listed alphabetically, since there is no reason to recommend one over another: depends what you want to do.Also have a look at the section onMath and Scientific Utilities.

wget

wget is a command-line tool for downloading. Why use it instead of a browser? Well it’s more robust, and you canbackground it and log out while downloading large files. Use it like this:

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.5/linux-2.5.68.tar.bz2

It can also download with http. The-b flag will cause it to go to the background (so you don’t require nohup).

23

Page 24: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Tip

One you’ve located a file with your browser which you want to download, here’s how I recommend todownload it. Right click on the file in your browser, choose Copy Link Location, then open a terminalwindow, typewget -b and a space, then centre-click in the terminal window to paste the download locationto the command line.

ImageMagick

This can convert nearly any graphics format to any other. It may be easier to use theGimp, which has a graphicalinterface.

Documentation for ImageMagick is at/usr/share/doc/imagemagick/html/ImageMagick.html .

KSnapshot

A screen-grabber utility.

ps2eps, ps2pdf and pstoedit

Any Linux program can create a PostScript file by printing to a file. These utilities are useful for converting to eps(Encapsulated PostScript) and PDF (Portable Document Format). pstoedit can convert PosScript to various vectorgraphics file formats.

TipsThese tips are in addition to the Command Line Introduction to Linux[../../linux-intro/html], so you should read thatfirst.

LaTeX Tips

Getting Started with LaTeX

LaTeX requires some learning, that’s for sure. There are a number of books about LaTeX kicking around the labwhich you can borrow. There is also a good introduction called "The Not So Short Introduction To LaTeX" onberserk. You can read it with:

gv /usr/share/doc/texmf/latex/general/lshort.ps &

or print it with

lpr /usr/share/doc/texmf/latex/general/lshort.ps

There is also other good documentation in the same directory.

Using Emacs to edit LaTeX files.

Emacs integrates well with LaTeX. To compile your latex file from within emacs, press CTRL-c CTRL-c; to view it,press CTRL-c CTRL-c again. If you compile and get errors, CTRL-C ‘ will move the cursor to the line causing theerror and display the error message.

24

Page 25: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pcTo view equations and figures nice formatted, as they will be when you compile your latex file, hit CTRL-c CTRL-c gRETURN. To edit them now, just click on them.

For more information on viewing LaTeX formatted within emacs, see the preview-latex manual http://preview-latex.sourceforge.net/manual/index.html. The section on key bindings is particularly useful.

If you’re new to either LaTeX or emacs, you may find it easier to usekile.

Generating HTML from LaTeX

The programlatex2html does an excellent job of generting HTML from a LaTeX file. Basic operation is simple:

latex2html yourfile.tex

This will generate a directory with the HTML files. Equations will be rendered as graphics. The defaults workquite well, but if you want to customize the output, the documentation is at /usr/share/doc/latex2html/html/index.html[file:/usr/share/doc/latex2html/html/index.html].

Generating accents in LaTeX

Accents are well-described here:

http://www.giss.nasa.gov/latex/ltx-401.html

Drawing circuit diagrams with LaTeX

You can make beautiful circuit diagrams in your LaTeX file easily with the circ package. Eric has the printeddocumentation for this package.

Changing the print margins or paper size

Many LaTeX templates, including most of the ones for journals, are based on A4 paper. If you print to letter paper,you may get very little margin at the top of the page, or you may get even get text cut-off. There are several possiblesolutions. They don’t all work in every case, so you may have to experiment a bit:

•Set the paper size in your LaTeX file. You would need a line like this:

\documentclass[letterpaper]{article}

This is however not such a good idea if you are using a particular journal format. In this case you don’t want tomodify the journal format in any way, so it’s better to modify the ps file for printing.

•Tell dvips to force a particular paper size:

dvips -t letter -o outfile.ps infile.dvi

25

Page 26: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

•Tell dvips use an offset:

dvips -O 0,3cm -o outputfile.ps infile.dvi

•Use a PostScript tool to modify the ps file. See thesection on using PostScript tools to change the page size.

Counting the number of words in a LaTeX file

One possibility is to use the dvi2tty command:

dvi2tty test.dvi | wc -c

Emacs Tips

Changing the font size in Emacs

To start emacs with a certain font size, you can specify the font on the command line, for example

emacs -font 6x13

To see which fonts are available on the system, use thexlsfontscommand.

To change the default size, you can set corresponding X resources. The default X resources are in the file/etc/X11/Xresources . It appears however that KDE doesn’t load these. To specify your own values, putthem in the file~/.Xresources . For example, you could add these lines:

emacs*font: 6x13emacs*geometry: 80x35

This won’t take effect until either you login again, or you use the commandxrdb -merge ~/.Xresources.

Inserting special characters such as a degree sign

ISO characters can be inserted with CTRL-x 8. For example, to insert a degree sign, type CTRL-x 8 o. To get a list ofthe possible characters, type CTRL-x 8 CTRL-h.

Removing the Toolbar and Scrollbar

If you’re using Emacs you’re not probably using the mouse to edit. I prefer just to remove the toolbar and scrollbarand save some screen space. Add this line to your.emacs file:

(tool-bar-mode nil)(scroll-bar-mode nil)

26

Page 27: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Mutt Tips

Using mutt and IMAP to read your physics e-mail

Mutt isn’t actually installed on physics. This doesn’t stop you from using it to read and store your e-mail there.We will do this with the IMAP protocol. This has the advantage that it interoperates very nicely with the WebMailprogram on physics, so you can switch back and forth as you like, and access all your saved mail from either.

To use IMAP with mutt, you can hit c for change folder, then enter for example:

imap://[email protected]/INBOX

It will ask for your password.INBOX is a special folder which refers to your system inbox. You can substitute anymail file, and specify a complete path.

What you really want to do probably is to automate this. Just add lines like the following to your.mutt/muttrcfile. (If this file doesn’t exist then create it: first create a directory .mutt, which will be hidden because it begins with aperiod.)

# this section configures IMAP access to physics# This assumes you store your mail in a directory called "mail".# If it is something else, like "Mail", use that instead.set spoolfile = imaps://physics.ubc.ca/INBOXset folder = imaps://physics.ubc.ca/mailset postponed = imaps://physics.ubc.ca/mail/postponedset record = imaps://physics.ubc.ca/mail/sent# Substitute your own user id here!!!set imap_user = nodwellset from = [email protected] use_from = yesset move = noset mail_check = 90set timeout = 15set certificate_file = ~/.mutt/certificates

You can also specify your password with theset imap_pass option, but if you do this make sure that the readpermissions for the.mutt/muttrc file for group andother are off:

chmod -R go-rwx .mutt

The configuration described here actually uses IMAP over SSL, which is secure. The first time you connect, you willbe asked if you want to accept a certificate. Choose to save it.

Customizing the colours in mutt

Here are my colour customizations (in my.mutt/muttrc file):

color normal black defaultcolor tree brightmagenta default

27

Page 28: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pccolor quoted blue defaultcolor header green default "^(From|Subject|Reply-To|To):"color attachment brightyellow red

You can find more example muttrc files on the mutt web wite, http://www.mutt.org[http://www.mutt.org].

Using emacs as the mail editor with mutt

Add the following line to yourmuttrc file:

set editor = "/usr/bin/emacs -nw %s"

Add the following line to your.emacs file:

(load "/usr/share/emacs/site-lisp/post.el")

Keyboard shortcuts in Mutt

here are a number of built in shortcuts which refer to specific mailboxes. These shortcuts can be used anywhere youare prompted for a file or mailbox path.

! refers to your$spoolfile (in-coming) mailbox

> refers to your$mbox file

< refers to your$record file

- refers to the fileyou’ve last visited

~ refers to yourhome directory

= refers to your$folder directory

@alias refers to the de-fault save folderas determined bythe address of thealias

Pretty Printing in mutt

The following lines in your.mutt/muttrc file will result in much prettier printing of e-mails:

28

Page 29: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

set print="yes"set print_splitset print_command="enscript --landscape --columns="2" --header=’%n@%M:%d|%F ←↩%C|Page ($%/$=)’ --media=letter --silent --encoding=88591 --pretty-print=mail --printer=optra_t"set print_decode

Additional Assorted Tips

My DOS text files look funny in my Linux text editor (or vice-versa)!

This is one of those silly minor incompatibilities which exist for no reason at all. DOS uses CR LF to mark line ends,and Unix (and Mac) systems use LF alone. You can do the conversions from one to the other withdos2unix andunix2dos.

Quick command-line spell checking

If you want to quickly check the spelling of a word without firing up StarOffice or WordNet or something, try this:

echo "accomodation" | ispell -a

This returns:

& accomodation 1 0: accommodation

giving the correct spelling of accommodation.

Complex Variables in C

Complex variables were not part of the original C standard, and this is a pain for numerical programming. However,they are part of the C99 standard. If you use the gcc compiler, there is a good description of using complex variablesin C at http://www.fnal.gov/docs/products/gcc/v3_1/gcc.info,.Complex.html. The short story:

•Include complex.h.

•Prefix any type declaration with _Complex to make a complex type (for example _Complex double).

•Get the real and imaginary parts with crealf, creal, creall, cimagf, cimag and cimagl.

•Complex conjugation with conjf, conj and conjl.

29

Page 30: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc•Many mathematical functions are available for complex variables by adding a c to the standard real-valuedfunction, for example cexp(x) is the complex-valued exp(x).

Accessing a Windows Share from Berserk

If the Windows machine is on the local network, the easiest way is with Konqueror, the KDE file and web browser.Just enterlan:/ in the address bar to get a list of machines on the local network and select the one you want, then selectSMB, which is the Windows Networking protocol. You can now drag and drop files in the usual way in Konqueror.

You can also use the smbmount program. You need to create an empty directory in your home directory, for example/home/you/mnt . You can then mount the Windows Share with something like:

smbmount windowscomputer /home/you/mnt -o username=yourid,password=yourpassword

The corresponding unmounting command issmbumount /home/you/mnt.

As usual, consult the man page for details.

You can also usesmbclient from the command line, which has an interface similar to ftp. Consult the man page formore information.

Using PostScript tools to change the page size

Sometimes you need to adjust a PostScript file before printing it. Here are some options.* 0.60+1em

* 0.60+1emConverting from A4 paper to Letter paperpsresize -PA4 -pletter in.ps out.ps

* 0.60+1emScaling and offsetting by an arbitrary amountpstops -p letter [email protected](0,3cm) in.ps out.ps

This would scale the original PostScript file by 90% andoffset it by 3cm vertically.

* 0.60+1emPrinting two pages on one page (2-up)pstops -p letter 2:[email protected](8.5in,0)[email protected](8.5in,5.5in)in.ps out.ps

If you’re printing from a KDE program, or if you usethe kprinter command, then 2-up and 4-up printing arestandard options anyway.

Renaming a group of files

The system has a commandrenamewhich can be used, but you must know some perl expressions, or at least regularexpressions.

I have written a handy scriptgroup-renamewhich is simple to use. Typegroup-renamewithout any arguments toget a brief description and examples.

30

Page 31: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Note

You must have/usr/local/scripts on your path to usegroup-rename. You should already, but if not,typeexport PATH=$PATH:/usr/local/scripts . You can add this command to your.bashrc file.)

A Fast and Elegant Window Manager: Blackbox

I find KDE and GNOME to be cluttered and slow, especially starting up. An alternative which I like, and whichseveral others have been converted to, is BlackBox. It seems to hit that sweet spot of trade-off between functionality,speed and customizability. Here’s how I suggest customizing it.

•Instead of choosing BlackBox at log-in, choose Default and create a.xsession file to specify exactly what youwant started. Here’s mine.

# .xsession# Things to run at start-up

# If a sound server is available, then let the band play!if [ -n "$AUDIOSERVER" ] ; then

auplay /nobackup/eric/fun/sousa.au &elif [ -n "$ESPEAKER" ] ; then

esdplay /nobackup/eric/fun/sousa.au &fi

# Start some programsaterm -geometry 80x30+0-0 &bbpager &

# Finally start the window managerblackbox

Notice bbpager: you’ll want to run it with blackbox. An important point is that everything must be started inthe background by putting an ampersand after the command, with the exception of the last command, which is thewindow manager. When this exits, your session ends.

•Customize your menu. Put the line

session.menuFile: .blackbox/menu

Then make a directory.blackbox and a file.blackbox/menu something like this:

# Eric’s blackbox menu file[begin] ()

[exec] (aterm) {aterm}[exec] (galeon) {galeon}[exec] (konqueror) {konqueror}

31

Page 32: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc[submenu] (System Menu)

[include] (/etc/X11/blackbox/blackbox-menu)[end][submenu] (BlackBox)

[config] (Settings)[stylesmenu] (Styles) {/usr/share/blackbox/styles}[stylesmenu] (My Styles) {~/.blackbox/styles}[restart] (Restart)[exit] (Exit)

[end][end]

This gives me a simple top-level menu with the two menu items I need the most (aterm and galeon) as well as accessto the standard system menu when I need it.

Tip

To move or resize windows, instead of trying to click and drag the tiny bottom-right corner of the window,just hold down the ALT key and click and drag anywhere in the window. The left mouse button moves thewindow and the right one resizes it. This trick works with quite a few window managers on Linux.

Customization of X programs

Many X programs have their own methods of customization. Less known is that most also support an older techniquethrough the file.Xresources . This can be handy when you don’t want to figure out the particular technique foreach program. Here’s my .Xresources file.

! .Xresources

! emacs, xemacsemacs*Background: Whiteemacs*Foreground: Blackemacs*pointerColor: Orchidemacs*cursorColor: Orchidemacs*bitmapIcon: onemacs*font: 6x13emacs*geometry: 80x71-0-0

! xterm (and friends)XTerm*highlightSelection: trueXTerm*scrollBar: falseXTerm*font: 6x13XTerm*geometry: 80x30+0-0XTerm.VT100*dynamicColors: on! Number of lines of scrollback to saveXTerm*saveLines: 1500xterm*reverseWrap: true

The.Xresources file only gets read at log-in, so if you modify it, you’ll have to log out and log back in again.

32

Page 33: Berserk User’s Guidembelab/computer/berserk-users/pdf/berserk-users.pdfBerserk User’s Guide - -4pc - -4pc Kile ..... 14 TeXmacs ..... 14

Berserk User’sGuide

- -4pc - -4pc

Using DocBook to create documentation

This documentation is written in the DocBook format. DocBook is a markup language similar to html. A usefulreference webpage is http://xml.web.cern.ch/XML/goossens/dbatcern/index.html.

33