Tiger Raves

I know. I bitch and bitch and bitch. But there are some things I really like about Tiger. And now that I have stupid Spotlight under control, I'm in a much better frame of mind to talk about them. So I thought I'd take a minute out of my busy complaint schedule and write them down. These are really just off the top of my head.

TextEdit:One of my favorite things in Tiger is the new TextEdit application. I use this thing all the time, and they've added some small but very useful features.
• My most-used is the Lists feature, which allows you to define an outline style, very easily and intuitively, using bullets, Roman numerals, letters, numbers, and/or dashes. It's wonderful if you tend to make a lot of outlines, which I do. I had always used OmniOutlier for this in the past, but now I don't have to. Basic outline functionality is part of a bundled app that I use all the time and am very accustomed to. Cool!
• TextEdit now allows for basic creation, editing, and exporting of HTML. While I doubt I'll use this much, it's nice to know it's there.

Automator:I've gotten pretty used to writing shell scripts for most of the things I want to do. But Automator allows for a level of interaction in the GUI and applications that is difficult or impossible from the shell. Though it's basically just a user-friendly method of accessing AppleScript, I am pleased to see it. I, for one, could never quite effectively wrap my brain around the AppleScript language, either through lack of motivation, or intelligence. Right now it's a bit limited (Automator, I mean, not my brain, though the latter certainly might apply). But I'm hoping development on Automator grows and that we start to see lots and lots of available new actions, so that I'll never have to learn AppleScript. That would make Automator sweet!

Safari:The new features in Safari are subtle but nice. The best part is that the new features have not done anything much to break all the old stuff that is great about Safari.
• RSS feeds can now be read directly in the browser. I'm not a big RSS guy, but I do think the implementation is nice, and it's something that users have come to expect. I do feel, however, that if you really follow feeds, you'll probably want a specialized application for them. I mean, isn't part of the point of feeds to avoid the browser? Maybe I don't get it.
• Searching bookmarks is way cool!
• Importing/exporting bookmarks: Also way cool!
• The error messages and ensuing Network Diagnostic tool that show up when you have a connection problem are really great. I've never seen anything like this. I had some wireless problems and, until I figured out the solution, Network Diagnostics always got me back online. This is fantastic for inexperienced users, and in my experience, performed exceptionally.
• Sorry (I know this is supposed to be a rave), but I still want to be able to bookmark a group of tabs. Why is this taking so long?

Preview:The new Preview application has a few features I've really been longing for.
• Bookmarks, bookmarks, bookmarks! I read a lot of big long OSX Server (and some other) manuals. I don't know if you've ever read any of these, but they're very -- I don't know -- non-linear, for lack of a better word. That is, they give you an instruction in chapter 6 and then tell you to go to chapter 77 for more details. Chapter 77 then jumps you to chapter 42, which refers you back to chapter 6. There was never a good way to arbitrarily jump around between these chapters. These manuals always screamed out for bookmarks, and now we finally have them. Yay!
• Annotations are also pretty nifty. They allow you to write little comments and notes directly inside your PDF. The problem is that once the PDF is saved, the notes are saved permanently with it. There is no way to go back and remove or change them.
• The slideshow feature, while not really new (you could always go to "Full Screen..." mode in Panther's Preview), is vastly improved, and very nicely implemented, with a beautiful controller and lots of key controls for everything from shufflng through images to toggling between "fill screen" and native image resolution. Super nice!

UNIX:Ahhh! At long last! Some really great changes to the UNIX level. And very little removal of features.
• Finally we have UNIX commands that can handle resource forks, or as they're called in Tiger, "extended attributes." Sometimes this requires an -E flag (as in the case of scp) sometimes it doesn't (as in the case of cp). But in the end, who really cares? It's just so great to be able to finally use the shell like the other kids.
• ACLs are a new addition to Tiger's UNIX underside. Mainly for the server, they can be activated on the client version giving admins finer "granular" (my word for the week) control over permissions. Best thing is, the syntax (if not the dizzying array of combinations and hierarchies that can be achieved) is very simple and straightforward, thus reducing the fear factor and the learning curve. Pure Apple all the way. This is why I love those guys.

QuickTime 7 Pro:QuickTime 7 Pro has a few new features that kinda make you go, "Damn! It's about frickin' time, people!" As it turns out, these changes were not all that easy to make to this core piece of the OS. These are changes that, if you work with video at all, you will begin to see the benefit of, both immediately and for some time down the road. QuickTime now uses the graphics card to process (decompress) all the video in any (or all) given movie(s) that happen(s) to be playing. This opens the door to all kinds of great enhancements to the app, and to apps that use the QuickTime engine to any large degree.
• QuickTime Player 7's full screen mode and dynamic resizing are beautiful and work really, really well. The controller is also very nice, and added key commands in full-screen are simply delicious.
• QuickTime Player should now be much more capable dealing with highly compressed video during real-time playback.
• You can now export multiple videos while watching others.
• QuickTime Player now records video, albeit in a very functionally limited way (see my Tiger Beefs).

Mail:Some people love the new Mail look; some people hate it. Whatever your opinion, there are some important improvements in Apple's new Mail app.
• Finally we have the ability to tab into the all various fields of the mail browser.
• Searching is much improved: faster and more configurable.
• Smart folders for Mail are really useful. I don't really have a use for them in the Finder (and, at this point, I don't trust Spotlight with them anyway), but in Mail they really make sense and they work fairly reliably (though not without their quirks). I'm using them already to sort certain types of mail like my software licenses and my daily mail.
• You can now get a BCC field right from the message window.
• And personally, I like the new look. Panther's Mail just looks kinda silly and dated to me now.

