Slashdot Mirror


Running Mac OS X Panther

sympleko (Matthew Leingang) writes with his review of Running Mac OS X Panther, by James Duncan Davidson. "The Macintosh has come a long way in twenty-plus years. Much has been said of Mac OS X being the perfect union of a rock-solid operating system with a beautiful and functional user interface. Since the iMac, Apple's market share has been steadily increasing, and since OS X, Unix users have been making the switch. My last computer was a dual-boot box that I kept finding excuses to keep from booting to Windows. My PowerBook is literally the best of both worlds. I can run the older unix-based apps I need to for work, and use Microsoft programs and play fancy games when I want. It's also essentially two different computers. This book is about using that second computer, the workhorse behind the scenes." Read on for the rest. Running Mac OS X Panther author James Duncan Davidson pages 306 publisher O'Reilly rating 9 reviewer Matthew Leingang ISBN 0596005008 summary Managing your Mac as a unix box

The book fills a certain niche very well. It is not the missing manual to the iApps or a list of Finder tricks. It's not a primer on Unix for people used to GUIs and Macs (that's Learning Unix for Mac OS X Panther , also from O'Reilly). This book is for users who have administered a machine or network before and want to get the absolute most out of their Mac. It's also useful for connecting your Mac to a network seamlessly. But it's complicated and technical enough if you're the kind of Mac user who doesn't have the Terminal on your dock you might be intimidated. That may not include most slashdot readers, but it's worth mentioning because part of the Mac ideology is that it works beautifully with little trouble. The Unix ideology, however, is also represented: if want to tweak it, you can.

The author illustrates both interfaces to the operating system throughout the book. There are Macintosh applications to access all kinds of system information, whether it's users and groups, preferences, system logs, or services. For those who love Unix and the command line, just about anything you can do with the GUI you can do with the CLI. This makes a nice two-tiered approach to anything you'll want to do. The GUI is fast and easy to learn, but some things (particularly automated tasks) really need to be done on the command line.

The book is written well, and if you happen to be sitting next to your computer while reading it, you'll be constantly torn between the two. There are lots of things you'll want to try right away.

Part I: Getting Started

This part has a charming history of the Macintosh, from the toaster to Panther, complete with snapshots (my favorite parts of these are the disk usage indicators: System Folder: 152K in folder, 167K available.) It's fun to read and discover where on the time line you came into the fold.

Here also is a basic layout of the filesystem, containing parts used by the more Macintosh-y side and the more Unix-y side. For instance, there are several directories (um, folders) called Library; these contain information which might be in an include, share, etc, or lib directory. Better put, these contain supplemental Mac-app-related, non-user data. For Unix applications, the /usr, /var, /bin, /sbin, /etc, are all there.

Of course, there are top-level places to store things, or user-level locations for essentially the same kind of data (applications, preferences, documentation). This is the concept of filesystem domains, which additionally include network and system domains. The whole idea is to allow customization to ordinary users without giving up system integrity and preventing all users from unintentionally corrupting things.

If you haven't used the CLI on the Mac before, the author gives a basic introduction to Terminal.app. Terminal by default uses the bash shell, but there are number of ways to change that if you want. Several text editors are available for editing through the terminal, but unfortunately, the author doesn't talk much about them. True, pico is self-explanatory and vi and emacs users will already have their followers, but a little more than how to exit these programs if they start accidentally (while that's quite useful information) would have been helpful.

There's important extra structure to Mac files that can be (accidentally or intentionally) unlinked on the Unix side. There are commands like ditto, CpMac and MvMac which take care of the important stuff and do exactly what their GUI counterparts do (and more than mv and cp). Also, there's open which is the analog of double-clicking (either apps or docs), and osascript which lets you write and run AppleScript scripts on the fly. More could have been said here about the differences between Mac files and Unix files. What of the resource fork?

Part II: Essentials

This is where the book's meat is. There is first a blow-by-blow account of what happens when you turn on your Mac. If you are interested in seeing all the gory details, you can always hold down Propeller-V during startup and see the BSD diagnostics (even if you don't know what these mean, it's nice to know some progress is being made. Though I love the taste of Mac Kool-aid, I often worry what's going on while that dial is spinning). You can change how the Mac boots by updating (at your peril, as usual) the Open Firmware settings on the chip with nvram. One nice bit of customization from Bell-and-Whistle Land: the graphic shown at boot time is in /System/Library/CoreServices/SystemStarter/QuartzDisplay.bundle/Resources/BootPanel.pdf. The /etc/hostconfig file has Unix-style host configuration information, such as what services get turned on.

