New Laptop Setup Steps
I haven’t written about how I configure a new machine since mid-2007, so this will be both about the new setup and about how it compares to that one.
The new machine is a Mac laptop running Mountain Lion, as opposed to the Windows desktop I set up five years ago[1].
I’ll divide this into three sections: initial configuration, developer tools, and applications.
Initial Configuration
These are almost all steps that can be taken without internet access. I don’t go into account creation, but I will note that I did not associate my account with my AppleID[2]. Also, I don’t go into network configuration at all here.
Because this is a post-Lion version of OS X, this first thing I had to do was turn off “natural scrolling”:
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false[3]
After that, I:
- Auto-hid the dock:
defaults write com.apple.dock autohide -bool true
- Turned the screen resolution as far up as I could[4].
- Made Caps Lock useful[5].
- Configured Terminal[6].
- Set my default shell to Zsh:
chsh -s /bin/zsh.
- Turned down Apple’s kind offer to keep me inside their walled garden:
sudo spctl --master-disable.
- Named the machine[7].
- Set the date and time preferences[8].
- Installed the Liberation Mono font, from the free Liberation Fonts.
That’s more or less what I need to make the machine bearably usable for the steps that follow.
That’s probably about equal to the various steps I took to configure Windows five years ago, with the advantage that more of these steps are taking place on a Unix command line.
Developer Tools
Chronologically, I installed some of the applications from the next section before finishing this section. This is the stuff that’s probably not relevant to people who aren’t developers, although Apple shouldn’t tie the command line tools so tightly to XCode.
- Install XCode/CLI Tools/X11. This means getting XCode first; you need to have an Apple developer account for this, but not necessarily a paid one. You may be able to install the command line tools from within XCode, or you may have to download them separately.
Once you have them:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Get X11 from http://xquartz.macosforge.org/trac/wiki.
- The command line tools include git, and in the five years since the last article, I’ve moved even more of my configuration under version control. So, once I had git, I just cloned my various repositories and didn’t have to do much other than to point dotfiles at them.
- I configured Zsh by installing oh-my-zsh, then linking ~/.zshrc to the .zshrc file in my configuration repository, (and adding a new file to contain Zsh configuration specific to this machine) and then running source ~/.zshrc.
- Since I’m such a heavy reStructuredText user, I clearly need docutils:
sudo easy_install docutils
- Homebrew is great, so I installed that.
- I’m increasingly fond of tmux, so:
- brew install tmux
- Make symbolic link from ~/.tmux.conf to the tmux configuration in my configuration repository.
- Get the tmux paste hack from https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.
- make reattach-to-user-namespace &&
sudo cp reattach-to-user-namespace /usr/local/bin
- Test tmux copy mode to system clipboard bridge to make sure it works. (I use Ctrl-A Ctrl-Y to move the contents of the tmux clipboard to the system clipboard).
- I find pandoc extremely useful for moving between formats.
As compared to five years ago, there are more of these steps, although setting up Cygwin might well have taken longer than all of the above. OS X is a lot more Unix-friendly than Windows (obviously) and so there’s less setup required to get Unix basics going. I’ve moved even further towards file-based configuration and strong version control, so it would be quite tough for me to move back to Windows now.
The switch from Subversion to git was tricky at first, and I’m still working around the Subversion legacy of having put separate projects into overarching repositories, something that doesn’t work so well with git, but the more I work with git the more I appreciate it.
Applications
MacVim
This is probably my most important “traditional” application, competing with the browser in terms of usage. I’ve customized it quite heavily, and my setup steps for it depend on the prior cloning of my git repositories:
- Link .vimrc, .gvimrc, and .vim to the corresponding places in my repositories.
- Download latest MacVim, move MacVim.app and mvim script to /Applications.
- Turn off Lion “fullscreen” and use old fullscreen—run this from a terminal:
defaults write org.vim.MacVim MMNativeFullScreen 0
- My MacVim plugins include:
- pathogen.
- bufexplorer.
- NERDTree.
- snipMate.
- surround.vim.
- vim-indent-object.
- bclose.vim.
- sessionman.vim
I also depend on my own rest_tools and PyWordCount plugins.
Chrome
While I prefer Firefox when I can get it to run properly, I like having Chrome as well, and currently prefer unmodified Chrome to unmodified Firefox.
Quicksilver
Quicksilver is the only sensible way to launch applications if you’re not doing it from the command line.
iTerm2
iTerm2 is a better Terminal than Terminal, partly because of its superior fullscreen mode.
KeyRemap4MacBook
KR4MB is an excellent keyboard-customization tool, and I use its “simultaneous vi mode” all the time—this makes hjkl into the arrow keys while you’re holding down s and d. I also wrote my own mode to control things like volume and screen brightness while holding down a and f—and that customization is of course in a text file in a git repository.
Firefox
Still my favorite browser, although Chrome was close for a while. I now migrate my Firefox profiles over from machine to machine, which seems to work well. The most important plugin for me now is Pentadactyl, which allows browsing using Vim-like controls.
Adium
Adium is the best open-source IM client I’ve come across.
Thunderbird
I’m not using it at the moment for reasons related to some server-side problems, but it’s still my favorite mail client.
Songbird
Songbird remains my favorite music player, although this is not a space I’ve explored much.
VLC
It’s tough to beat VLC for a multi-purpose media player.
OpenOffice
This is far less important to me than it was five years ago, primarily because I do all of my writing in Vim now. However, sometimes you just have to deal with Word documents.
Skype
I don’t like the fact that this is on the list, because it’s the only proprietary piece of software I’ve come to depend on (apart from perhaps iPhoto) in the last five years. But network effects pulled me in, and I can’t see a good path off it.
[1] | For reference, the 15 steps I followed for the Windows machine were:
Although I didn’t realize it at the time, that was the last Windows machine I set up, and while I don’t rule out the possibility of setting up another in future, it would be nice to not have to deal with that. |
[2] | I probably wouldn’t have anyway, but Mat Honan’s experience gave me another reason not to. |
[3] | Or, via the UI:
|
[4] |
|
[5] |
|
[6] |
|
[7] |
|
[8] |
|
13 Aug 2012 at 01:07
Win8 4ever, sheeple fail/ aple propritory softs lol