Running Mac OS X Panther
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 StartedThis 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: EssentialsThis 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.
AppendicesThere'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.
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
That goes for my thinkpad running Linux too. I can run microsoft programs, I don't but I could, and play "fancy games." While the game collection for OSX and Linux is increasing, its usually older games. I really don't find gaming enjoyable on a laptop anyway. My powermac G5 is a nice gaming machine with the addition of a sensible mouse. Now all I need to do is wait for Doom3 and Half Life 2. By the time they come out, my one year Apple warranty will have expired.
You say in your journal that your karma needs to go up. Well, it won't with such stupid comments. Apple has created a very good OS based on Unix, and applied their GUI and usability philosophy to it.
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?
Concerning the extended desktop on iBooks:. html
http://www.rutemoeller.com/mp/ibook/supportlist_e
will do the trick (easy, safe -list of supported machines, clean). Concerning the Quicktime full-screen, previous answers are complete (buy it if you also need editing, trick it, or just use VLC as you perhaps already do on Linux).
And yes, there are differences between Linux, Windows and MacOsX and that makes some of the possible annoyance.
If you know Linux well, you'll discover some little changes, like when you switch to FreeBSD or AIX or Solaris. Basically you can (configure; make; make install;) run most of Linux tools. You'll certainly miss the multi-desktop feature (not included but some free/sharewares do the trick) and discover Expose (whaaaou).
If you know Windows well, you'll find the Finder strange at the beginning, you'll perhaps regret the latest games (situation gets better but slowly), and some advanced P2P/Ripping tools (situation gets better really fast), you'll miss the global inconsistence you got accustomed to and perhaps some keyboard tricks (like calling menus with alt-E), you'll discover new Ms Prices (Office is really expensive on Mac and stealing it is easier but still forbidden), you'll miss the graphical admin (get server tools if you like admin with windows or get some of the freewares which do that well or remember it's Unix and you can do what you want with a terminal). And of course you'll discover "major updates" with "real features" (and "price";-( every 18 months.
There are plenty of good sides of course but you seem to have heard enough of them for today...
Just remember the first week is awkward and you have to realize you need to learn new moves. Don't try a small weekend switch and get ready to spend some time at the beginning to make your new /Users (oops, not /home nor /usr) feel good.
And ask some Mac users about your precise needs and habits, they'll certainly tell you how to find a solution.
ClaudeBBG
This has been addressed in several interviews with Win Game -> Mac porting houses. It seems that while raw OpenGL performance is about the same between a Mac and a similar PC, the differences come in the game design / optimization and other libraries used. Many coding decisions made in the original game were done with the Windows / x86 crowd in mind. Even many PC "OpenGL" games still use other DirectX libraries for sound, user I/O, and other tasks. Even some very basic considerations, such as data file read-in, is done in little endian. Differences like this are almost nill in a small academic test case, but are significant in a complex game. Virtual machines, such as those used for AI in games like Quake3 are also optimized for x86.
For an example of a "pretty good" port, try the latest Mac build of UT2004. It has a few more tweaks and makes uses of a newer version of OpenAL. It's still slower than the native Windows version, but it's not too bad.
I've been meaning to ask...
With the release of FreeBSD-5.3, are we going to see userland changes? I'm curious, a lot of the core utils have been significantly updated, and I think Panther is still running mostly on 4.x's userland.
And I truly mean it. There has been so much influence from the FOSS, OSS, OSC, CIAFBINAACPHPGPG13, etc and so many features have been added that cater to my kind of work that it's not surprise that the powerbook count has been steadily rising at meetings and conferences. We had one guy left in our department that stubbornly refused to stop developing perl on his winXP laptop. We let him borrow a 12" powerbook for the weekend and he still has it. His winXP laptop is a place to sit one of those obnoxiously large-bottomed coffee pot/cups. XCode is fun stuff to play with. It was so fun we've ended up using Mac OS X for some small kiosk based products. So far we've purchased 5 Xserve RAID's for storage when we need something cheap and autonomous. They've been cheap as sin and rock solid reliable. Ich bein Impressed! (lame sealab reference) We probably aren't going to be using it for servers anytime soon. We have a pretty entrenched RHES 3.0 install and have just started to see the light at the end of the tunnel with the package management hell that naturally arises when you have UTF8 compatibility issues with Perl, a need for a version of aspell that isn't 3 fucking years old, or the ability to make a ton of custom rpm's for various things (ldap integration, sendmail customizations, etc) and not cause dependancy breakage hell.
For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
The day before Thanksgiving I bought my first Mac (a 12in Ibook 1.2 Gig, and I talked the salesperson out of a bag and an extra 256Megs of Ram)
I for one will probably not be buying this book until I need it. Thus far I have been able to install everything I need to run my Linux Apps, and have loaded Gtk2 and Gkrellm and got them running without a hitch with Fink.
It took me about 6 hours of messing around with this laptop and saying to myself "I Hate Mac OSX-nix why am I doing this to myself" untill I had some kind of breakthrough, and I'm feeling much more comfortable; don't get me wrong, I love Linux and KDE (just MHO) but if this is as stable as I'm told since all I do with a laptop is check Email, web, Light linux admin and development, this laptop is nice with great battery life and light.
I am glad that this book is available, even if there is another pussycat in the wings. I don't think I will be upgrading right away, and good resources can be hard to come by.
I wish Safari had a web spellcheck.
freetradecampus.com
I'd Tell you all my secrets but I lie about my past
Anyone who buys into the OSX being "rock solid" obviously never ran an OSX server with over 100 clients. Take NetBoot for example - great system when it works, but has a tendency to simply stop working for seemingly no reason whatsoever.
If you want examples visit the Apple support discussions and look under OSX Server.
OSX Server is definitely a feminine OS. It does what it wants when it wants with no reason or accountability. You just have to accept whatever it decides to do and attempt to work around it.
I have Linux servers, (SuSE RH, Debian) but I prefer Macs for workstations.
/Users/home/me unlike using a windows lappy.
.... I cant wait for Tiger
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/
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
Cheers
* Carthago Delenda Est *
The claim that "Since the iMac, Apple's market share has been steadily increasing, ..." is simply false.
In fiscal 1999, the first full year after the introduction of the iMac, Apple had sales of 3.5 millions computers. In fiscal 2004 they sold 3.3 millions computers. So, in terms of absolute numbers they are down. In terms of market share they are down a lot.