Creating your own startup items is relatively easy; it's a matter of putting a directory, shell script, and plist file in /Library/StartupItems. You can also customize what happens after a successful startup. You can present a login window, auto-login as a specific user, or even allow dropping down to console login.

The larger and more powerful a computer gets, the more people want or need to use it, and the more important it is to make sure each user area remains separate. At the Mac lab at which I worked during college in the early nineties, we used RevRDist to make sure every computer in the lab mirrored one with just the right software, fonts, and windows in the right place. The Mac from which we mirrored was locked in the office, not to be touched. Now there are much easier ways to do this without wasting a computer.

It's easy to create and manage users using the the Accounts preference panel. The root user exists, but is essentially not needed. The person who installs the operating system becomes an administrative user, and can bestow that privilege on other users. On the command line, all administrative tasks can be done with sudo, which requires authentication as an administrative user to run, but which contains a slight memory so that passwords don't need to be typed at every command. Although it's discouraged, you can allow the root user to log in.

With the several filesystem domains, each user can manage his or her own preferences. Each application allows access to its own preferences, or they can be taken care of from the command line with the defaults utility. GUI means it's easy to do what you want without knowing exactly what setting to change; CLI means you can automate it easily.

Another important aspect of a multi-user system is in permissions. Like in any good unix, in Mac OS X files have permissions attached to them indicating whether the owner, other users in the owner's group, or all users are allowed to see, edit, or run them. This can be managed through the Finder (with the Get Info menu command), or with the command line with chmod.

Several applications in the /Applications/Utilities folder allow you to keep track of what's running on your Mac. The author demonstrates these:

  • System Profile, which shows information about your system's hardware and software. You can use this to check out who made your hard drive and how much RAM you have. Also, every application installed in /Applications is registered here, so you can easily see what versions of which are there.
  • Console is another great utility for monitoring your applications. It collects log files from /Library/Logs, /var/log, and ~/Library/Log in a tree for browsing. You can filter views of these logs easily, making this a little more pleasant than tail -f.
  • To monitor processes themselves you can use Activity Monitor. Think of it as top on Macintosh Steroids. You can inspect processes to try and figure out what they're doing or kill them if they've stopped accepting input. For super users and developers, you can sample processes to figure out their inner workings. There is probably FMTYEWTK about processes, but it's good know it's there.
  • To terminate processes, there's the Force Quit command from the Apple menu, or you can do it through Activity Monitor, or there's good old-fashioned kill.

At the core of the Mac filesystem lies, of course, the filesystem. The Mac OS X Extended Filesystem (HFS+) is powerful yet friendly. It's case-preserving and case-insensitive. The latter means that README and Readme are the same file, but the former means that your original name for the file will be kept without enforcement of case usage. So if you want to call it ReAdMe, that's oK, too.

One of the most powerful features of HFS+ is journaling. This means every change to the file system is kept track of in the event of a system crash. This causes a slight overhead but pays benefits in automatic recovery from crashes without having to run fsck (or be scolded by your computer for its own crash). Fragmentation is also handled smartly; files smaller than 20MB are moved so as to have less than 8 fragments.

Lots of other disk-related activities are covered, including:

  • how to mount filesystems of other types, including CDs and DVDs, Apple Filing Protocol, Samba, NFS, WebDAV and FTP;
  • The Disk Utility application and its CLI cousin diskutil which do as much as you would want and more with a disk utility. You can check, repair, partition, erase and format any disks. You can even obliterate data by writing over it eight times with random data. Take that, NSA!
  • disk images, which are like 21st century tarballs. A disk image contains not only data but its own filesystem, and are mounted onto the user's filesystem just like disks. In addition, disk images can be encrypted to restrict access without a password.

Part III: Advanced Topics

The further along in the book, the less useful it gets. That speaks not the author's skill of exposition or choice of subject matter, but simply confidence in the Mac and the knowledge that I didn't need to know it. For the user administering a single machine, there's no real need to grok the inner workings of Open Directory: it just works. Printing, network services: it all just works. That's good news for Mac users. But it's also good that all this information is available if you really do want to tweak default behavior or configure something that isn't working as it should.

I talked about this book with the systems administrator in my department, and he mentioned that my statements in the previous paragraph are somewhat simplistic. According to him, it was a hard task to have public Mac workstations which mounted home directories from a central Unix computer, and allowed users to have their own preferences and user data (including Dock setups) live in their Unix accounts. Apparently the book that has all the information about networking, warts and all, hasn't been written yet. This book is as good as it gets, so far.

