Back to the Mac: OS X Is Unix

Over the last several months, the home network has fallen into something of a state of disarray. The OpenBSD file server was rooted with an ssh exploit sometime ago resulting in random outbound IRC connections, and the OpenBSD router forwarded its last packet some weeks ago due to a barrage of software and hardware issues.Mac Metamorphosis

Editor’s note: From September 1999 through March 2001, Eric DeStefano shared his story of migrating from Windows to what we now call the Classic Mac OS, his side treks into BeOS, and his growing love for Linux and Unix. The last of those articles was published the very month that Mac OS X 10.0 Cheetah shipped. This article was written while Mac OS X 10.2 Jaguar was current and 10.3 Panther was just a few months off. Rereading this article and checking links shows just what a *nix geek Eric had become over two years – and how beautifully that worked with Mac OS X, which is built upon a foundation of BSD Unix. dk

On the desktop front is a half-tweaked install of Slackware Linux 8.1 and a Windows XP box for gaming that blew its hard drive three weeks ago. Finally, it was determined in some comic-like fashion, as the perfect top off, for my 10/100 switch to eat itself, only to be replaced with a spare 10Base-T hub.

My first impulse was just to renovate everything around the model I had created above that consisted of four full-time machines. However, I am growing tired of maintaining four machines, which led to my environment collapsing. It’s fun at first, and even for a while after that, but it’s hard to maintain a life and update three out of four boxes every time a new daemon exploit is out.

I wanted to consolidate my environment to a more all in one solution, having my Unix/Window Maker environment available, secure access to my files, and some bells and whistles here and there on the A/V front. With what I was trying to accomplish, and after some thought, only three solutions made sense for what I was going for.

  • 3.06 GHz P4: Slackware Linux 8.1/Window Maker 0.80/VMware 3.2 running Windows XP
  • 3.06 GHz P4: Windows XP with VMware 3.2 running Slackware Linux 8.1/Window Maker 0.80.
  • Power Mac G4 1.25 GHz dual: OS X/X11/Virtual PC

