MacDevCenter    
 Published on MacDevCenter (http://www.macdevcenter.com/)
 See this if you're having trouble printing code examples


Introducing Google Desktop for Mac

by Giles Turnbull
04/09/2007

Google Desktop for Mac has been some time coming, a long way behind its sister app for Windows. But now it's arrived, so let's take a good look around the OS X version and see what's inside.

Installing Google Desktop for Mac

Google Desktop (or GDesktop, as we'll call it from now on), is not installed like any application you've installed before. (Figure 1 shows the installer at work.) The first thing to arrive is Google Updater, a completely separate app that acts as a manager for GDesktop and any other Google-provided software you may have installed (such as Google Earth).

The installer at work

Figure 1. The installer at work

Updater does what you'd expect. It downloads the GDesktop code, unpacks it, and installs a bunch of files in various places around the system (full details of what goes where are uncovered and explained by John Gruber).

The end result is a Google Desktop.app in your Applications folder, along with another Google Desktop.app in /Library/Application Support/Google. There's also a prefpane added to /Library/PreferencePanes/, which is where you manage GDesktop's behaviors.

Removing GDesktop from your system is not as simple as dragging the application to the Trash. Instead, you will first have to open Google Updater and use the Uninstall button there. None of this is typical for a Mac application, but none of it is terribly hard to remember either.

Once installed, GDesktop gets straight to work indexing your hard disk. This can take a long time. My moderately full 80GB hard disk took nearly two hours, but some people with huge disks and millions more files have reported significantly longer times (see TidBITS' initial report for examples). It's advisable to start this process and go do something else--like sleep overnight--while it works.

This process creates indexes. Each user account gets one at ~/Library/Application Support/Google/Google Desktop/Index. There's also a system-wide index at /Library/Google/Google Desktop/Index. Inside each of these Index folders is another folder with a name comprised of a random string. This folder is owned by root. More on this in a moment.

When it is complete, GDesktop shows a friendly welcome message to introduce new users to the basics, as shown in Figure 2.

First look at Google Desktop

Figure 2. First look at Google Desktop

One of the more controversial aspects of the installation is the use of an Input Manager, made more so because users are not warned in advance of its use. Many readers will already be familiar with the arguments against the unexpected or silent use of Input Managers, which we shall not repeat here. Suffice it to say, they remain controversial. And their future is by no means clear--rumors suggesting that use of Input Managers will be banned, or restricted, in Leopard have been circulating for some time now.

GDesktop grants itself high-level permissions and installs files for all users of the computer whether they want it to or not.

Why did Google build it this way? I think this question is answered by this quote from Mike Pinkerton's announcement on the Official Google Mac Blog:

The next goal was to make Google Desktop as easy to use as a Google.com web search. In your web browser, Google Desktop looks and behaves like our web search, seamlessly blending the two experiences.

GDesktop's designed behavior is to merge your web search experience with your desktop search experience. It makes use of some high-level hacks to get this feature to work. There have been a lot of complaints about GDesktop's installation procedure (not just from John Gruber), but most of them are about the manner of the installation, rather than what gets installed. In other words, if Google had provided a warning in advance, there might have been less controversy.

When everything is indexed and you start using GDesktop, you'll find that more stuff is going on in the background than you might have expected, as illustrated in Figure 3.

Google Desktop's processes in Activity Monitor

Figure 3. Google Desktop's processes in Activity Monitor

That's five different processes (two of them called GoogleDesktopAgent) running at once.

GDesktop and Gmail

Here's where GDesktop starts to show how different it is from the competition.

After indexing the contents of your hard disk, the software begins indexing your Gmail archives. If it tried to do this in one big lump, your internet connection would probably get clogged up, as would Google's servers if thousands of users were all trying to download gigabytes of email simultaneously. So GDesktop goes into what I call "trickle mode," logging into your Gmail account and downloading a little at a time.

Here's how Google describes it:

To avoid monopolizing your computer and internet connection, Google Desktop indexes your Gmail a little at a time when you first enable the feature. After all of your old Gmail has been downloaded, Desktop will almost instantly keep up with your new mail.

It would appear that this is a long process. Google's own known issues list says that downloads of messages from Gmail are done in small batches, two hours apart. And there's no progress indicator. Two days after installing GDesktop, only a fraction of my Gmail messages had been downloaded.

One of GDesktop's smartest tricks is offering offline access to your Gmail messages. When viewing a mail result, clicking the result's title will open a cached copy of that message in your browser window, as shown in Figure 4.

Cached Gmail messages viewed offline

Figure 4. Cached Gmail messages viewed offline

If you'd instead prefer to view the message in Gmail itself (and assuming you have an internet connection), you can click the "View in Gmail" link directly beneath the search result.

This offline searching is one of the biggest things in GDesktop's favor. It means you need be less fussy about making manual backups of your Gmail account(s) (although I wouldn't advise you to abandon them completely), because GDesktop effectively backs everything up for you incrementally. Whether this is an indication of how any future "offline Gmail client" might work is another question entirely, and one that I suspect we won't get any answers to for the time being.

GDesktop Tricks

One nice thing you can do with GDesktop is start searching messages in Mail using the same easy-to-type operators available in Gmail. So just type "from:brian" in GDesktop to see all the messages in Mail that were sent from Brian. Same applies to operators like "subject:" and "to:".

In a similar manner, you can use common Google web search operators such as "filetype:pdf" to find just PDF files. Combine with keywords to narrow down the results.

The upshot of this is--in my experience at least--a desktop search that is faster and, better still, easier to use than Spotlight itself.

As you can see in Figure 5, the basic GDesktop results window is very simple.

Results window

Figure 5. Results window

It's much simpler than the equivalent Spotlight results window, yet still manages to show a filename, date, path, and contextual snippet for each result. Then again, Spotlight results can be filtered immediately, while GDesktop demands an extra click to open the results in a browser window before you can filter them further.

You'll need to restart your web browser before GDesktop can start monitoring and indexing the web pages you have visited, but once this is in place, it is a very useful and (so far) reliable feature. Because it searches the text of pages you've been to, not just their URLs and title tags, it makes finding specific things easier. All you need to remember is a snippet of text, perhaps just one word, from the page and GDesktop can get you back to it. It goes without saying that this is an improvement on searching through most browser histories.

In addition, search results of cached web pages are displayed with thumbnails, making selection of the right result that much easier (see Figure 6).

Web history thumbnails

Figure 6. Web history thumbnails

Viewing Results in a Browser Window

Any search will only show a handful of results, but there will usually be many more found. GDesktop offers to show these extras to you in a browser window, which will look something like Figure 7.

Search results in a browser

Figure 7. Search results in a browser

There's a few things worth noting about this browser view.

First, it's not actually on the Web, it's been generated by GDesktop locally, on your Mac. It looks like a normal Google results page though. Just above the search box are links to Web, Images, News, and so on--clicking any of these passes your search request on to the appropriate online service.

The search results are broken down by rough file type--for example, emails, web history pages, files, "media" (it's not clear exactly what this applies to), and "others."

Email messages shown here might be inside Mail, or in your Gmail account. You have to look closely to spot the difference: a message in Mail will have a link saying "View message." A message in your Gmail account will have a link saying "View in Gmail."

Other controls that appear in the browser view are "Open folder," which opens the specified folder in a new Finder window; "Sort by," which toggles the results display between "relevance" and "date"; and "Show cached," which works a little like Google's own cached web pages. It will display the content of a file as saved by GDesktop last time it indexed that file. A warning at the top of the results page says:

This is one version of (chosen file) from your personal cache. The file may have changed since that time. Click here for the current file. Since this file is stored on your computer, publicly linking to it will not work.

Browser integration works the other way. With Google Desktop installed, a normal search from Google's home page will return a slightly different results page, shown in Figure 8.

Amended browser-based search results

Figure 8. Amended browser-based search results

The line "About 16 results stored on your computer" has been added above the list of expected web-based results. This is why GDesktop has to meddle with the darker corners of your system.

What About Quicksilver?

What about it indeed? There's little doubt that Quicksilver can do everything GDesktop can do and more, at least as far as desktop search is concerned. It can also do some pretty smart stuff with Gmail, too, but nothing like the offline caching of messages.

Is GDesktop any better than Quicksilver? I don't think comparing the two is helpful; they're like apples and oranges. Quicksilver is designed to let you work with your system by constructing "phrases" and "sentences." It is hugely flexible and with the right plug-ins, it can be applied to an astonishing variety of tasks.

GDesktop performs some similar functions but in a completely different way. It is a closed system, designed with webapps and web history searching in mind. It's designed for searching; Quicksilver is designed for doing.

Personally, I see no reason why the two apps cannot live side-by-side and be used simultaneously, each according to its strengths.

Limitations

It's hard to get GDesktop to not index stuff. At the moment, the only way is by adding items to the Privacy tab in Spotlight's preferences--an odd way for GDesktop to behave, especially given that in all other regards, it operates quite independently of Spotlight.

That independence is another issue in its own right. Why did Google choose to create a separate index, instead of simply using the existing Spotlight one that's already built and up-to-date on each Mac? The answer almost certainly relates to GDesktop's Gmail integration, which is one of the most appealing features of the whole thing.

It is possible to remove specified items from GDesktop's index. Having performed a search and chosen to see all results in a browser window, you'll see a link saying "Remove from index" toward the top-right corner of the page. Clicking this will reload the results page with checkboxes next to each one, and the instruction: "Select items to remove them from Google Desktop. The original files and emails will not be affected." This is a one-way action, though--there's no apparent means of returning a removed item to the index if you change your mind later.

Another downside is no apparent means of searching just your Gmail archives. You can narrow your search down to your email by using the query "filetype:email your search", but at this time it there is no way to distinguish Gmail from the rest of your email.

GDesktop does not (yet) index other data you may have stored in other Google web services. It cannot search your texts in Google Docs & Spreadsheets, web pages you might have created with Google Pages or Blogger, or events in Google Calendar. At the time of this writing there was a thread about this issue on the GDesktop forum; personally speaking, I'd expect support for these other webapps to come in future updates. It just wouldn't make sense to ignore them.

The Bottom Line

GDesktop does a lot of things, but not all of them are that new. Some can be done already, with different applications, plug-ins, and built-in OS X tools. You can already find files and launch apps with Spotlight. You can already reach Gmail via Quicksilver, or simply use your browser like most people do. You can already search your browser history (including the text of visited pages) with third-party apps like Webstractor.

But Google Desktop does some of these things better or faster--in my opinion, finding a file on your hard disk is much simpler using GDesktop than it is with Spotlight.

And it does some new things smarter, such as the trickle-mode caching of your Gmail account, with subsequent offline access to your messages, or the improved search capabilities it brings to existing apps like Mail.

On the other hand, the app's implementation makes some more experienced Mac users twitchy, for want of a better word. No one's saying that use of an Input Manager, for example, is in itself a bad thing, but some are saying it would be nice to be told in advance when it does. As one blogger at ansemond.com said:

Google Desktop installs itself as root: the index is at /Library/Google/Google Desktop/Index/(some directory which only root can access). This means it can access anything on your machine and do anything it likes. It doesn't need to and on a first date, I don't trust anything that much.

Don't let that put you off trying it, though. Google Updater does an excellent job of removing GDesktop from your system, so it's easy to give it a try and see what you think. And in the meantime, keep an eye on the Google Desktop forum for further discussion about features, possible problems, and updates.

Giles Turnbull is a freelance writer and editor. He has been writing on and about the Internet since 1997. He has a web site at http://gilest.org.


Return to MacDevCenter.com.

Copyright © 2009 O'Reilly Media, Inc.