To summarize this part of the book: Open Directory has nothing to do with the filesystem directory. Instead, it's the central location of all authentication information. At one time Unix maintained user information in flat files such as /etc/passwd and /etc/group; with the advent of larger networks that regime has been largely replaced. Open Directory is a liaison between BSD's Pluggable Authentication Modules (PAMs) and Mac's Directory Services on the local end, and LDAP, Rendevous, Kerberos, etc., on the network end. Open Directory can talk to Active Directory as well, to allow authentication across Windows and Mac platforms. Through network (shared domain) authentication, users can log in on networked machines while their names and passwords are stored on a central server. The Directory Access Utility is the tool for this.

NetInfo is the database behind Open Directory. As usual, there are two ways to manage Netinfo information; the GUI NetInfo Manager, and nicl on the command line.

Mac OS X uses CUPS (Common Unix Printing Service) to configure and access printing. The printing chapter shows how to add and manage printers using the Printer Setup Utility, and how to customize jobs with the various settings in the standard print dialog. Like I said, though, printing is much easier than it sounds from this chapter. Rendezvous and Open Directory find the printers you're allowed to print on; you click Print and go.

Networking and network services are also covered here. The author shows not only the theory behind networking, but the settings which allow one computer on a network to find another on another network through the internet. Once this is accomplished, a number of services can be deployed, from FTP to remote login to a personal web site.

Appendices

There's some useful stuff in the back, including how to install Panther from scratch (but especially what needs to be backed up before you do so!), all those boot key combos you can never remember, and a whole list of other resources, be they books, magazines, web sites, or mailing lists.

Check out this book if you want to learn the gory details of Mac OS X's core. It's short on gimmicks but long on information.

You can purchase Running Mac OS X Panther from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page.