The first option has become my usual choice for new setups for the last couple of years. It’s secure; runs my favorite (and best) Window Manager ever made, Window Maker (; and gives me my Windows fix when I need it. The problem is that I lose a lot of the gaming-A/V environment most due to drivers from video chipset makers.

Second up, we have the same thing reversed. Solid gaming with good drivers, get my Unix/Window Maker thing on and get to do my A/V stuff. The security thing is an issue, but it can be corrected with a little effort, leaving my main problem with this kind of setup being housing Linux on top of Windows from a file system point of view.

Mirror Drive Door Power Mac G4And lastly, the Apple option. I had given this a great amount of thought and decided against it mostly on price. However, with the recent announcement of the Power Mac G5, prices on G4s have dropped to budget-conscious numbers ($1,599).

I decided to go with the Apple. It has continued to surprise me with how well it integrates with my custom Unix environment, and it allows me to continue extending it. The only upgrades that needed to be done right away were memory (256 MB to 1024 MB) and video (see below).


It all starts with the proper UI, where (much to my dismay) Apple and I seem to disagree strongly. The first task was to create a respectable UI for myself that would properly take advantage of my dual 19″ displays running at 1280 x 1024 resolution.

I decided to take advantage of the features that the Apple Aqua interface had to offer, which just involved hard coding the Finder to column view and loading up all the backgrounds I have been using for several years to rotate every minute (courtesy of

Next was installing Apple’s X11 and X11 SDK package. Setup was effortless – double click, enter the password, install.

Lastly was obtaining and installing Fink ( Fink comes in package format and installs like any other OS X app. Once the Fink package was installed, I proceeded to get Window Maker up and running. In the terminal, typing “fink install windowmaker” did the job. A large amount of compiling later, and I had Window Maker. The only mods that needed to be made was my .xinitrc file (X windows preferences file) to insert “xset -b” to stop that blasted beep sound from happening every time I make a typo.

As my primary display is an LCD, I assigned OS X’s primary display to be the CRT to my right. The main reasons for this are that X11/GTK applications just look better on a DVI connected LCD, and DVDs look better on a CRT. Mix that in with Apple’s DVD Player not being able to display DVDs on the secondary display.


Now with Window Maker going, all that really needed to be installed was bash (fink install bash) and edit my .cshrc file to bring bash up every time I loaded an xterm.

As Mac OS X is built on FreeBSD, getting around the environment is fairly simple to those who really customize their BSD environments. Once I had my xterm and bash shell, I felt right at home working with all the various system scripts, customizing them to my needs.


As the TCP/IP stack is quite robust and having gigabit ethernet, I couldn’t feel better about network performance. Mac OS X has yet to give me an issue with dealing with anything on a command line interface level when I want to override any of the GUI preferences.

In addition, the syntaxes for all the usual network apps (ping, traceroute, telnet, etc.) conform to the usual standards, leaving the superuser level syntax (route, ifconfig, etc.) as I have always used it with any BSD, without adding their own options or changing various flags.

Netinfo also appears to stay well out the way when working with basic network configuration files, and scripts.



I have some 300 CDs that I have ripped over the years and somewhere around 60 DVDs. There is always something running on my main machine that is A/V like, which all runs directly to an external Sony receiver.

Not really needing an EQ with my Sony receiver, iTunes sounds just as good as anything else, so long as it will play my MP3s. This did not turn out to be the case, though, as I just can’t get used to iTunes’ output audio codec. I am just too used to having esound’s output codec through XMMS, which led me to run “fink install xmms”.

Using XMMS, my MP3s now sound proper to me, as they have on any other system running XMMS.


Going with Apple’s DVD Player was the logical first choice and still remains my first choice. On Linux/BSD, I am used to using Ogle ( as my DVD player, which plays DVDs very well.

The video does look far superior to my Ogle install and didn’t skip once when I was compiling XMMS, installing Windows XP Professional in Virtual PC, and having an IRC conversation and an AIM conversation at once with both CPU’s completely maxed. It just needs to be more responsive when the user interacts with it.



Security can exist on many different levels, but what it really comes down to is networking and file security. Securing files and the systems is like working in any other Unix environment with the usual chown, chgrp, and chmod utilities functioning normally.

When it comes to the networking level, I love the firewall tab built into the Sharing section of System Preferences. Mac OS X uses FreeBSD’s default firewall, IPFW, which I could never stand, as I always found its syntax too much of a pain compared to OpenBSD PF. The GUI interface for configuring IPFW is perfect and allows me to use it rather than the command line IPFW commands (ipfw add deny ip from $hackerfool to any in). As root, you can interact with IPFW and add/remove/modify any rules you want to.


Not only is it important to keep files secure but also to be able to get to them remotely. This involved looking for and attempting to build a secure VPN (Virtual Private Network) that uses 128-168 bit encryption, is Unix based, runs on multiple platforms, works with NAT (Network Address Translation), port forwards packets, and compiles on OS X.

Enter OpenVPN (, which compiles and runs on Mac OS X, OpenBSD, FreeBSD, NetBSD, and Linux. After compiling, writing the config files, and port forwarding a UDP port from my router at home to the Mac, it worked on the first shot.

Mac OS X support is currently considered experimental by OpenVPN, but it continues to work flawlessly.


Gaming needs some work in regards to dual displays. The game (or OS) doesn’t lock the window borders, allowing you to scroll over to the other display. Apple is aware of it and says they are working on it – Bug ID #3002970.

Performance is okay with the stock ATI Radeon 9000, but bearing in mind that good resolution, bit-depth, and frame rate are important, I swapped the 9000 for the faster 3D rendering ATI Radeon 8500. I really wanted the Radeon 9700, but I decided to wait another six months before investing US$300 in a video card.

keywords: #macosx #unix #linux #bsd