Mac


I got wmii on OS X working, but it’s a pretty bad user experience. Apple’s native Quartz manager runs alongside the X11 application simultaneously, but wmii wants control of the entire screen. The result is somewhat ugly!

Click here to see the rather amusing result.

The OS X file sharing in the Finder is so beautifully designed that I just had to make our new Ubuntu file server integrate cleanly with Finder. This turned out to be a fairly painful process, without any clear documentation, so here’s a tutorial:

Background:

OS X file sharing is done with AFP (AppleTalk Filing Protocol) and Bonjour (zeroconf) style service discovery. AFP allows one Mac to connect to another’s shares, while Bonjour handles the auto-discovery of available shares.

Packages required:

netatalk - This package contains an implementation of AFP.
avahi - This package performs the Bonjour style service publishing to make it easy for other Macs to discover the share.

These packages are not in the standard distribution, so you have to enable the “universe” repository by editing /etc/apt/sources.list. This is documented here.

sudo apt-get update (update the system’s knowledge of available packages)

The standard installation of netatalk cannot handle encrypted logins, which means OS X will pop up an annoying warning about cleartext passwords. For this reason, the following instructions are provided to build and install the netatalk package from source.

sudo apt-get install devscripts (installs debuild)
apt-get source netatalk
sudo apt-get build-dep netatalk
sudo apt-get install cracklib2-dev
cd netatalk-2.0.3
DEB_BUILD_OPTIONS=ssl debuild
(no quotes)
sudo dpkg -i ../netatalk_*.deb

Configuration:

netatalk:

To share your home directories, add the following line to /etc/netatalk/AppleVolumes.default:

~ “$u - Home Directory”

To run netatalk on system startup:

cd /etc/rc2.d
ln -s ../init.d/netatalk S96netatalk

avahi:

Create a /etc/avahi/services/afpd.service file as described on this page.

   %h  _afpovertcp._tcp 548
]]-->

To run avahi on system startup:

cd /etc/rc2.d
ln -s ../init.d/avahi S97avahi

Testing

Either reboot to start the services, or run them like this:

sudo /etc/init.d/netatalk start
sudo /etc/init.d/avahi start

Now pull up your trusty Mac and try to access your home directory on the Linux box via the Network section of Finder. It should look and behave exactly like an OS X share.

Having recently made the transition to an all Macintosh household, I decided to compile this list of must haves to help my buddy Matt along:

Development:

Xcode 2.3 - Free download from Apple, it provides gcc, Interface Builder, and most of the basic GNU essentials.

iTerm - Terminal.app replacement. More feature rich, supports multiple windows and tabs, etc, etc.

TextMate - Slick lightweight text editor with features supporting every language under the sun. Customizability is its killer feature. It supports user-supplied bundle commands that allow the user to add features by scripting in their preferred language.

Python 2.4.3 - A lot of cool Mac-only Python packages are out there! Be sure to install the Universal 2.4.3 package from pythonmac.org.

ipython - Slick enhanced shell for the Python interpreter. (Requires the GNU readline library.)

Appscript - Python to Applescript bridge makes Mac scripting a breeze.

matplotlib - Matlab-like plotting package. Produce real plots without dirtying your hands on MS Excel.

Multimedia:

Handbrake - Very nice DVD => MPEG4 converter

iSquint - For making iPod video friendly movies.

MPlayer OSX - Plays just about anything.

VLC - For when MPlayer flakes out inexplicably. (Yay)

Net:

Bittorrent - Can’t live without it.

NetNewsWire - Sweet RSS/Atom fat client.

Adium - nice iChat replacement.

Fun:

Netflix Freak - Netflix fat client.

tickr for Flickr - scrolling picture collage on demand.

Compatibility:

Parallels - Cheap new VMWare competitor that allows you to run Windows in a box. That’s preferable to Boot Camp, if you ask me. Plus, this one is a real hit with wives and girlfriends because your Windows box can be removed to a closet.

Keynote - Powerpoint killer. Make killer presentations just like Jobs, and export to PPT for the losers at your job.