19 of 288 comments (clear)

  1. Is your Mac OS X Panther running? by Anonymous Coward · · Score: 5, Funny

    Then you better go catch it!

    1. Re:Is your Mac OS X Panther running? by Timesprout · · Score: 5, Funny

      Heed this advice. My OS X Panther got loose and even though the little slut was only out for one night and next thing you know I have a litter of iPods on my hands.

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    2. Re:Is your Mac OS X Panther running? by jrockway · · Score: 5, Funny

      Dude. iPods are like $300 each! Quit-yer-bitchin' and sell 'em on eBay :)

      --
      My other car is first.
    3. Re:Is your Mac OS X Panther running? by kevcol · · Score: 4, Funny

      Those things happen when you go out on Safari.

  2. Tiger is just around the corner... by WIAKywbfatw · · Score: 4, Interesting

    Tiger, the next version of the MacOS, is being polished right now. At Mac Expo London last week, Apple was giving demos of the new OS and had machines where you could get a hands-on taste of some of the new features, like video conferencing, Safari RSS, etc.

    Impressive doesn't do it justice: if it lives up to its billing then it'll be nothing short of the best desktop OS ever. And this coming from a dedicated Windows and Linux user.

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
    1. Re:Tiger is just around the corner... by fussili · · Score: 5, Informative

      Actually Video Conferencing using iChat has been around for a long while (I make use of it every day talking to relatives around the globe who although may not be the most technoliterate are easily capable of using iChat). The big difference in Tiger is that you can Video Multiconference - ie have a multi user video conference.

      The GUI displays it as a sort of black marble table affair with beautiful reflections and an elegance which is breathtaking - not to mention the fact that using the H.264 codec they can render massive resolution video feeds from 3 other users and the feed from your own iSight/DVcam.

      Check it out

  3. bn.com? by blackmonday · · Score: 4, Informative

    Allow me to save you 43% off the listed bn.com price (I hope /. at least gets a cut at that price).

    The awesome Bookpool has it for $22.75.

  4. Re:A Tiger by any other name by Anonymous Coward · · Score: 4, Funny

    What are they going to call it after Tiger? My assumption is Lion, but beyond that...I mean, Ocelot? Serval?? Bobcat???

  5. Excellent free resource... by blackmonday · · Score: 5, Informative

    Mac OS X Hints is a great free resource for those wanting to get under the hood of OS X. They have stuff like Applescripts for automation, shareware reviews, and command line stuff. Bookmark it!

    1. Re:Excellent free resource... by mirko · · Score: 4, Informative

      Also visit MacFixItand XLR8YourMac...

      --
      Trolling using another account since 2005.
  6. Max OS X is great, but... by samekt · · Score: 5, Interesting

    I am a long time PC user, dual booting Windows and Linux. Although I am not easily influenced by advertisements, Slashdot is doing a very good job convincing me to switch.

    I know that Mac OS X is a great OS. I think I know the most important advantages of switching. What is holding me back, however, is the fact that no-one is talking about the disadvantages of doing so.

    I know that there are certain applications which do not exist on Mac OS X. But I can do my research on that topic. What truly bothers me is that there might be things I do not expect to be missing, e.g. I recently learned that iBooks do not support extended desktop, or that Quicktime does not play fullscreen.

    So I have a question to y'all switchers. Are there any annoyances you encountered when switching from Windows or Linux? Something unexpected?

    1. Re:Max OS X is great, but... by kiddailey · · Score: 4, Informative


      Actually, Quicktime definitely does do fullscreen. What doesn't is the free version of Apple's Quicktime player - though for $25 US you get fullscreen and a lot more handy features.

      There are many free alternatives though -- such as, but not limited to MPlayer and VideoLAN which are two very fine players.

      As far as missing applications, I've had yet to be unable to find alternatives to what I use in the PC world, so without further specific examples, you won't get much help. In fact, even if there is a program only available for PC, VirtualPC or Remote Desktop Connection Client solves that problem completely for me.

      I've always used Win and Mac OS (since Win3.1 and OS 7 anyway) and the only major annoyance on the OS X side is when I keep hitting CONTROL+C to copy on my Mac after working on the Windows box for prolonged periods of time.

      I won't even bother to list all my annoyances with Windows :) ... IMO, it just feels like a clumsy OS in comparison.

  7. Re:Tiger by blixel · · Score: 5, Informative

    It's just a pity that this book is 1 year late.

    The book isn't a year late, the review is. I've had this book since February of this year. The date of the book is December 2003.

  8. Re:A Tiger by any other name by LurkerXXX · · Score: 4, Funny

    "Puddy-tat"

    </tweetie-bird>

  9. Re:RISC vs CISC? by TheLittleJetson · · Score: 4, Insightful

    Anyone out there with anecdotes on YellowDog vs OS X?

    I stopped running linux on my macs at work for one simple reason. Make a list of the activities you plan to do under linux, that you couldn't do under OS X. Now, make a list of things you can do under OS X and can't do under linux. Chances are, you'll end up sacrificing a bunch of features so you can simply say "I'm running linux". There's no motive.

    Hell, if you're a X11 purist you can even make it so you can toggle your OS X install between Aqua and XDarwin as your default environment. ...but once again, there's not much reason to do this as you mostly just lose functionality. Mac's have the advantage of being able to use OS X, why not do it?

  10. Re:"best of both worlds" by NeedleSurfer · · Score: 4, Insightful

    If you are a gamer, pure and hard, truly a Mac isn't the computer of choice. That's not why people use Mac or play games on them. Mac users usually want the option of running a few games, they will buy their computer for video editing, audio engineering, media content creation and management, biochemistry, genomics... that sort of thing, if it can also play games... yay!

  11. Re:RISC vs CISC? by topham · · Score: 4, Informative


    The bottleneck is OpenGL on the Mac.

    Check out www.x-plane.com and you'll see mentioned of the author having some issues with really low frame-rate on his new scenery for version 8 of X-plane. (The scenery is brutal. But it runs on a PC, and kills a Dual processor G5.).

    I looked into it a bit and it looks like Apple's implementation allocates too much memory and causes thrashing (in memory) if the Display Lists are too large. I suspect it is the same reason iD hasn't released Doom III for the Mac, simply put the current OpenGL code cannot push that much data.

  12. Linux & OS X Differences by kurt555gs · · Score: 4, Interesting

    I have Linux servers, (SuSE RH, Debian) but I prefer Macs for workstations.

    I can use Apple X11 and do the ssh -X -l root user@domain.com to work on the Linux boxen while I am inside at lan speed, and I have found NX ( http://www.nomachine.com ) for everywhere else.

    I like the OS X user interface more than I do Linux though, and I love my PowerBook.

    OS X still is close enough that I can scp -r user@domain:/stuff/ /Users/home/me unlike using a windows lappy.

    When friends of mine as if OS X is similar to linux on the comand line I just tell them.

    "It's like going to a Korean massage parlor and getting a Chinese girl. Most woul'nt know the difference"

    In any case, OS X is where I choose to spend my time .... I cant wait for Tiger

    Cheers

    --
    * Carthago Delenda Est *
  13. Re:Tiger by RdsArts · · Score: 4, Informative

    I can't remember where, but I believe during the main push for 10.3, they were touting that much of the userspace had already moved to the (then recent) 5.1 code, so I imagine this release will be no different.