Mac OSX Tips and Tricks - Outdated (G4)

Intro:
Here are some tips and tricks for scientists (especially astronomers) making the switch from linux pc to Mac OS X. All advice is caveat emptor, not responsible for any lost data, scorched laptops, etc. This page actively under construction and suggestions welcome.
My Hardware:
powerbook 15" aluminum G4, 1.5 GHz, 1.25 GB memory (1 x 256 MB, 1 x 1GB)
Serial number: W84376QZQHY
80 GB Toshiba MK8025GAS drive
Matshita DVD-RW/CD-RW drive reads DVD+-RW
USB 2.0, Firewire 400 and 800.
Mac OS 10.3.7
Concerning Batteries:
- download xbattery from http://www.versiontracker.com/dyn/moreinfo/macosx/12649&vid=68854 and xcharge (http://www.pol-online.net/). These provide battery monitors and statistics.
11/2/04 battery is 4400 mah capacity, 2 hours to full charge, 3 hours capacity +/- 30 min
11/9/04 xbattery reports 4613 mah capacity
11/16/04 xbattery reports 4550 mah. DO NOT FULLY DISCHARGE -
Lithium ion batteries will take a hit every time you bottom-out.
To maximize lifetime, start looking for power when you go below 40%.
You should discharge fully only to calibrate the battery the first time and then once/3 months thereafter. Expected lifetime is about 2 years, maybe 3.
Getting the root password:
Many of the installation procedures described below will require the root account. By default the root account is not enabled under Mac OS X, so you'll want to get that going. Here is how: Open the Netinfo Manager in a Finder window, it can be found in /Applications/Utilities. Then choose Security -> Authenticate... from the menubar. You will be prompted to give your user password. You can then choose Security -> Enable Root User... You can then type in the information requested into the dialog box. After this you will be able to "su root" and install software, set permissions, or wreck your installation (so be careful).
Booting to single-user mode:
If you have managed to make your Mac fail to boot properly you might be able to fix it in single-user mode. To boot into single-user mode hold the command-s key down while booting and you will quickly boot to a root prompt. Only do this if you are confortable with unix.
Directories to make:
mkdir /sw/bin for unix related binaries mkdir /usr/local for installing code from source. Note: /usr/local should already exist in OS 10.4 and above.
Gain control of your keyboard:
For OS 10.4 (tiger) full control is available. For OS 10.3 (or less) download ucontrol from http://gnufoo.org/ucontrol/ucontrol.html. This utility allows you to remap caps-lock to control, implements a virtual scroll wheel on the track pad, and more.
Gain control of your tcsh:
Here is my .tcshrc file. This has a clever prompt that will show your path in the title bar of your xterm. It also has colors defined for 'ls' so that you can quickly spot directories, executables, etc.. I use a semi-transparent dark blue background (set with Terminal - Window Settings - Color). You will want to change my machine name "iroc" to whatever yours is.
Essential Packages to install:
- Xcode 1.5 (development stuff)
   Has gcc compilers, etc.

- fink (package builder) + lots of fink packages -- pick what you need
   but be sure to get things like Gimp, KDE, LaTeX, xv, etc. For example:
   ap-get install xv  gets the current release of package xv in binary
   fink install xv    downloads the source, compiles and installs
   fink remove xv     removes xv
   note that you need the unstable tree in order to get pgplot.  See
   the fink instructions about how to enable the unstable tree. If 
   you prefer GUIs you can also use the "fink commander" to install packages.
   Other useful packages:  aspell, gimp, imagemagick, tetex, ghostscript6, gv,
   pgplot (unstable tree), latex2html, gawk, mpg123, ...

-  scisoft (essential astronomy software) includes IRAF, Difmap,
  Pgplot, Xephem and many, many others.  

- DS9 for viewing FITS images and making figures. From 
http://hea-www.harvard.edu/RD/ds9/

- AIPS -- for reduction of
   astronomical data.  Use gcc 3.3.2 and compile from distribution following 
   the instructions.  Or you can download the binary distribution
   which is about 30% faster.  To get the tektronics server to work
   properly it will help to install xgterm (included with iraf in
   the scisoft package above), and then put the following into your
   .tcshrc file:
   setenv AIPS_TEK_EMULATOR xgterm
   If you want to you can store your AIPS data on DVDs
   DVD burning full disk is 8918760 blocks = 4.25 GB

- Jobserve:  For scheduling VLA observations.
Just download from NRAO and follow instructions.