The Finder:While the Finder is, in many regards, far more irritating than it should be (I try not to think about it, but when I read certain articles, I get pretty ticked), there are a few things about it that do, actually rock.
• The Finder now has a slideshow mode just like Preview's. Select a group of images from the FInder, control-click them and choose "Slideshow," and you're there: Full-screen slide show, with the lovely controller and the same key commands you get in Preview. Very nice. My Windows-using friends aren't laughing at me as much now, which I really enjoy.
• Sidebar menu items are, mercifully, contr ol-clickable now.
• Changes to the file system are now immediately reflected in the Finder. That is: copy something to the Desktop from the shell, and it appears without having to select the Desktop. This has been a long time coming and it's a relief to see.
• Well, that's all I can think of right now. Which is really kind of sad...
UPDATE:
• I just found one thing to love about the new Get Info: labels. You wouldn't think this would be such a cool thing to do from Get Info. Unless of course you have 100 files you want to temporarily change permissions on, label, and then revert permissions. I just had a need to do this, and being able to do it all from the Get Info window was simply wonderful.

Installer:This a weird entry, I know. But I thought there were a couple of little tweaks in the Inistaller app that were worth mentioning.
• The "Show Files" window is now searchable. Searching in this window can be quirky: If you search something that yields no results, the flip-down arrow disappears and must be reset by clearing the search field and re-entering the main window to re-flip it. Also, it's case sensitive. Still it's nice to see it there, and it's something that could be potentially very useful to admins like me who want to see what gets installed with the latest OS update. (Will this overwrite my resource-fork aware version of rsync? Wait... Doesn't matter now... But you get the point.)
• The "Show Files" window closes with command-w. Ahhh... That's much better!...

Networking:Networking has seen an improvement here and there.
• My favorite appears in the Advanced section of the Firewall portion of the Sharing pane: Stealth Mode. Apparently, Stealth Mode blocks uninvited network traffic from ever receiving an acknowledgement of your computer's existence. How all this happens, I have no idea. But it sure sounds fantastic!
• Also, now availble in the same section is Firewall logging. I do know how that works and I'm darn glad to see it.
• The Airport section of the Networking pane in Tiger has been revamped for the better. You can now set up a list of preferred networks -- both open and closed, secure or not -- for Airport to join when in range. This list was hidden and, thus, unalterable prior to Tiger. It's definitely something I've always wanted, so I'm psyched.

