Warning: much of this file is obsolete. Use with caution.
The home page for the ITD department has useful information about proxies, etc.
The most powerful unix editor which is commonly available is "emacs". The principal virtues are that it allows for multiple windows and one can read (and save) mail from within emacs. Version 19 has some X support, with mouse driven commands.
A variant of emacs is "xemacs". Its interface has many mouse driven features which are integrated into Open Windows. It has several mail readers, of which "vm" is especially useful.
You might also try "jove", a light-weight version of emacs.
For previewing a dvi file, you can use xdvi; type ``xdvi name.dvi''.
Use either gv or ggv for viewing postscript files; some machines only have one or the other. To turn ``name.dvi'' into a postscript file do ``dvips name.dvi -o''. This creates ``name.ps.''
The epsf package is good for incorporating figures and color text into your document. See the dvips documentation for details.
To write a letter with a BNL/BSA letterhead, use this letter.tex as a sample. It must be processed with TeXsis, a local TeX macro package that is installed on all of the HET/NT computers. After writing the letter, do "texsis file.tex", then print as usual. The result should look something like this letter.ps. See Section 10 of the TeXsis manual for additional information.
To write a letter with a RIKEN/BNL letterhead, use this rikenletter.tex as a sample. It must be processed with TeXsis. The result should look something like this rikenletter.ps. The RIKEN/BNL letterhead is available only on quark.
The command "tf" will take a filename as an argument, try to decide if it is tex, latex, or texsis, and process it through to displaying it on your X window with either ghostview or gv.
Please remember not to print a .dvi file. To print a postscript file from the .dvi, do "dvips name.dvi". To produce a postscript file from the .dvi, "dvips name.dvi -o" will produce "name.ps"; you can then print name.ps on a printer by "lp -d destination name.ps", where destination is the name of the printer.
Print queue: ``lpstat''. If you have a long job which isn't going to work, please kill it. Any long jobs should probably be printed in the back room, see ``Alternate printers'' below.
Killing print jobs: First find the process number by ``lpstat''. Then kill it by typing ``cancel lp-\#'', where "lp-\#" is the process number. Alternatively, ``cancel -u username'' should cancel all your print jobs.
To quote from the ITD page on Labmail:
"Labmail is the BNL system for providing a generic e-mail address for BNL employees. This system allows people to contact registered users through an address of the form username@bnl.gov, rather than using the final destination address." To sign up, go to the above link.
This system is most useful if you know with absolute certainty that your employment at BNL will never cease. If you are not certain of this, then you should be aware that under current policy, labmail is turned off the day after your employment is terminated, with no possibility of having your email forwarded to any other account.
ftp ftpgw.sec.bnl.localAt theprompt enter
username@remote.site.nameand give your password when prompted. (Of course you should substitute the appropriate values for "remote.site.name"). For Telnet, type
telnet tngw.sec.bnl.localOnce you are connected, type
open your.remote.ip.addressand login as usual.
ssh-agent makes ssh even easier to use; it allows you to give a pass phrase once to identify yourself and then to login to remote machines without giving a password. Setting it up does require several steps:
#!/bin/sh if [ -f /usr/bin/X11/fvwm2 ] ; then if [ -f /usr/bin/ssh-agent1 ] ; then exec /usr/bin/ssh-agent /usr/bin/X11/fvwm2 else exec /usr/bin/X11/fvwm2 fi elif [ -f /usr/local/bin/fvwm2 ] ; then if [ -f /usr/local/bin/ssh-agent1 ] ; then exec /usr/local/bin/ssh-agent /usr/local/bin/fvwm2 else exec /usr/local/bin/fvwm2 fi elif [ -f /usr/local/bin/fvwm ] ; then exec /usr/local/bin/fvwm fiSee the "Secure Shell" section for a discussion of ssh-agent.
Cernlib documentation is available from CERN. The RHIC Computing Facility has local copies, although these may be out of date.
Type ``help'' for online documentation.
Control p (n) lets you flip back (forward) through the command history so you don't need to retype long lines.
We also have Doug's program ``axis''.
Once you get used to the interface, ``xfig'' makes nice line drawings.
The dumb but efficient way of using mathematica is to login to M and type
For long jobs, you need an editor. There are two ways to proceeding, each a putz. The first is to edit a file separately with the editor of your choice, and then read ``filename'' in by ``In[1]:= < < filename'' in mathematica. This is good for long files, but awkward for single lines.
If you use emacs, you can do the following. On machine M, type ``emacs &'' to open a local window running emacs off of M. Then get into shell, ``M-x shell'', and whence into Mathematica. One can then use emacs commands in the Mathematica shell. If you use tcsh, bash, etc, you will find annoying characters such as control M at the end of each line. To avoid this, add the line "setenv ESHELL /bin/csh" to your .cshrc file.
Figures: See below on setting the DISPLAY variable if you want graphics. Plots in Mathematica will pop up a new window with the graph on your screen. To save it, type
Unlike Mathematica 2, both versions 3 and 4 can use the $DISPLAY variable properly. But they still need special fonts installed in the local X-server, i.e., in your desktop machine. This requires mounting the exported Mathematica directory on your local machine with the same name as it has on the remote machine.
mkdir $HOME/.sketch cp ~paige/.sketch/*.py $HOME/.sketchYour LD_LIBRARY_PATH needs to be properly set, e.g.,
setenv LD_LIBRARY_PATH /lib:/usr/lib:/usr/openwin/lib:/usr/local/libFor more information see the Sketch user's guide and developer's guide.
To use FeynDiagram, write a C++ program, say myfig.C, describing the diagram following the documentation in /usr/local/src/FeynDiagram/Docs and the examples in /usr/local/src/FeynDiagram/Examples on quark.phy.bnl.gov. The documentation and the examples are very good; you do not need any prior knowledge of C++. Compile your program with the GNU C++ compiler and execute it as follows:
g++ -o myfig myfig.C -lFD -lm myfig > myfig.ps ps2epsi myfig.ps myfig.eps
Before you use Open Office for the first time, you must run
/OpenOffice.org1.0/setupFollow the prompts; the defaults are all reasonable. After running this setup (once), you can start Open Office by typing
/OpenOffice.org1.0/program/soffice [filename]You may wish to define an alias for this, e.g.,
alias soffice "/OpenOffice.org1.0/program/soffice"
Some clever systems will try to guess who you want to reach from a guess at their address. This can be very useful for reaching someone whose address you are not sure of. For an example:
wind.phy.bnl.gov% finger gupta@lanl.gov [lanl.gov] 108097 Gupta Goutam T-10 K710 505-665-6463 099533 Gupta Rajan T-8 B285 505-667-7664 rg@lanl.govand you find Rajan's phone number and a good candidate for an email address. Sometimes it doesn't work so well:
wind.phy.bnl.gov% finger ginsparg@xxx.lanl.gov [xxx.lanl.gov]Sadly, life's mysteries must remain hidden from so many of you.
A newer version of compression is "gzip". "gzip filename" will produce "filename.gz". To uncompress, "gunzip filename.gz" will give back "filename" It is best using "gzip" and "gunzip" whenever possible. In particular, the hep server at Los Alamos now uses gzip for many papers; uncompress will not work.
If you have a file you want to uuencode, then type
Now you should know what to do with something called "file.tar.Z.uu" or "file.tar.gz.uu"
The program ``uufiles'' will put a bunch of files into an automatically unpacking compressed uuencoded tarfile ready for mailing.
To reverse the process:
Don't get too carried away with fancy html tricks, at least on your top level page. You might also check that things look O.K. under a more versitile browser, such as lynx.
Note also that web servers often log the requests they receive. Ours are logged on quark in /usr/local/etc/apache/var/log/access_log. After you set up your page, you can find out if anyone else has looked at it by grepping that file. This file is rotated twice a month since it grows so fast.
"nwreconver" is a GUI interface for backup recovery. It is considerably easier to use: you can select a date using "Browse Time" under the "Change" menu and set a recovery directory under the "Options" menu. Click on all the files or directories you want, then click "Start" (and be patient).
First, you must register your computer within 30 minutes of accessing the Net while at the Lab. This is true even if on the wireless. Now normally this is no problem, because your browser will take you there anyway.
Except for Windows. Then if it is past 30 minutes on the Net, you have to call the Help desk to get them to unblock your computer. You will need your life number and MAC address for the computer. Note that the MAC address for a Windows computer is different for wireless versus ethernet.
Proxies are also peculiar. The proxy info from ITD, which is here, isn't enough, you have to manually set the proxy settings, see here.
Lastly, normally the printers show up when you try to print. Not under Windows, you have to install the drivers for the HP P4015n which we have in the coffee room, in order for the Windows machine to find it in the first place.
See Warren Siegal and Hitoshi Murayama.
DO IT! Go to "System Preferences" then "Sharing", then turn the Firewall On.
To work behind BNL's firewall with proxies, it is easiest to do the following.
Go from "System Preferences" -> "Network" -> "Location".
Click to create a "New Location", call it BNL, say.
From "Proxies" -> configure "Automatic Proxy Configuration", use "http://wpad.bnl.gov/wpad.dat".
Find your MAC Address: "Settings" -> "General" -> "About".
Set proxies: "Settings" -> "General" -> "Network" -> "WiFi"
Change "http proxy" to "Auto"
Under "URL" type http://wpad.bnl.gov/wpad.dat
The Corus network will show up as one of the available networks, and there will be a blue arrow next to it. Click this arrow at least once. It may take multiple tries.
To print from the wireless Corus network:
From "System Preferences" -> "Print and Fax", click "+" to add printer.
Choose: "IPP" printing, printer "cups.bnl.gov:631", queue "printers/lptheory-corus". This prints out in the coffee room.
To print on ethernet, giving the IP address is sufficient, "lptheory.phy.bnl.gov".
To print double sided, in "System Preferences" -> "Print and Fax" -> "Printer Setup" for this printer. Go to "Driver" -> "Select Printer Software", choose "HP LaserJet P4010 Series". Printer model is "HP LaserJet P4015". For "Collation in Printer" check "No"; For Tray 3, "500-sheet Input Tray". Most crucially: right after tray 6, check "Duplex Unit". This enables double sided printing.
To login without typing your password: you need to have a key. You may have to do this soon, or have a cryptocard. Once you set it up, though, you don't have to keep typing in your password, which is handy.
For basics, the ITD home page is pretty good, see here. It is easiest configuring a VPN, at some bother.
I find that to connect and use a web browser, I first have to set the proxies as if I am at BNL, and then connect by the VPN. The opposite order doesn't work.
There is also a good discussion on the Physics home page, here.
In Terminal, type
ssh -L 3128:192.168.1.130:3128 yourname@quark.phy.bnl.gov
which establishes the tunnel. One can then download journals, such as Nuclear Physics, while not at Brookhaven. One has to set the proxies as
Manual proxy: Http proxy: localhost
Port: 3128
To access
Go to "System Preferences" then "Network". For Airport MAC address, under "Location" then "Show: Airport", the left most bar. Your MAC address is "AirPort ID:"
For ethernet, under "Location", then "Show: Built-in Ethernet, go to right most bar, "Ethernet", your MAC address is "Ethernet ID:"
The old fashioned way to work, default is bash shell. To configure prompt and aliases, enter commands such as the following into your .profile file in your home directory:
export PS1="\w> "
alias em='emacs'
BNL no longer has a site license. Simplest thing is to get a copy from ITD, and then run the license remotely from license.itd.bnl.gov.
For example, OS X is built upon pdf, so it is much better to use pdf files than ps files. The default for opening pdf files is the Preview application, but I prefer Adobe Acrobat. To make all pdf files open with Acrobat, go to Finder, then hold down the Apple key (to the right or left of the space bar), and the letter I. This brings you to "Get Info" for that file. The fourth category down is "Open with"; you can click on that, and make all pdf files open with Adobe.
TeXShop produces nice pdf output, easy to install.
One can "Configure for External Editor" and use emacs in Terminal.
The latest version, v. 2, has a nice feature. If you use the internal editor, you can depress the Apple key (to the left or right of the space bar), and click in the pdf file. It then goes automatically to that point in the .tex file in the editor. The converse works, as well: clicking while holding down the Apple key in the editor brings one to the relevant place in the .pdf output.
To convert .ps files to .pdf, use the Preview program.
Keynote, the Apple presentation program, is a low ball version of PowerPoint.
One useful thing is to go to "System Preferences" then "International", on the first line, then "Input Menu", extreme right. Add "Character Palatte", and check "Show input menu in menu bar". Also, add Greek to the languages. When you click on "Character palatte" in the menu bar, a window pops up, with choices for mathematical characters, arrows, and the Greek alphabet.
For putting equations, LaTeXit is a nicer version of LaTeX Equation Editor. You type LaTeX into a box, it produces a .pdf file which you can drag and drop into your presentation.
To convert .ps or .eps files to .pdf, use the Preview application. Then you can directly insert into a slide, resize, etc.
DjVu reader: DjVuLibre has page numbers, search function.
Check SMART status of your hard disk: SMARTReporter
Virus checker: ClamXav Sentry.
Verify Startup Disk (some Unix thing): Onyx. Good to check before upgrades.
See which of your apps is connecting where: Little Snitch.
Computer recovery after theft: Undercover from Orbicule.
CoolBook: runs computers cooler, supposedly without affecting performance.
Feynman diagrams: Jaxodraw is the standard, pretty easy to use.
Tablet for fresstyle drawing: the Bamboo Fun tablet is relatively cheap, easy to use.
Software for freestyle drawing: Tablet Draw. Can save files as png, etc, drop them directly into Keynote.
Help with passwords: 1Password.
Help with Mac problems: Mac forums.
General Mac info: MacRumors.
Check before buying a Mac: MacRumors Buyers Guide.
Portable battery: HyperMac. Can't swap the batteries on the new Macs, even the lightest HyperMac battery doubles the life on a MacBook Air.
Civilian Lab has great cases for MacBooks, shoulder packs, etc.
System info: iStat Pro.
Check systems maintenance being done: Maintidgit.
Show Time Machine log, Time Machine Buddy.
Calculator: CalcBoard.
Pretty pictures: Rijksmuseum.
Generally, backup before installing any upgrade to the operating system. It is also a VERY good idea to run Onyx (see above) to make sure there aren't problems with the disk. If there are, you can verify permissions, and repair the disk, by booting from the installation disk.
In any case, hard drives fail, amazing they last as long as they do.
If your machine is having problems: first, backup. If you don't have one now, get an external hard drive, they are small and cheap. Time Machine is really painless, although I don't have it back up while I work, because it slows things down.
In general, a good rule of thumb when having problems is to search Google, or see MacForums above.
There are key combinations which you can use to boot up a Mac which is having problems, see Keyboard shortcuts
It is remarkably easy to connect your iPod to someone else's computer, and when it asks, "Do you want to link your iPod to this library?", type yes, and wipe your iPod. Data can be recovered by using a program such as PodSalvage.
To clean up duplicate files on my iPod, I used iDupe.
If this is a BNL machine, all software, including upgrades to the OS, should be paid for. Similarly, when I suggest below to back up on a hard drive, we will cover the cost of said hard drive.
For personal purposes, either hardware or software, of any sort: all BNL employees, including RIKEN/BNL, are entitled to purchase items, for private use, under a Federal Employee program. This is about 20% discount off stuff from Apple. See here.
If after installion Lion is