- sched: For scheduling VLBA observations.
From the author, Craig Walker: "SCHED is now distributed 
in a single gzipped tar file containing all
code, examples, and catalogs.  The binaries are available separately.
The release is available from anonymous ftp at ftp.aoc.nrao.edu in
subdirectory pub/sched/sched_8.0.  The tar file is there.  The
binaries subdirectory contains machine specific subdirectories
containing the provided executables.  Note that the LINUX version is
for 32 bit machines.  The LINUX64SPICE version contains spacecraft
tracking code that will not be of interest to most people.  Many users
should find that one of the binaries works for them.  If not, it is
not difficult to recompile based on what is in the tar file.  You will
need to recompile using the makefile.  Edit Makefile.master to
configure for your machine based on the comments in the file.  Call it
Makefile and run make."  Here is the 
sched manual .

- pgplot: Graphics plotting library.  I had to use fink unstable to get pgxwin_server
            and then compile from source to get pglib.a.  Much easier is
to just install the scisoft package above in which pgplot is built 
for you.

- difmap: For reducing interferometry data.
Compiled from source no problem once pgplot was alive.

- mapplot: For making images and overlays from FITS files. 
I ported this to Mac OS 10.3, this link to see
mapplot.

- supermongo: For plotting data.  Download and compile from source.
Note that supermongo is not free and a site license is required.

- OpenOffice 1.1.2 for X11 (eventually should get aqua native version,
   but it isn't quite ready yet.)

Porting files from your old Linux box:
- ext2 filesystem support for firewire drive use: download Ext2FS_1.3 and follow installation instructions
% mount_ext2 -ordonly /dev/disk1s1 /Volumes/linux/
- network connection for Mac/Linux/Windows can be made via samba. Connect the two machines with a simple ethernet cable. Note that Macs are smart enough that a crossover cable is not necessary. Edit /etc/smb.conf on your Mac, then launch the demon with "smbd" then
% smbmount //ip.add.res.s/aips /mnt/d ; from linux box, beware 2 GB filesize limit. You can now do straight copies from your linux box to/from the Mac. To push/pull files from the mac you will have to have a samba server running on the linux box.
Backing up files between Macs
- Back up your powerbook to a desktop machine using rsync. Here is a little script that I use to run rsync to mirror my powerbook to my G5 iMac. If you want to exclude some directories you need also this file.
Keyboard
X keyboard '+' problem under X11 fixed by editing Xmodmap.
Desktop:
- Use multiple desktops. Desktop manager 0.5.3 is free (GPL) from the good folks at: http://desktopmanager.berlios.de/index.php
Display:
- DISPLAY over X11 fixed by editing /etc/sshd_config to have "X11Forwarding yes" and "X11UseLocalhost yes". Sometimes you may also want to try "ssh -X host.someplace.edu"
- focus follows mouse (at least between terminals and in X11)
  % defaults write com.apple.Terminal FocusFollowsMouse -string YES
  % defaults write com.apple.x11 wm_ffm true
USB modem:
- use of cell phone as USB modem. First you have to buy a Samsung i600 smartphone. Set phone to "external data call". Install driver (more notes on this later).
Monitor your mac on the menubar:
- CPU temperature monitor from http://www.bresink.de/osx/TemperatureMonitor.html
- watch CPU, disk, and netowrk activity with menumeters from http://www.ragingmenace.com/software/menumeters/index.html
- Outside temperature and weather from http://heat-meteo.sourceforge.net/
Things yet to get working:
- nothing! it all works.
Shopping:
- 23" apple cinema display
- bigger external drive, preferably fw800 and portable
- portable power kit for ac & car & plane ($99 from kensington)
X more memory like maybe a 1 GB memory expansion for $200 from NewEgg
    PC2700 DDR SDRAM SODIMM 1 GB.  So far this Kingmax memory 
    appears to work perfectly.
X sync with smartphone from Pocket Mac (cost is $29). Version 3.51
    actually works.
X TDK or Memorex DVD-R package of 50.
X extra battery (maybe the 4800 mah version from nupower for $149,
                 or maybe not if it can't recognize low-power level,
                 and apple battery runs 4600 mah anyway)

Now that you've discovered the future of personal computing for astronomers, check out the:

Future of VLBI in the US

In August, 2004 we completed a report on the Future of VLBI in the U.S.. This report is available from the VLBI Future web page or download it directly from this pdf file.

Last Modified on 2005 October 19

Greg Taylor Phone: (505) 835-7237; FAX: (505) 835-7027