Help:It hasn't changed all that much, but for the sake of completeness, I do have one favorable thing to say about the Help application, and it's important.
• Help has gotten faster. Thank God!
• And, oh yeah! A little bit more helpful. (Okay, that's two.)

General:• Multiple text selections are now supported in most OS X apps. So, if I really, really want to, I can select "multiple" and "apps" and cut, copy and/or paste them to my heart's desire.
• The RSS Screen Saver is a neat idea, and well done. I would, however, like to be able to change things like the color, but whatever. I'll live.
• There really are some nice new Desktop pictures.

Conclusions:Tiger both adds and removes both some good and some bad to and/or from the Macintosh OS. Overall I've had more problems with this release than I had with Panther. But then again, I think there is much more significant stuff going on under the hood in Tiger than there was in Panther. It's a much more (possibly the most) ambitious release of OS X. But most of the ambition is happening behind the scenes. This is probably why it's been more problematic than most. Hopefully, though, it's this same ambitousness that will make Mac OS X an even greater OS than it already is. We may have to bear some bumps and bruises along the way, but my guess is it'll be worth it.

New Users in Tiger's NetInfo

When I first installed Tiger and began poking around, I noticed something, and I'd all but forgotten about it until just now. It seems, if you look in NetInfo under the "users" directory, Apple has included some new default users to the Tiger config. A couple of these stand out to me, and I can only speculate as to their meaning as regards the present and/or the future of the OS. In any case, the new users that caught my eye were: amavisd and clamav.

Hmmm... Interesting, no?...

Just a little background about these users and where they come from: amavis is a program used in spam filtering. I don't know much about it, but my understanding is that amavis works on the mail server to detect and filter spam. Apparently, amavis requires a user to run. The clamav user is required to run and operate the clamav engine, which is an open source virus detection and filtering system that I myself use, both personally and in the lab I maintain.

So what does it all mean?

Well, as I said, I'm not entirely sure. But I'll tell you what I do know. For one, Tiger Server's new mail server employs the use of both amavis and clamav for spam and virus filtering. So, without a doubt (though I've yet to get my sweaty little mitts on a copy), Tiger Server's NetInfo database will be populated with users for these programs as well. But I'm not quite clear on their purpose in the client. I'm fairly certain that, for Server's amavis and clamav to work, no client action is necessary. I could be wrong here, but I'm pretty sure these are server-side only. If that's the case, I really have to wonder about Apple's inclusion of these users on the client. I have to say that it would be really cool if Apple started integrating amavis and clamav into it's Mail client. In my use of clamav, there are certain limitaions that make it less than ideal for scanning mail, particularly the fact that clam can only scan mail after the mail has been downloaded to the client machine, rather than in transit. This means that, if clam tells you it has found a virus, said virus is actually on your computer somewhere. Another problem is that sometimes that virus you just downloaded is in an mbox folder -- the type of mailbox used by POP mail, which stores the entire contents of your mailbox in a single file. Since clam is only capable of scanning individual files, if you want to quarrantine your virus, you're going to have to quarrantine the whole mailbox. Or, worse, if you have clam automatically quarrantine viruses, you may come home to your mail client only to discover all your POP mail missing.

Ideally, clam could scan incoming mail and alert the user of viruses before they are downloaded. But this kind of behavior would probably require Apple to integrate the open source clamav into its proprietary mail client. This would be faaaantastic. We're talking free, top-notch email virus protection for you and, more importantly, for your email buddies who use Windows.

Again, I say: Faaaantastic!

How likely Apple is to do this is anybody's guess. They already provide spam filters in the Mail client that work pretty well, and these apparently do not take advantage of amavis. And running find on my system reveals no amavis or clam programs. So this is probably a lark. Still, I'm intrigued by the inclusion of these users. Maybe I'm wrong. Maybe they are needed for server integration. But I don't see how.

Until I find out more, I am going to keep hoping that at least clam virus detection, and possibly amavis spam detection, are possibilities for the future of Mail. But then, that's me: A die hard optimist at heart.

Tiger UTI Encounter

Okay, so I will bore you with the story (see previous story).

