Mac OS X configuration for software developers

Coming from Linux and FreeBSD, I initially didn’t feel comfortable working with OS X and I still think it’s a bad idea to run a full featured Web server on a Mac. But there are a couple of things you can do to turn your Mac into a great development environment.

Install the following essential software packages

Productivity Tools and IDEs

  • I strongly recommend using a JetBrains IDE such as PhpStorm, IntelliJ IDEA or PyCharm (~ 100 USD)
  • Snagit via App Store for creating nice screen shots (~ 50 USD)
  • Scroll Reverser, if you are working with a touch pad and a mouse (on a MacBook)
  • Transmit via App Store, if you need to work a lot with remote FTP, SFTP or WebDAV servers, e.g. in the printing industry (~ 50 USD)

Mouse & Touchpad

  • Get a mouse with 3 buttons – otherwise it won’t feel like a real Unix, especially if you try to copy & paste on the console. I’m very happy with the SteelSeries Sensei (~ 100 USD), but a cheap Logitech mouse for 9.99 will do as well.
  • If you also find it difficult to get used to Apple’s default mouse acceleration curve, try to install SteelSeries ExactMouse Tool (it doesn’t matter if you’re actually using a SteelSeries mouse)
  • Go to System Preferences -> Accessibility and disable “Shake mouse pointer to locate” (only applies to OS X 10.11 or later)
  • If you’re using Google Chrome, I strongly recommend disabling it’s two-finger back/forward navigation:
    defaults write com.google.Chrome.plist AppleEnableSwipeNavigateWithScrolls -bool FALSE

Terminal Settings

  • Go to Terminal -> Preferences… -> Basic and change the colors to something more pleasant than black on white (see screenshot below)
  • Create the file ~/.bash_profile and add the following lines:
    alias ll='ls -alhG'
    export PS1="[\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w\[\033[01;35m\]\[\033[00m\]]# "
    export PATH="/usr/local/bin:$PATH"
    export COPYFILE_DISABLE=true
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8

    This will add some color to your terminal and support for the ll alias (ls -alhG). COPYFILE_DISABLE prevents several of the system-supplied programs (including tar) from giving special meaning to ._* archive members.

Terminal_ColorsUI Settings

  • Move the Dock to the left hand side, so that you can use the full height of your screen for coding (Dock Preferences… -> Position on screen)
  • Go to System Preferences -> Notifications and reduce the amount of notifications as far as possible
  • Optionally: Disable all user interface animations, if you’re as easily distracted as I am

NFS & SMB Network Storage

Based on my experience, NFS works best for accessing the file systems of local virtual machines for development whereas SMB is best for regular network attached storage. If you really want to use NFS for shared network storage, be prepared to dive into the details of Unicode. Rsync users should install rsync 3 for the same reason: rsync 2 doesn’t support iconv Unicode conversion from OS X to Linux / Unix format – international characters will get corrupted otherwise.

Go to Finder -> Go -> Connect to server… to mount network drives. You can then add frequently used folders to your “Favorites” in Finder. They will be mounted on demand, whenever you access them.

It can be convenient to make the Volumes folder visible in Finder (it’s hidden by default):

sudo SetFile -a v /Volumes

You should disable the creation of Apple’s proprietary .DS_Store files on shared network volumes, if you don’t want to annoy other users:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Don’t use the autoloader (/etc/auto_*) – it only causes trouble, as I had to find out the hard way. You’re lucky, if you never heard about it. Instead, add network drives to your Login Items, if you want to mount them automatically after login:

 

Final Actions

When you’re done, don’t forget to create SSH keys and to unlock git by running it once on the command-line (it will ask you to agree to Apple’s terms and conditions).

See also

Leave a Reply