2008-12-22

Configuring my new Macbook White

Why a Macbook?

I decided to indulge myself and get a laptop, and of course it had to be an Macbook. In practical terms Windows is really just fine, and there is more and better opensource software for Windows, but after years of working with, and being frustrated by, the awkwardness and goofiness of Microsoft and Windows, not to mention the mysteries of viruses, worms, trojans and bears, oh my, there is so much bad history between me and Windows that I just can't bring myself to buy another Windows computer ever again.  The trust has been broken, and even if Windows produced a flawless OS that spontaneously made breakfast for me every morning I would still have an atavistic reluctance to give it a try.

For me, Mac OS X just feels solid and well designed. Kind of like the difference  between American made cars and Japanese cars back in the 80s and 90s (less so today).  One feels just kind of clobbered together with lots of stuff you have to work around or learn to live with, and the other feels like a well oiled machine. Even though there are lots of practical inconveniences to using a Mac (I still haven't found a file manager I like as much as Salamander for Windows, or a text editor as good as Notepad+), most everything is so well designed and solid feeling that I am willing to forgive its shortcomings.  With Windows there is so many years of negative history between us that every little thing that goes wrong reminds me of 10 other stupid battles I fought with Microsoft over the decades and I end up seething even if its really not that big a deal in practical terms.

Why Macbook White instead of a new Macbook?

I chose a 2.4 Ghz 2.0 Gig RAM Macbook White, instead of one of the new Macbooks, because it seemed like more bang for the buck when I was comparing the various sales on Black Friday. Sure the new Macbook is sexier, but I just couldn't bring myself to pay about $200 more for a slightly less powerful machine, especially given the super glossy screen on the new Macbook (which looks brighter, but is a real pain if you have any light sources behind you).

Tricking it out

In any event, this post is really about what I did to configure my new Macbook White. There is nothing I enjoy more than customizing and tricking out a new computer so its just the way I want.  I am like those guys who spend every weekend working on their hobby hotrod that they never actually get around to driving much. Whenever my wife complains about my computer obsession I tell her she should be greatful that she doesn't have to deal with a perpetually partially disassembled Camero in the carport.

The first thing I did after getting to the desktop was let it do all the Mac software updates.

Set up link to my home file server Samba Share

Mac OS X automatically detected my home Samba fileserver.  To make it easier to access regularly I opened it up on Finder and then dragged the top level folder of the fileserver over to the bottom of the Places list on the Finder Sidebar.  Now its just one click to get to my documents on the fileserver.

In order to have the fileserver mounted automatically when I boot up I went to System Preferences -> Accounts -> Login Items, clicked the plus sign underneath the list, navigated my way to the top level documents folder on my Samba server in the File Open dialog, and hit Add, then checked the box next to the entry for it on the list of items to open automatically on log in.

Installed Firefox and copied over my existing Firefox profile

I fired up Safari, went to the Firefox site, and then downloaded and installed Firefox, since thats the browser I am used to.

I copied my Firefox profile from my regular personal computer over to my file server, then copied it from there to the Firefox profile directory on the Macbook (/Users/andy/Library/Application Support/Firefox/Profiles/xhikl3o34.default) while Firefox was shutdown, of course, and then restarted Firefox.  This gave me an exact duplicate of my existing Firefox configuration from my old computer.

Fixed the problem where you can't reliably tab between form controls in Firefox on Mac OS X

After I installed Firefox I noticed that I could no longer tab between controls on a form on a web page.  For example, I couldn't hit the tab key and get to the submit button on one form I used a lot.  I did some googling and found this post about it:

Tabbing problems in Firefox in Mac OS X

Following a tip in the comments on this page, I opened up about:config in Firefox, then right clicked on the list and selected New > Integer from the context menu, then gave accessibility.tabfocus as the name of the new Preference and gave 3 as the value.  Then I restarted Firefox and I could tab between controls on forms like I was used to.

Trimmed down and moved the Dock to the right hand side

I like an uncluttered desktop, so I got rid of almost all of the default application icons on the Dock by simply dragging them away from the Dock and letting go.  I left the icons for Finder and iTunes.  Then I used Finder to navigate to /users/Andy/Applications and dragged Firefox, Terminal, and System Preferences over to the Dock since those are the programs I use the most frequently.

It seems crazy to me to have the Dock on the bottom of the screen on a widescreen monitor on a laptop, since there is lots of horizontal real estate but vertical real estate is limited.  So I went to System Preferences -> Dock then chose Right for Position on Screen, set the Size on the small end of the scale, and set Magnification to Max. This gives me a non-3d Dock on the right hand side of the screen that doesn't take up much space. Its not as pretty, but I hate having a narrow sliver of webpage showing because 20% of the vertical space of the desktop is taken up by the Dock.

Installed Quicksilver

I hate using a mouse to navigate through tree structures, and I hate peering at long lists to find things in folders, so I am always on the lookout for tools that will let me jump to what I want by typing a few characters of the name.  A while ago Lifehacker turned my on to Quicksilver which does this for opening applications for the Mac (it does a lot more that I haven't begun to explore).  So I went to the Quicksilver homepage:

http://www.blacktree.com/

I downloaded the latest beta of Quicksilver, and then installed it. Then to make it load on startup I went into System Preferences -> Accounts -> Login Items, hit the plus sign under the list, navigated to Quicksilver in /Users/Andy/Applications, cliked Add, then checked the box for the new Quicksilver entry on the startup list.  Now, to open an application I just hit Control-Spacebar to invoke Quicksilver, start typing some of the applications name, and then hit enter when it has selected the right app (usually only takes 2-3 keystrokes).

Tweaked Finder

Finder is the thing I like least about Mac OS X, but I have worked out a number of tweaks that make it more to my liking.

I like to have the full path of the current directory showing in the title bar of Finder, so I opened up a terminal and ran this:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder

Also, I enabled the Path Bar at the bottom of the Finder window by going Finder > View > Show Path Bar.  The Path Bar at the bottom allows you to jump to anywhere in the current path.

For some reason I hate being told a file's date is "today" or "yesterday" so I turned that off by going Finder > View > Show View Options, which pops up a dialog where you can select what stuff Finder shows about files, and unchecked the "use relative dates" option. While I was in there I checked the "Calculate all sizes" option so Finder will show me the sizes of folders. Then I clicked "Use as defaults" to make these options apply to all folders.

Installed muCommander for two pane file manager

There are two things I want to be able to do when managing files that Finder doesn't do: (1) allow me to jump to a particular file name by any fragment of the name (not just the beginning), and (2) copy files from one folder to another with one keystroke instead of a lot of clicking and mousing.  I have looked around a lot, and the only file manager I have been able to find that does both on Mac OS X is the opensource muCommander. I was initially resistant to trying it because its Java based, and when you first fire it up it doesn't look very sexy, but its performance is actually pretty snappy. Another advantage from me is that it uses a lot of the Norton Commander style keyboard shortcuts that I am used to (F7 to make folder, F5 to copy, Enter to open a file, etc).

Here is the feature I like the most about muCommander. If I am in a folder with dozens of files I can just start typing some characters I think are in the file name somewhere. The letters I type show up at the bottom of the muCommander window with a little red exclamation point icon if they are not found, and a green check mark icon if they are found.  If the characters are found in a filename it jumps to the first instance, and if you then hit the up or down arrows it jumps to the previous or next instances.  I am not sure why every file manager doesn't have a feature like this.  Certainly trying to find a string of characters in a file name in a particular directory is a bit of a clickapalooza in Finder.

Set the system date format to ISO 8601

I have this thing for using ISO 8601 date format exclusively, so next stop was System Preferences -> Formats to change all the date formats.  I selected Custom for Region, then clicked customize, then went through Short, Medium, Long, and Full formats and changed them all to read 2008-11-23 by dragging and dropping the date elements.

Put the date on the Menubar

I like to have the full date (ISO 8601 of course) showing on the Menubar, so I followed this Lifehacker post by Gina showing how to do it:

Mac Tip: Display the Date on the Menubar

It looks complicated, but its really pretty easy. After I did that, I right clicked on the clock on the Menubar and selected 24 hour time, and now it says "Fri 2008-12-05 13:33" on my menubar.

Installed TinkerTool and tweaked font smoothing options

I don't like the default font smoothing choices on Mac OS X, especially when I have a non-Apple external monitor attached.  So I downloaded and installed TinkerTool which allows you to set font smoothing so that it is turned off for fonts under a certain size (with no cap on the cut-off size you set).  I set the font-smoothing size at 14 pt.

Installed and configured Synergy for running multiple computers with one keyboard and mouse

When I am at work (which is a shed off my carport) I like to have my personal computer sitting next to my work computer for my calendar, personal email, this blog, etc., and I like to control both my work computer and my personal computer with one keyboard and mouse.  A while ago I discovered this amazing opensource program called Synergy2 that works on Windows, Mac, and Linux and allows you to control any number of computers with one keyboard and mouse. Once you have it installed and configured properly on all your computers the mouse and keyboard seamlessly shift from one computer to the next when you move the cursor off the edge of one monitor in the direction of the next computer.  You can even block and copy text (not files I don't think) between the different computer desktops.  After using it for a while you almost forget that you are dealing with multiple computers; It all just seems like one big desktop.  In any event here are the Synergy2 links:

Synergy2 home page (with Windows and Linux downloads)

SynergyKM home page (Synergy for Mac)

Configuring Synergy can be very very confusing, so I am not going to cover it here, but you can use google to find help.  Once its configured it works so flawlessly I almost forget its there, so its worth struggling through the confusing configuration proces. Right now, while I am configuring my Macbook, I am temporarily using Synergy to control a Windows 2000 machine (2 monitors), and Mac Mini, and the Macbook, with one keyboard and trackball connected to the Windows machine.

Set up easy access to file systems on remote computers over SSH using MacFUSE and Macfusion

I have an Xubuntu server running on an old laptop that functions as a file server, home web server, and  print server.  I like to be able to transfer files to and from it (outside of the Samba share) quickly and easily, so I downloaded the two opensource tools necessary to mount other computer's filesystems over SSH: MacFUSE and Macfusion.

Before I proceeded with installing and configuring these programs I wanted to tell my Macbook the names of all the computers on my home network so that I would be able to work with them by name instead of IP address.  I couldn't find a way to do it without using the terminal.  So I fired up the Terminal and opened up the hosts file using the nano editor:

cd /
cd etc
sudo nano hosts

Then I just appended the names and IP addresses of all my various machines to the file, hit Ctrl-O to save it, and then Ctrl-X to exit.

MacFUSE is a Google project that provides other programs a way to mount non-native filesystems on a Mac. I don't think it can do anything by itself. Once you download it and install it you need to install some other program that has been written to work with a particular filesystem.

Macfusion is a program that uses MacFUSE to mount filesystems over SSH, and it is really slick.  I  downloaded it from the site, unzipped the app, dragged the app over to the Applications folder, and then ran it.  It said that its agent wasn't running and asked if I wanted to run it, and there was a checkbox to have the agent run at log in.   I said yes and yes and then ran Macfusion again from the Applications folder.  This brought up a cryptic blank dialog box with only a plus sign and gear icon buttons on the bottom. To add my home server I clicked the plus button, selected SSHFS (SSH filesystem), which brought up a dialog where I entered the name (see above) of the machine I wanted to connect to in both the top unlabelled box and the hosts box, and entered my password for that machine in the password field and hit enter. Then I was back at the original dialog, but now there was an entry for the machine I had just entered, with a Mount and Edit button.  I clicked Mount, but I got an error.  I suspected that the problem was that MacFUSE might not really function until after a reboot, so I just restarted the Macbook, then opened up Macfusion from Applications and tried again, and this time it mounted the SSHFS mount without problems.

But where was the mount? Macfusion just tells you the remote machine's filesystem has been mounted.  It doesn't tell you how the heck to find the mount.  It doesn't show up on your desktop, it doesn't show up on the Sidebar in Finder. Where in the world is it?

I knew from trial and error on my Mac Mini that Macfusion mounts the remote filesystem under /Volumes, but its not obvious how to get to /Volumes on Finder in its default configuration (at least I could never find a way).  What I did discover is that if you open Finder, go to Preferences -> Sidebar, then check the box for "Computer" in the Devices section, you will get a new entry under Devices in the Finder Sidebar with your machine's name. If you then click on your machine's name, you will see a folder that lists Macintosh HD, Network, and then your Macfusion SSHFS mount (and any other mounts you have going).

Once you can find your SSHFS mount point you can navigate the remote computer's filesystem using Finder, and work with its files, pretty much just the same as any other file on the Mac.  I find this really handy when I am working on PHP code on my home web server.  Just mount the web server using MacFusion, then navigate to the web root on the server and open the file using a text editor and get to work.

I did one last Macfusion tweak.  I started it up again using Quicksilver (it doesn't show up in the Dock by default), then went to Preferences and checked the box for starting the Macfusion menu item when I log in.  This puts a little icon on the Menubar for Macfusion (one you reboot), which makes mounting a remote machine's file system as easy as clicking on the Menubar icon, choosing Favorites and then clicking the name of the machine. Pretty slick.

Tweaked Terminal

Since I use the Terminal a lot I took some time to customize it since I hate the microscopic font size and appearance it uses by default.  I started up Terminal, went to Preferences, and then on the Startup tab I selected open new window with settings Homebrew. Then I went to the Settings tab and customized the font, and font size for Homebrew to my tastes. The only thing that was a little cryptic was how to make the Terminal window opaque instead of the semi-transparent default.  I discovered that if you select the Window tab under the Settings tab, and then click on the little square of color just under the Background label it brings up a dialog where you can set opacity.

Installed Plain Clip and set hot key combo to remove formatting from the clipboard

99% of the time when I copy some text from one application to another I just want the words and not the formatting.  For some odd reason the default copy and paste behavior (in both Windows and Mac) is to include the formatting.  I set up a keyboard shortcut to strip the formatting off of whatevers in the clipboard by:
  • Downloading and installing Plain Clip in the Applications folder.
  • Running it once from the Applications folder to get over the "This program was downloaded from the internet" warning.
  • Clicked on my Quicksilver Menubar icon, then selected Triggers to open up the keyboard shortcut configuration pane.
  • Hit the plus sign at the bottom of the pane to add a new trigger.
  • In the Command dialog I selected Plain Clip as the Item (first box) and Open as the Action (second box) and clicked Save.
  • Then I clicked on the Trigger field to open the Trigger dialog, and then hit my preferred key combo in the Hot Key box and then closed the pane.
  • Then to test I copied some formatted text from a web page into another application, confirmed that it was including formatting by default, then hit by defined keyboard shortcut and pasted again and confirmed that the formatting had been stripped out.
Installed VMWare Fusion and Windows XP

I have a Microsoft Access application I wrote way back in 1997 that I still use from time-to-time, plus I have a scanner that I never figured out how to get working with Mac OS X, so I purchased VMWare Fusion 2.0 from Amazon.com and a Windows XP Home OEM install disk from Newegg.com and then installed VMWare Fusion and created a Windows XP virtual machine using the install disk from Newegg.com.

Stopped by www.opensourcemac.org for the rest of the basic applications I use

www.opensourcemac.org is a great place to find all of the major opensource applications for the Mac.  What follows are the ones I downloaded and installed from this site.

Applications: Smultron for text editing

I do some PHP coding and edit various text files while messing around with my Linux machines, so I need a decent text editor (free or opensource of course).  I have tried various ones out there, and right now I am using Smultron and have been pretty happy with it so far. Its not as good as the best freeware Windows editors, but its the one for Mac that I like the best. One really nice feature is that you can choose Open Hidden from the File menu and then get a file open dialog that shows all the hidden files and directories on the Mac, which is very convenient when you are tweaking the Mac.

Applications: Installed VLC media player

A while ago I wanted to be able to start playing an internet radio stream on my Mac Mini just by going to a bookmark of the stream in Firefox.  I couldn't figure out how to get iTunes to automatically start playing the stream when I opened it in Firefox, but it worked out of the box with VLC. So, I downloaded and installed VLC on my Macbook, went to the site of my local PBS station and clicked the link to play the stream, VLC opened (after clicking through some one time only warnings about software downloaded from the internet) and the radio started playing. Nice.

Applications: Installed Burn for burning CDs and DVDs

Burn worked great for me the few times I used it on my Mac Mini so I added it to my Macbook.

Applications: Installed NeoOffice for word processing and spreadsheets

NeoOffice is OpenOffice optimized for Mac OS X.  It takes a while to load, but once its running it has worked well for me for spreadsheets and occasional Word documents.