I've recently begun writing shell scripts. Just little things to make my life a bit easier or pass the time. Nothing big. Nothing complicated. But over the past few months I've written quite a few scripts, and in doing so, I've developed a working method. It's really not that interesting, but what I've done when writing scripts, to keep everything organized in a way that makes sense to me, is to start with a development folder named after the script. Versions are kept here. Each time I get to a certain point in the script where something I'm trying to do is working, I'll save it with a new version number -- usually something stunningly original, like 02, or 03, or maybe even 04. I'll also label my scripts according to their level of completeness -- yellow means "not working," orange means "working but not quite the way I'd like it," green means it's "done." Finally, I've always appended these in-progress scripts with a .sh file suffix. When I have a script that I like and want to make it double-clickable, I make a copy of it, put it in a folder of useful scripts, called, shockingly, "Useful Scripts," and change its suffix to .command. The .command suffix tells Mac OSX to open the file in Terminal and run the script while the .sh files continue to open in TextEdit (now that I've assigned them to do so using the "Get Info" panel) for quick easy editing.

Or at least they did. In Panther.

Tiger, as in many of my other workflows, has made fundamental changes to the operating system that break the original functionality to some degree, and thus break my workflow. In Tiger, text files with the .command suffix open in Terminal, but so do ones with the .sh suffix. If I change the "Open With..." application for .sh to TextEdit, using "Get Info" and apply the "Change All" option, files with the .command get changed too, though the ensuing warning message still (erroneously) states that the change will only affect files with the .sh suffix. So for some reason, Tiger is now associating .sh and .command files with the same application type -- essentially seeing them as the same types of files, which, in a way, they are. But Panther didn't do this, Panther allowed me to specify which apps opened certain types of files based on their suffix. I wanted to know what was going on, so I decided to hunt around a bit.

One of the big underlying changes in Tiger is the way it classifies files, meaning, how it answers the questions "what kind of file is this," and "in what application should I open it?" These questions have have always been been problematic, and especially so since the inception of Mac OSX. Prior to OSX, in OS9 that is, the Mac used information in the resource fork of any file to determine the file type and creator (i.e. the application that should open the file). This was usually a pretty good system, in my experience. But once OSX came along, Mac started using a combination of criteria to determine the file type and creator. Resource forks were still used, but in addition to resource forks, you could use file suffixes (like .sh and .command) to distinguish your files. This added an extra level of complexity to the association (between application and file) process, but also an extra level of flexibility: I could name two identical files with different suffixes, and then associate the suffixes with various different applications. So, I could have files with the .sh suffix open in TextEdit, and then have virtually identical (in content) files with the .command suffix open in Terminal. This was pretty nifty, I must say, and I got very used to it.

Silly me.

I should have realized that Mac OSX is still very much an evolving operating system. Apple is constantly making changes to the OS, some of them disruptive to work flows, and often (though not this one, actually) arbitrary. Each new release generally involves some kind of learning -- or maybe I should say re-learning -- curve. Key commands, for example, change all the time. (I still can't for the life of me, remember the key combo to flag an email!) It can be very frustrating. I tend to get into a way of working, and sometimes the changes made in major OS revisions drive me crazy. Then again, often they are not without purpose, and, in the end, for the better. So, I take them with a grain of salt, hold my breath, and hope.

Enter UTIs.

UTI stands for Uniform Type Identifier. With UTIs Apple is again trying to redefine the method by which files are identified and classified. From what I've read in everyone's favorite (myself included) ars technica article, they're doing so in a very smart way that should yield flexible yet accurate results and methods for both software and OS designers. The problem in the current implementation is that flexibility for the user is compromised. You see, certain UTIs and their implementation are hard coded and enforced by Apple. Software developers can write and specify their own proprietary UTIs outside of Apple's set, but type identifiers lie inside applications themselves and can't really be altered by the user. This means that, at least at this point, users have no way to associate a particular kind of file with more than one application if that specification has already been made in Apple's UTIs.

You can see where this is going, right?

So after much hunting around, reading up, and deleting of preferences and caches, I discovered (using the excellent RCDefaultApp preference pane), much to my dismay, that both .sh and .command files have a UTI defined for them. And it's the same UTI. So there is no way for the user to change the application association of one without changing the other. At least not that I could find. And I tried pretty hard. This means that this sort of association decision has been largely removed from the hands of the user and placed in the hands of developers. And now there's no way to change it. At least in OS9, if you wanted to (and I often did) you could get a resource editor and change the application association of a given file. And in Panther you could do this as well, but you had the extra option of simply changing the file suffix and making the association for all similarly suffixed files the same in the Get Info panel. Now we have a system of rigidly designed and enforced (from a user standpoint) identifiers and no way to override them for our own devious purposes, or, for that matter, for our most basic of workflows. I suppose now I'm going to have to rename all my .sh files to .txt to get back my old workflow. (Can anyone say "Automator?" Or, wait, maybe I'll just write shell script to do it. Seems more ironic.) But God only knows if, when or how the UTI for .txt will change. Or if Apple will even continue to use the UTI system.

Yes, I live in constant fear.

Tiger On Firewire Drives

So this site is turning into a Tiger blog so far. Well, what can I say? It is my latest obsession. I don't know why really. But here's another discovery:

I have a few builds of Tiger. One is on my Powerbook, and it's running just swell. I have a couple others on firewire drives, for testing and breaking. But it seems that simply having Tiger on a firewire drive can be enough to cause problems in and of itself. This may be due to the fact that I am shuffling this drive around from computer to computer. Tiger gets confused. "Where am I now?" it says.

Actually, it never says this. It never complains at all, really. It just starts acting funny. The first symptom was that my firewire Tiger install stopped searching for anything in my home account. I could search the drive that housed my home account and get accurate results. But searching "Home" resulted in nothing. Zilch. Nada. My latest glitch was that dragging files onto applications in the Dock stopped working. The app wouldn't highlight, and the file would not open in said app.

Fortunately, I seem to have found, quite by accident (a story I won't bore you with), the apparent cure-all for these apparently firewire related Tiger snafus: clear the cache. Particularly /Library/Caches. You can rename it or just delete it, but getting rid of these cache files fixed both of the aforementioned problems. And BTW, a reboot is required for the cache deletions to take effect. Just so you know.

Getting Back to (Search) Basics

NOTE: A new and improved version of this script has been posted. Please use the new version. It's way better.

First, a few brief DISCLAIMERS:
1. The information and script provided in this post will disable Spotlight indexing.
2. It will also (optionally) erase your Spotlight index.
3. This means that if you want to re-enable Spotlight indexing, you will have to wait for the index to rebuild, which can take a long time.
4. This method only disables Spotlight indexing for firewire drives that are present when the script is run. Once a firewire drive has had Spotlight disabled, it will be disabled forevermore on all systems, as the indexing status of any given volume is stored on the volume itself.
5. Finally, it has come to my attention that using this script to disable Spotlight indexing will also disable searching by "Entire Contents" in Apple's Mail app. (Searching by "From," "To," and "Subject" all work fine.) This is a major drawback for some, and less so for others, but it's something you should be aware of before you proceed to disable Spotlight indexing on your system. If you can't live without Mail searches by content, do not use the script at the end of this post.

These are the only issues I am aware of regarding this script. If you discover others, please post them in the comments section.

And away we go!

I really miss the old Panther-style, find-by-name searches. (And apparently so do a lot of people!) I use them much more than the Tiger method of searching by metadata and file content, which just returns way too many results for my tastes, generally speaking. (I mean, if you don't know the name of your file, how do you know you've found it anyway, right?)

Ideally, Apple would have (or still will, I hope) given us some options here. I think it would be best if searches from the toolbar functioned as they did in Panther (i.e. quick 'n' dirty seach-by-name-in-current-folder) or there were a preference for how toolbar searches work. Spotlight searches should function differently, based on the metadata concept. That's basically how I think it should work: two search methods; two types of results. And bring back the old Finder toolbar search. I love(d) that thing!

That said, I've spent some time researching the matter, looking for a way to get back search-by-name functionality, since, if I have to choose between one way or the other (and right now it looks like I do), I choose to search by file name. I found some tasty info on Apple's Tiger discussion forums which I will briefly outline:

1. Moving all volumes to the "Privacy" tab of Spotlight's preferences will disable Spotlight. However, you will then lose the ability to find files at all -- by name or otherwise -- in the Finder. Also, if you mount an external drive, Spotlight will try to index it until you then add it to the "Privacy" tab. Not the best solution.

2. Spotlight can be completely disabled by simply adding the line:
SPOTLIGHT=-NO-
to your /etc/hostconfig file and rebooting. This method is very thorough, it seems. Drives later added to the system will never be indexed. Spotlight won't even try. Unfortunately, this method again has the side effect of rendering all disks unsearchable from the Finder. Not what I'm looking for.

3. Enter mdutil. (And, BTW, I want to credit Ondrej Zacek from the Apple Discussions. Though the info is freely available, it was his "Finder will fall back to old behavior when searching..." comment that gave me hope. Thanks, dude, whoever you are.) Using mdutil to disable Spotlight indexing on a given volume results in Finder and Spotlight behavior I can live with. Essentially, that is, after you've disabled indexing with mdutil, you can search files in the Finder or with Spotlight, and the results returned will only be ones that include your search term in the file name. And in Spotlight searches, you still get the extra added benefit of having things sorted by type (somehow Spotlight can still identify and sort files by type, even if the search is only by name).

Now that's pretty durned cool. I have the ability to search by name (only) again, and I still get some of the usefulness of Spotlight. (And, P.S., Finder toolbar searches will also be sorted by kind. A simple window style change to list view -- or command-2 -- will get you the flat list you're used to.)

Anyway, here is the one command that will disable Spotlight on ALL your volumes:
sudo mdutil -i off / /Volumes/*

Additionally, you might want to remove the existing databases from all volumes as well, for good measure:
sudo mdutil -E / /Volumes/*

NOTE: Before you run either of these, be aware that if you want to reverse this process you can, but you will have to wait for Spotlight to reindex all your volumes again, and this can take a looong time. Also, if you add an external firewire drive, Spotlight will try to index it. Running these commands will stop it, however.

And, so, to reverse the process:
sudo mdutil -i on / /Volumes/*

A few seconds after running this, Spotlight will begin reindexing.

Finally, some scripting goodness. I wrote a simple shell script that automates all of this. It has options for both enabling and disabling Spotlight metadata searching. Feel free to use it, or modify it, to your heart's content. Ideally there would be a way to run the mdutil commands whenever a firewire drive is mounted, but I haven't tried that yet. In any case, this works really well for me at this point. Hopefully someone else will find it useful as well.

To use this script, open TextEdit (in the standard Rich Text mode, for now) copy the text below "Begin Shell Script" (starting with #!/bin/bash) into a new text file, and then convert this file to plain text (Format->Make Plain Text). Name it, save it, chmod it to 755 (open Terminal, type chmod 755 and then drag the file to the Terminal window and hit return). Finally, drag the file again into the Terminal window, hit return and follow the instructions. Also, if you want to make it double-clickably executable, give the name a .command suffix. Yum!

Hopefully Apple will give us some flexibility in how we search our files in the not-too-distant future. Until then, I'll be using my trusty script and old-world search methods in my shiny new Tiger Finder.

Hmph!

-------------------------
Begin Shell Script
-------------------------
#!/bin/bash

clear

echo "
############# DISABLE OR ENABLE SPOTLIGHT #############"

echo "
This script will enable or disable Spotlight searching
and (optionally) indexing on ALL LOCAL VOLUMES.
Panther-style finds-by-name will still function after
disabling Spotlight using this script.
"

echo "
Choose your poison...

[1] Disable Spotlight
[2] Enable Spotlight
[Ctrl-c] to Quit at any time
"
read poison

if [ $poison = 1 ]
then

echo "

####### DISABLE SPOTLIGHT ROUTINE #######"

echo "
Disabling Spotlight for all volumes...
"
sudo mdutil -i off / /Volumes/*
echo "
Would you also like to erase the Spotlight index (Y/N)?"
read index
if [ $index = y -o $index = Y ]
then
sudo mdutil -E / /Volumes/*
fi
echo "

*********************************************

Spotlight search is no longer in effect.
You may now search by file name only.

Have fun with your Tiger, Tiger.

*********************************************

"
exit 0

else
if [ $poison = 2 ]
then
echo "

####### ENABLE SPOTLIGHT ROUTINE #######"

echo "
Enabling Spotlight for all volumes...
"
sudo mdutil -i on / /Volumes/*
echo "

* ********************************************

Spotlight has been enabled on all volumes.
Indexing should begin momentarily.
It may take quite some time to complete.

Have fun with your Tiger, Tiger.

*********************************************

"

else
echo "
You did not choose from the available options.
Please rerun the script to try again.
"
fi
fi

exit 0

-------------------------
End Shell Script
-------------------------