CrabApple Forest |

Picking The Good Ones & Crabbing About The Bad Ones

Extend Spotlight’s search capabilities to look inside ZIP files

Thursday May 8, 2008

Those used to downloading files and software intended for use on Windows-based machines know that there are a wide variety of compression formats out there. Mac users have it a bit easier - it is very rare that you will see a file intended for use with a Mac compressed using anything other than the zip formap. The main exception is that once in a while you’ll get a file with a .tgz extension, which is a compressed Unix tarball, but that’s fairly rare. The main reason for the standardization of the zip format is that it’s the format the Mac uses natively, for example when you right click on a file or folder (or a group of files and/or folders) in Finder, and choose the “Compress” option.

Ziplight icon

Compressing files saves a lot of space, but one drawback has been that you can’t use Spotlight to find the file within the archive. However, one interesing thing about Mac OS X is that you can extend its capabilities by using plugins. Bartas Technologies offers Ziplight, a freeware Spotlight importer plugin that lets you use Spotlight to find files within zip archives.

We know of only two limitations with this plugin. The first is that it only works under the Tiger or Leopard versions of OS X. The second is that Ziplight will only search the names of the files within a zip archive, not the actual contents (so you can’t search for a text string within a compressed file, for example) - it would take far too long to uncompress every file on every volume on your system, in an attempt to find the searched-for string. But if you know the file name (or a significant portion thereof), and you have installed this plugin, Spotlight should be able to find it for you.

Installing Ziplight is easy - double click on the .dmg file, agree to the license terms, then view the included “Read Me.pdf” file for installation instructions. If you’re new to the Mac you may not quite understand what they are telling you to do, so let us break it down for you. You have to drag the Ziplight plugin (the Ziplight.mdimporter file from the disk image), but since it’s a plugin and not an application, you do not drag it into your Applications directory. Instead, you drag it into a particular directory specifically intended for Spotlight plugins. Easy enough, except there are two such directories on your system - /Library/Spotlight and ~/Library/Spotlight/ (the first is off the root directory, the second off of your user home folder).

If you install the plugin in ~/Library/Spotlight/ it will only be available to you, not to any other user on your Mac. This is probably not what you want (even if you are the only user of your Mac), so we’d suggest dragging the plugin file to the /Library/Spotlight file off the system’s root folder. That will make it useable by all users on your system, plus we think it’s probably better to keep all your Spotlight plugins together in the same directory.

Note that you will need to restart your system, or at least logout and then log back in, before the plugin will become active - and after that it will take some time for Spotlight to index all your zip files. We do wish that maybe there was a way that it could take a bit more time and index the contents of those files (after all, since it’s doing it as a background task, it’s not like it’s under a time constraint) but we’ll take what we can get, and having the ability to find filenames within zip files can be downright handy at times.

There are many other available plugins that can extend the capabilities of your Mac. For example, there is a whole page of plugins that will extend the capabilities of QuickLook, which are installed in a very similar manner (they go into a different directory than the Spotlight plugins, but install just as easily). As you become more familiar with your Mac, you’ll almost certainly want to install more of these little helpers that make OS X work smarter!

Related posts


fseventer shows file system changes

Tuesday May 6, 2008

Have you ever installed a piece of software and wondered exactly what files it is dropping all over your hard drive? Unlike Windows, OS X does not have a central registry file where program preferences can be stored, so if a program needs to store preferences or data between runs, it has to put that information somewhere - sometimes in a preferences file that is easily found (and easily removed if you use one of the programs mentioned in our previous article, “Remove ALL (well, most all) of unwanted programs”), but sometimes in an obscure file that the software author wants to keep hidden for one reason or another (and that usually is not deleted if you uninstall the software).

Wouldn’t it be nice if there were a program that could watch your system and show you exactly what files are being installed? Or, perhaps you have a need to just monitor your Mac for a period of time to see what files are being accessed. That is where fseventer may help.

fseventer screenshot

The features of fseventer are listed on their web site as follows:

  • Observes filesystem changes using the same underlying API as Spotlight
  • Provides a graphical representation of the file activity
  • Example use could be to determine what files are changed via software installation, preferences, etc
  • Requires admin access & will only work on Mac OS X 10.4+ “Tiger” and “Leopard”

