The UNIX toolbox on Mac OS X

Having UNIX under the hood is a new thing to the traditional Macintosh user. In the early days, UNIX was considered being user-unfriendly with a „horrid“ user interface, complicated, something for programmers and nothing a Macintosh user can make use of. Well, this is mostly true but misses a significant point: UNIX is good for programmers and programmers are good for users because they write the programs users can use.

With the advent of Mac OS X, overall program quality has increased a lot. This can primarily attributed to the object-oriented, framework-based programming environment known as Cocoa. In contrast to the old-school programmers interface („Carbon„), Cocoa ensures that programmers make good reuse of what is there and this is good for users as it ensures more consistency in how things work. But what is the role of UNIX?

UNIX is important as it is a user interface for programmers, system administrators and power users. It attracts gifted people and they love having „everything“ under control. I consider this group of people to be one of the most important groups for Apple‘s current resurrection. The high acceptance the machines have recently found in environments like universities, high-end workstation users and scientists are a sign for this as Macs have often been blocked by the tech staff because of the lack of UNIX integration.

So how can you make use of UNIX for you? If you are not too familiar with the UNIX toolbox, the Terminal program might be a strange beast. But it is actually an elegant piece of work once you get accustomed to. The programs that are installed by default are sufficient to keep you busy for a couple of months. Try editors like emacs or vi and see how different things can be. Try using pipes on the command line to see how you can create powerful text filters out of a set of small programs each designed „to do one thing well“.

UNIX is actually a word for a family of operating systems. They are similar, but not exactly the same. Bringing an application that runs on one version to another can be quite tricky. This is nothing for the novice user. If you more interested in the UNIX application area and you want to install things like The GIMP or the KDE application suite, you should make use of a package manager. A package manager is a set of tools doing the hard part: downloading the source code of the program to your machine, unpacking it, adjusting compilation parameters, compiling it to machine code, installing it. Until now, two projects have been more or less visible trying to get things to work on the Mac.

The first and most active project is called fink. Fink is actually build around a well-established system: the Debian project‘s package management system known as Advanced Package Tool (APT). This is good in many respects: first, there is a proven set of tools (apt-get etc…) that are well known to many UNIX nerds (Debian is really a bare-bones Linux distribution that mainly attracts programmers and system administrators). Second, there is a working file format for distribution of compiled binary code („.deb“ files). Third, the Debian community somehow predefines what actually gets packaged under which name and dependencies do not have to be figured out from scratch. In addition, the fink command adds a couple of other options for the trained systems operator. Actually, quite a few of my friends complained a bit about fink in the recent months because this and that didn‘t work. While I can‘t rule out that a comprehensive tool can introduce problems to your system, it is my strong belief and experience that fink is quite stable and proven and basically works as expected. Many people are working on the ports and fink is the fastest way today to get your hands on up-to-date UNIX programs.

But there is another option although it covers itself in some kind of mysterious clouds: the Darwin Ports projects. This package manager is based on the also well-established FreeBSD Ports system. As you might know, Darwin (the „UNIX core“ of Mac OS X) borrows a lot from FreeBSD and the „Userland“ (the programs you use on the command line) are in line with the current FreeBSD 5 distribution. So bringing the Ports system to Darwin is straightforward and backed by the major FreeBSD hackers of Apple. You might want to read this interview with Jordan Hubbard, long-time FreeBSD developer and now an Apple employee, on the aims of Darwin Ports.

But Darwin Ports seems to be stuck a bit. There is not much visible activity and the list of ports is still very small compared to fink‘s progress. The home page is not up-to-date and it is even more confusing to see that various cooporations have been announced (as the metapkg initiative) but nothing seems to bear any fruits so far. Even more confusing, early beta versions of Mac OS X 10.3 contained the GUI ports installer of the Darwin Ports projects but it later vanished and was not included when Panther shipped. I am sure DarwinPorts are able to make a difference once available and probably supported by Apple but so far things are a bit dizzy and I would recommend sticking to fink until further notice.

If there is any interest by the readers of this weblog, I would add more blurb on how to make use of UNIX for Macintosh power users. Let me know.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.