New Mac Setup, Part 1
I had to setup a new OS X system from scratch. The last time I did so was over a half-decade ago with my old laptop, and I’ve forgotten most of my global and software settings. Below are my notes associated with the new machine, including a description of problems I faced in my upgrade from Snow Leopard to Lion.
I’ve separated my content into two entries because of length. The first will cover software. The second will cover tweaks.
Technical Software
Most software on this list is free. A few installs are covered in additional details below this list.
- XCode (free): Apple integrated development environment for the OS X platform. Contains all the tools necessary for creating and compiling Mac applications. Many of the below installs (e.g. MacPorts) are dependent on the development tools provided in XCode (as of 11 Sept. 2011, version 4.1). XCode can be downloaded from Apple’s App Store for free (search for XCode). Installation notes: Even though the App Store says XCode is installed, it is not. Search for XCode Installer in spotlight and run the installation program. People have had problems with the installation if iTunes is running. If you’re having problems, check Activity Monitor (Applications → Utilities → Activity Monitor) for open processes affiliated with iTunes.
- MacPorts (free): Package manager. Install open-source, command-line or X11, software on your Mac. Similar package managers are available—see, for example, Fink and Homebrew—and all three programs work similarly. Any instructions specific to MacPorts (e.g.
sudo install) can be easily extended to Fink or Homebrew. The differences between the three package managers are outlined in a blog post by Ted Wise. There are several GUI wrappers for MacPorts for those that prefer graphics over a command-line interface, but I haven’t used them. Note that the installation of MacPorts, and likely all of the mentioned package managers, require the installation of the latest version of XCode. Installation notes: See MacPorts update notes after this list. Please select a single package manager. The simultaneous use of several (e.g. Fink and MacPorts) can cause problems. - Enthought python distribution (EPD) (free for academics): Contains python 2.5, 2.6, and 2.7 plus a complete set of scientific tools including, SciPy, NumPy, and Matplotlib. Python 3.x is not included. The academic version is free. 32bit and 64bit packages are available (although the 64bit build doesn’t include the full set of utilities). Installing the Enthought Suite is much easier than compiling the components individually. Installation: Like the official python distributions available from python.org, EPD installs as a Framework in /Library/Frameworks/Python.framework/Versions.
- MacVim (free): My favorite editor. MacVim is the native vim client for Mac OS X. If you prefer Emacs, try Carbon Emacs. Although MacVim will work after an upgrade to Lion, the 10.6 version (version 7.3, rev. 53) is buggy (problems opening multiple tabs, problems with saving files, etc.). A fresh Application install (version 7.3, rev. 61) will fix the problem and provide native Lion features like full screen.
- MacFuse (free)+ MacFusion (free): MacFuse allows you to mount 3rd-party file systems on OS X. MacFusion is the 3rd party SSH file system and GUI interface for MacFuse that allows you to view and edit remote files over an SSH connection as if they were on your own computer. The standard installation of MacFuse does not work correctly on a 64 bit Snow Leopard installation. I instead used the an unofficial distribution noted here. These two programs remain untested on Lion after my upgrade.
- R (and R64) (free): Well-respected, free, statistical software.
- MacTex LaTex Distribution (free): A complete and full LaTex distribution for OS X.
- JabRef (free): Manage your bibliography and citations. Works particularly well with LaTex documents.
- Mathematica ($$, discounts for students): Mathematics software. Great for symbolic calculations. Octave is a free alternative, but I do not have experience with the program.
- ROOT (free): A data analysis framework largely used in high-energy and nuclear physics.
- X Quartz (free): From their website: The XQuartz project is an open-source effort to develop a version of the X.org X Window System that runs on Mac OS X. Together with supporting libraries and applications, it forms the X11.app that Apple has shipped with OS X since version 10.5. XQuartz is, in general, a more up-to-date and bug-free version of Apple’s own X11. An new XQuartz install is recommended for building MacPort packages (e.g. Wine).
MacPorts Upgrade
If you bought your computer with 10.7 installed, you can ignore the text below. The following information only applies to people like me who installed MacPorts before an upgrade to 10.7. Any operating system upgrade will likely break your MacPorts installation.
Download the latest version from MacPorts, mount the dmg, and run the installer. MacPorts requires the latest version of XCode, as installed from the App Store.
After a new installation of MacPorts, try and update old packages
sudo port upgrade outdated
This upgrade process will likely fail. If so, you need to go through the processes of uninstalling and re-installing packages. The upgrade processes is outlined in the MacPorts Wiki and consists of the following steps (taken directly from their site).
- To remember which ports you have installed, save a list to file.
- Delete all installed ports
- Clean up partial builds
- Reinstall all packages you from from your installed ports file
The associated commands for these four steps are
port -qv installed > myoutputfile.txt sudo port -fp uninstall --follow-dependents installed sudo port clean all sudo port install portname +variant1 +variant2 …
+variant1, +variant2, etc. are the additional flags that can be passed to a package for additional functionality. For my zshell installation, for example
sudo port instal zsh-devel +mp_completion +dec +examples
For me, the process of migrating MacPorts was particularly frustrating. I installed coreutils with the +with_default_names variant. Coreutils usually installs its utilities with a ‘g’ prefix, i.e. ls becomes gls. +with_default_names removes the ‘g’ prefex. When I uninstalled all packages, /usr/local/bin was left with many of the essential and now broken coreutils programs like ls. I couldn’t figure out why my sudo port installations were failing. The problem: the uninstaller removed all the linked libraries for the core utilities, but did not remove the main binaries. A full suite of common unix utilities, which where overwriting the standard distribution utilities in /bin and /usr/bin because of the preference of /usr/local/bin in $PATH, were broken. MacPorts was trying to use broken Unix utilities to compile new software.
The lesson: After completing your MacPorts uninstall, check /usr/local for any orphaned packages beyond the standard port* binaries and remove them. When reinstalling coreutils, run the command without variants
sudo port install coreutils
The g-prefix utilities can be symlinked to their regular names.
for f in g*; do sudo ln -s $f ${f:1}; done
MacPorts Installs
A list of programs I’ve installed through MacPorts
- coreutils: From the gnu.org web page: “the basic file, shell and text manipulation utilities of the GNU operating system.” A coreutils install was required for a new dircolors and ls. Dircolors and GNU ls can be combined to provide extremely flexible color highlighting in bash and zsh shell environments.
- Exhuberent Ctags: Automatically tag source files for use by Vim, Emacs, and other editors. Permits quick access to file components (function definitions, classes, variables, etc.)
- ZShell: The zsh shell, a powerful alternative to bash.
- Wine: Run windows programs in OS X. Works great for small executables, less so for games. Wine is a large, complicated program. The MacPorts install will take a while and will install many, many dependencies.
- Gimp: Sophisticated Graphics editor. Free alternative to Adobe’s Photoshop. The build process took nearly three hours on a new MacBook Pro.
The corresponding MacPort commands
sudo port install coreutils sudo port install ctags sudo port install zsh-devel +mp_completion +examples +dec +pcre sudo port install wine sudo port install gimp-devel
ZSH Installation
My ZSH installation is addressed in a separate post.
Python Installation
Multiple python distributions can be installed simultaneously.
OS X provides python out of the box (installed in /usr/bin/python)—just execute python from the command line—but its recommended that one install a new Framework version (either 2.7 or 3.1) from Python.org. If you need computational or visualization packages, consider installing the Enthought Python Distribution (EPD), which bundles numpy, scipy, matplotlib, wxPython and other packages into an easy installer.
ROOT installation
Installation of ROOT is addressed in a separated post.
Productivity
Most applications on this list are free.
- Firefox (free): Browser of choice because of the numerous, high-quality extensions available, the ability to tag bookmarks, and keyword searching. Chrome, Opera, and Safari (Apple’s default browser) are also available for the Mac platform. Safari and Chrome are both native Mac applications—they support trackpad gestures, full screen mode, and all other expected OS X goodies—and therefore they may migrate to my top choice if they fold in Firefox’s additional functionality. Unfortunately, I still haven’t found an easy way to syncronize bookmarks across browsers and platforms. XMarks still does not work properly for Chrome on OS X.
- Quicksilver (free): Application launcher and much more. I use quicksilver to launch programs, perform quick calculations, and assign keyboard commands to common actions (e.g. open a Terminal and cd to the folder selected in Finder).
- Growl + GrowlMail (both free): Notification system for OS X. Presents useful and relevant information subtly without stealing focus from your work flow. Examples include snippets of incoming mail messages (with Growl Mail), the completion of uploads and downloads (through Transmit or Firefox, for example), and Twitter updates. A list of supported applications is listed on Growl’s website by category. A version for Lion will be released soon and distributed through the App Store application, but on my system the older version for Snow Leopard works well. Update: I just noticed that GrowlMail is no longer actively developed by the Growl team so that they can focus on their flagship product. The project has been moved to Google Code.
- Skim (free): PDF reader. Better than Preview for reading scientific papers. My recommendation comes with a warning. Skim does not save its markup information in the pdf data; the markup is instead saved as extended attributes. Although other Skim users can see your markup, those using other readers cannot. To include the markup with the pdf data, choose File → Export... and select “PDF with embedded notes.”
- VLC Media Player (free): Free, open source media player. Supports most file formats. Browser plugsins are available.
- Transmit ($$): FTP, SFTP, and WebDAV client. Beyond the standard upload and download capabilities of any FTP and SFTP client, Transmit now allows one to mount disks to the Finder over SFTP (similar to MacFuse and MacFusion) and can synchronize local and remote directories.
- Skype: Video conferencing and chat. Allows for screen sharing.
- Google+ Hangouts: Video conferencing and chat. Handles multiple (group) chat very well. Google Hangouts requires a Google+ account and a browser plugin. For OS X, the plugin hangs with Firefox. Use of Google Chrome is recommended.
- Dropbox (free with limited storage): Online storage. Dropbox creates a folder that is automatically synced with the cloud (~/Dropbox/). Files uploaded to the cloud can either be accessed through a browser, or by another computer with Dropbox installed.
- IStatPro (free): Monitor system attributes (temperatures, disk storage, memory usage, CPU usage, etc.) using this Dashboard widget.
- 1Password ($$): Password manager. Manages all account passwords for both programs and online sites (e.g. Facebook, Gmail, etc.). Because 1Password manages all passwords, and eliminates password memorization, the user can create custom and unique passwords for different logins, increasing online security.
- TrashMe ($$): Remove OS X applications. Applications are usually removed by dragging the application (in /Applications/) to the trash. Doing so usually leaves orphan files in /Library/, ~/Library/ and other locations that are secretly installed when the application was originally drug into /Applications. This method of dragging the application to the trash allows the application to be reinstalled without losing user data, but if you want the application completely removed, and you aren’t confortable chasing the list of folders where the application has imprinted itself, than a program like TrashMe is recommended.
Fun
- Spotify (free): Spotify music service. Play most, Western, major label songs on demand (with exceptions, e.g. the Beatles). Unlike Pandora, Spotify allows you to select the individual songs you want to listen to. Spotify is supported by ads, but with a monthly subscription, you can upgrade to service without ads and with a higher streaming bitrate.
- Reeder ($$): RSS reader.