Basically what this does is to show you, in a graphical format, all the file activity on your system during the time you have it enabled (clicking on the button in the upper left hand corner starts and stops tracking). If you don’t like the tree view, you can view the activity in a list format.

fseventer list view

fseventer works best if you can quit all programs (other than the ones you are interested in) that may do file creation or modification during the monitoring period. For example, when we were testing it, one of our gabby friends sent us an instant message, and this caused a lot of extra file activity that was totally unrelated to the process we were trying to monitor (you would be amazed at how many temporary files certain programs create and/or access).

Also, in our opinion the tree view format can get totally out of hand (too much information!) if you let it run more than a few minutes (and it will automatically drop events once its internal buffer is full - the limit is set in the preferences). We with there were some way to exclude activity not associated with the processes we are actually interested in, but that would probably be difficult or impossible for the software authors to implement. Even so, this utility provides an interesting view of what’s happening on your Mac, and it is free to download (but the author does accept donations).

This is another tool that some folks will find very useful, while others will see no need for it at all. Those who prefer to use their geek tools from the command line may wish to take note of the “Related Links” at the bottom of the fseventer page.

Related posts


MacWorld: Changing the short username in Leopard

Monday May 5, 2008
Apple TV Freakout
Creative Commons License photo credit: Tim Dorr

One of our target audiences for this blog (though certainly not the only one) is people who have recently switched from another operating system to Mac OS X. People who came from the Windows world, especially Windows XP and earlier versions, probably didn’t pay much attention when asked to pick a short username during initial setup, and now maybe you’re sort of regretting that you didn’t pay more attention. Or, maybe you got a working Mac from a friend or relative (or worse yet, an ex-significant other), and you wish that the home directory had your name on it, not theirs. Or, perhaps it’s just that you would like a shorter short username.

Normally we might give you a walk-through on how to do this, but it turns out that there are at least three different approaches you can take to the problem, and there is an article in MacWorld that explains all of them, including the benefits and drawbacks of each approach. So, rather than reinvent the wheel, we’ll just suggest that you head over there and follow their instructions. We would usually prefer the third approach mentioned in that article, even though it’s slightly more complicated, but that’s because we’d probably want to get rid of all traces of the unwanted name.

Related posts


MacFUSE + GrabFS = Instant Screenshots

Sunday May 4, 2008
This entry is part 2 of 4 in the series Remote Hard Disk

Recently we’ve written on the subject of Screen capture programs for the Mac and also on MacFUSE. This article brings the two concepts together, to point out another, rather unique way to get screenshots on the Mac, using GrabFS: The Screenshot File System. GrabFS requires Leopard to run, and you must also have installed MacFUSE.

As the developer’s site explains:

GrabFS is a file system that shows you a live view of the window contents of currently running applications. In a GrabFS volume, folders represent running applications and image files represent instant screenshots (”grabs”) of the applications’ windows. You simply copy a file or just open it in place, and you have a screenshot. Open it again, and you have a new screenshot!

GrabFS Root Folder

At the top level of the GrabFS volume, you will see several folders—each corresponds to a running application. A folder’s name incorporates the corresponding application’s name and its BSD process identifier. …..

Don’t worry if you don’t get the part about the process identifier, it’s not really necessary to understand that to use GrabFS.

In each folder you will see one TIFF file for each onscreen window of the application. The neat thing is that these TIFF files are a current snapshot of the window as of the time you open the file.

GrabFS screenshots of Safari in Finder Cover Flow view

These screenshot “files” are, of course, read-only, but they can be opened or copied just like any other file. There are some interesting differences betwen these and regular screenshots on the Mac - for example, the Mac’s screenshot functionality usually adds a drop shadow to the screenshot, which looks nice in most cases but may not be desirable in others. GrabFS does not include the added shadow. Also, if the screen of a particular window is constantly changing, you could (if you know how) use Applescript, or perhaps an Automator workflow to copy the current screen at regular intervals. You could even copy these screenshots to another computer (might be useful for remote debugging).

This is one of those applications which some people will immediately see as quite useful, while others will never have a need for it. But if it sounds interesting to you, head on over to the developer’s page and read the full description, then if you think it might have a useful place in your software toolbox (and you have already installed MacFUSE), download and install it.

Related posts


HELP! My Mac won’t start!

Saturday May 3, 2008

