I recently bought a new MacBook Pro to replace my aging Macbook. If you have a recent SuperDuper backup, it is very easy to directly sync the new system to the old. My old setup was a bit of a mess, however, so I took the opportunity to do a fresh setup of all of the system settings and astronomy-related software.
The first order of business is getting rid of the default reflective dock:
defaults write com.apple.dock no-glass -boolean YES; killall Dock
Then turn on magnifying the dock and make it very small to save screen real estate. Remove all applications that you don’t use frequently from the dock (iChat, iDVD, …). They can all be accessed easily with Spotlight (⌘+Space) anyway. Add “Terminal” and “Activity Monitor” to the dock.
If you want to keep the Applications and Documents stacks in the dock, change their view mode to “list”.
Other System Preferences
Expose & Spaces: Turn on Spaces, Expose (UL – all windows, LL – Desktop, UR – start screen saver)
Security: Turn on the Firewall
Keyboard: Turn up the keyboard repeat rate and delay
Accounts: Turn off automatic login, display login options as name and password, turn off password hints
Setup BASH environment
Set up smaller terminal prompt:
PS1="\u@macBook \W$ "
Turn on Terminal colors for directories, etc.:
export CLICOLOR=1 export LSCOLORS=exfxcxdxbxegedabagacad
~/.bashrc isn’t being processed when you start a new terminal, add the following to ~
if [ -f ~/.bashrc ]; then . ~/.bashrc fi
Download and install Xcode
(Free registration required.
Run Software Update for the first time
Xcode and other things that come pre-installed (Safari) will need to be updated.
Install other useful Mac applications
NoteBook – Organization and note-taking
iWork – Use instead of MS Office
Papers – Organize scientific papers
SuperDuper – Great backup software based on rsync. You can even boot from the backup itself in the case of a hard-disk failure.
VLC – general purpose media player. Works for every media format I’ve ever tried.
EPSQuickLook Plugin – View postscript files in Quicklook
DiskInventoryX – Nice graphical display for finding out what’s taking up all of your HD space
MacPorts – Easy interface for installing UNIX applications.
To get information on a package, e.g. gv, type
port info gv.
To install a package,
sudo port install gv
Useful packages: gnuplot, bzip2, ImageMagick (convert), ghostscript, gv, cfitsio, gsl, wget, libpng
SAOImage DS9 – Display FITS files
XPA – command-line interface to DS9
LaTeXit – Generate equations for presentations (requires LaTeX installation, see below)
gfortran – Fortran compiler. This is built-in to later versions of GCC, but not the one that currently ships with new Macs
This is now relatively painless thanks to the MacTeX project. Download the most recent MacTex (2009) distribution. I turned off the GUI applications in provided by the MacTex installer, “convert” and Ghostscript. Those can be installed by hand with MacPorts.
The easiest way to get everything right is by downloading and installing STScI Python from here. This includes the most recent IRAF/STDAS versions, as well as many of the Python libraries one would need (numpy, matplotlib, scipy).
Download the full installation
stsci_iraf_intel_2.10.dmg (as of June 2010) and install from the package.
The STScI Python packages seems to require
csh, which is a bit of a pain since the Mac defaults to
bash. Put the following in
if ( -f /usr/stsci/envconfig.mac/cshrc ) source /usr/stsci/envconfig.mac/cshrc iraf
After the installation, generate a
login.cl file in
% cd ~
% mkdir iraf
% mkiraf # generate login.cl, answer other prompts
1) Download and untar the source code and user manuals.
2) Install package dependencies with MacPorts:
sudo port install fftw-3 sudo port install atlas ## Takes a while
3) Compile and install
./configure --with-threads --prefix=/opt/local --with-fftw=/opt/local/lib --with-fftw-incdir=/opt/local/include --with-atlas=/opt/local/lib --with-atlas-incdir=/opt/local/include --prefix=/usr/local make
Compiling the software with the above statement broke for me the first time around, which I resolved with the following workaround:
cd src cc -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -O3 -g -funroll-loops -fomit-frame-pointer -Wall -D_REENTRANT -MT fft.o -MD -MP -MF .deps/fft.Tpo -c -o fft.o fft.c cd .. make sudo make install
tar xzvf swarp-2.17.6.tar.gz cd swarp-2.17.6 ./configure --prefix=/usr/local make sudo make install
sudo port install jpeg sudo port install libpng sudo port install tiff tar xzvf stiff-2.1.2.tar.gz cd stiff-2.1.2 ./configure --prefix=/usr/local --with-tiff-libdir=/opt/local/lib --with-tiff-incdir=/opt/local/include --with-jpeg-libdir=/opt/local/lib make sudo make install