The lazy physicist's
Conversion from Linux to Mac OS X
Initial steps
This describes the initial setup I usually use for a new MacBook, when I'm not migrating my software from a previous installation.
Start your precious virgin Apple device, run through the initial setup. Then install
- Compilers: GNU compilers via brew, Intel compilers. The XCode Command Line Tools Package is a prerequisite for that. It is a small self-contained package available for download separately from Xcode App in MacOS. Since the location and details changes you'll have to Goolge that.
- TextWrangler/BBedit, Apple Keynote, Pages, Numbers (via AppStore).
- The GNU package manager for macOS Homebrew.
- Mozilla's Firefox, Google Chrome, if you prefer it over MacOSX's Safari
- MacTeX, the official TeX Live distribution from CTAN.
You might want to consider installing the smaller MacTeXtras package and then install additional components via the included TeX Live Utility. Just make sure LaTeXit (utility to use LaTeX expressions in, e.g., Keynote), and TeXshop (excellent editor and previewer for TeX) are included.
- LaTeXit!, for TeX expressions in Keynote and graphics programs.
- Adobe Reader. While I preferably use the built-in MacOSX's Preview, you will need it at some point as it is still THE standard.
- Microsoft Office, Libre Office (was: OpenOffice, which is still around under licence, though).
- Adobe Illustrator.
Once homebrew is installed, get some of the everyday tools via brew install [package] (some of them are installed by default):
- pyenv (Python version management), python + matplotlib + scipy + ...
- bzip2 (Block-sorting file compressor).
- coreutils (GNU flavoured basic commands).
- epstool (Utility to manipulate EPS files).
- gnuplot (Command-driven interactive plotting program).
- grace (a.k.a. XMGrace).
- grep (Search text files for patterns).
- gv (X11 interface for ghostscript interpreter).
- gzip (File-compression program).
- lynx (Console based web browser).
- tar (Archiving program for files and tape).
- unrar (RAR archive decoder).
- unzip (Decompression compatible with pkunzip).
- wget (Automatic web site retriever (SSL)).
This should give you a fairly usable system. Install additional components as needed.
Extended FS and other filesystems under Mac OS X
NOTE: these are not available for MacOSX 10.8+
Here is a MAJOR flaw in Mac OS X: the kernel simply does not support the ext2
filesystem (FYI ext3 is just a journaled ext2), nor NTFS. Open source
development seized to progress for several years now. Although projects like
ext2fsx reached a status where read/write operations on ext2 filesystems
are possibble, they are still very buggy and I don't trust them
enough to let them tamper with my data. Here Paragon extfs-mac is your best choice.
- ext2fsx - OpenSource drivers, experimental rw-support. A moreless dead project.
- macfuse - a Filesystem in Userspace (FUSE) framework.
Ext2 layers for FUSE
- ext2fuse - with experimental rw-support. A moreless dead project.
- fuse-ext2 - with experimental rw-support. In development - I hope this project will continue.
- Paragon extfs-mac - (affordable) commercial drivers which seem to work flawlessly.
Keys and Keyboardshortcuts
I was used to the unsurpassed IBM Thinkpad keyboard which has all the keys and the same layout as a regulard pc-keyboard. The MacBook keyboards
are missing the pageup/pagedown, home/end and insert/delete key block.
- fn + cursor / shift + cursor - depending on the application these key combinations stand for pageup/pagedown, home/end.
- ctrl + a - jump to beginning of line (depending on the application).
- ctrl + e - jump to beginning of line (depending on the application).
- fn + backspace - delete to the right.
- cmd + shift + double-click - select whole paths/filenames including the extensions in Terminal.app
- cmd + space - shortcut to Spotlight. Use that for a quick calcuator: just type, e.g., cmd + space, 2*sqrt(3) and the search results will include the result.
- cmd + shift + h - opens your home folder in Finder.
- cmd + tab - cycle through running applications.
- cmd + ~ - cycle through windows of the current applications.
Shell tips
- Mac OS X seems to look only for .bash_profile so you need to link to .bashrc: ln -s ~/.bash_profile ~/.bashrc
- You can open Mac applications via full path to the executable or just invoke open -a ApplicationName from the shell
- Associated extensions will be open with the default application, e.g., use open README.txt from the shell.
- A nice extra is the say-command. In a shell just invoke say Hello world
Cut and paste from/to X11
X11 uses a two instances of clipboards (primary and secondary, select and
copy, respectively), MacOSX's X-server just one. And transfer of data between these
three is not always guaranteed. The default X11-server installed in Mac OS 10.5.7 (Leopard) is Xquartz. Install the localization updates
from 2009/5/28 mentioned at xquartz.macosforge.org
to enable almost flawless cut and paste between X11 and MacOSX.
Fortran compilers
Intel Fortran compiler ifort
NOTE: Non-commercial licenses have been discontinued as of mid 2014
Where ifort is available for Linux as a non-commercial-software-download
ifort for MacOSX is NOT. Fortunately there are academic licenses and the student-price for the
Intel Software Development Suite Student Edition for Mac OS* X (including Intel C++ Compiler, Intel Fortran Compiler, Intel MKL, ...) is at affordable 49USD (one year, renewal required).
Note, on Mac there is an extra flag for optimized code available:
-m64.
More on Mac OS X
Mac OS X Hints
Mac OS X Hints - great website wher you can find tips and help.
Mac OS X internals
How the bootstrapping of Mac OS X works and more detailed information can be
found on http://osxbook.com.
The website contains supllementary material to the book Mac OS X internals
by Amit Singh. If you are interested in the processes behind the Mac OS X shiny
surface, I recommend both, the book and the website.
MacResearch.org
On MacResearch.org you can find articles, tutorials (AppleScript, Droplets, ...) and a collection of
scipts. A thing you might be interested in is THIS.
HPC Mac OS X
hpc.sourceforge.net is a website dedicated to
numerical scientists running Mac OS with binaries, source, documentation and instructions to
install Fortran, MPI, OpenMP, Octave, GDL, Cactus, Globus, RNPL, GRAVSIM and Xmgr Grace.
Note that many of these programs can also be installed via Fink!