Unfortunately, it happens to many Mac owners. Usually it happens after you install some piece of software, or even a software update (even one from Apple itself). Sometimes it happens for no discernible reason. You (re)boot the system, and nothing happens. Or, the bootup stalls at the Apple logo, or maybe at a blue screen (yes, there is such a thing as a “blue screen of death” on a Mac, but it’s a solid blue screen with no text!). Or maybe you get as far as the login prompt, but it just keeps looping around and asking you for your login over and over, and you know you’re entering the correct name and password.

What do you do then? If you have access to another computer, you probably go online and look for a solution. But what if your only online access is the computer that’s now refusing to boot?

My Mac Won\'t Start! A Tiny Guide.

Well, you might be in slightly better shape if you have access to this little printed guide, called My Mac Won’t Start! A Tiny Guide. It prints out on a single page, which you can cut and fold according to the instructions, and tuck away somewhere. Take it with you when you’re on the road, or keep it in a safe place at home (maybe in the sleeve with the OS X DVD).

Now, having said that, before disaster happens you might want to read up on the Mac’s “Archive and Install” installation option. This is basically a complete re-installation of OS X from your DVD, but if you have recently switched from Windows you may think that’s a pretty drastic step. Well, it is, but not the way it would be if you were reinstalling Windows. If you are careful to select “Preserve User and Network Settings” during the archive and install process, you will probably be surprised to find that when the process completes (usually after a couple of hours, give or take a bit depending on the speed of your system), everything appears to work just as it did before you had the problem. Of course, that may not be true if you had a catastrophic failure (hard drive died, for example), but otherwise it may look like you never had a problem.

Don’t be fooled, things have changed “under the hood.” You should now have Internet access (assuming you have a working ‘net connection), so the very first thing you should do is click on the Apple icon in the upper left hand corner of your screen, click on “Software Update” and install all software updates. Surprisingly, even if it was an Apple software update that appeared to cause the problem, very often after an “Archive and Install” you can go right back and get the same software update and this time it will install without a problem. The next thing you need to check is whether any firewall settings you care about are the way you want them (they get set to the default settings), and then you may need to reinstall drivers for any external devices you use, such as printers (this is not universally true - if OS X supports the device natively you’ll likely be okay, but if you had to download and install a driver then it would be best to keep the driver install package in some safe location on one of your hard drives, so you can reinstall it if you need to). If you are using any antivirus software, check to make sure that it is operating okay - it may need to be reinstalled as well.

It probably won’t take you much more than an additional hour (after the Archive and Install) to have your system up and running again. There are a few things that don’t seem to be preserved. For example, if you installed Xcode (Developer Tools) from the OS X DVD, you will probably have to do that again. But anything you have installed in your user directory, or in the Mac’s Applications directory should be preserved, along with any software keys, etc. Of course, we can’t guarantee this will be true in every single instance of an “Archive and Install”, but we remember that any time we had to reinstall Windows it took days to get the system back to the way we had it, and invariably something never would work right again, whereas with the Mac we can be 99.5% functional within about three hours of starting the “Archive and Install” process.

There are some caveats to this: Archive and install won’t work if there’s not enough room to store your existing settings and data in a temporary folder (this doesn’t require as much space as you might think, because it’s not backing up the entire drive - the last time we did an Archive and Install on an 80 GB system drive, the resulting “Previous Systems” folder was a bit under 14 GB in size. Your experience might be different, but if you try to keep at least 20% of the primary drive space unused you will probably be okay), and there are a few other considerations as well. You really should read the two web pages of documentation on the Apple web site (#1 and #2). We strongly suggest that if you have never used this option, you take a few moments to read those pages now, and perhaps even print them out, so that you will have access to them when you cannot connect to the ‘net.

Archive and Install is not something to be used lightly, but if your system just won’t boot and the cause is not a catastrophic failure, Archive and Install is often the quickest way to get your system running again, particularly if you’re not a Unix guru. It’s not exactly a “quick fix” but on the other hand, it’s a lot quicker than pouring over obscure documentation or searching through web pages for hours, trying to find another way. Ultimately it’s up to you to decide whether you want to resort to an Archive and Install, bearing in mind that it probably will break a few things, but hopefully nothing you can’t fix with several minutes’ additional effort. Whatever you decide, we wish you good luck, and remind you that the best preventative step to avoid losing important data is a good backup (which Time Machine makes ridiculously easy, so if you are using Leopard you have no excuse!)

Related posts