While you could clear the various LaunchServices databases by deleting ﬁles, I prefer to use a more targeted command line tool when possible. My assumption is that the command line tool is canonical and will therefore produce more reliable results.
In Mac OS X Tiger, you could clear the LaunchServices database using the following “lsregister” command:
Versions/Current/Support/lsregister -kill -r -domain system -domain local -domain user
But, in Leopard, the LaunchServices framework’s path has moved; it is now in the CoreServices framework bundle. You can ﬁnd it with the “ﬁnd” command:
$ find /System -name lsregister -type f -print 2>/dev/null
Once you ﬁnd it, you can get the usage statement for the “lsregister” command in Leopard, which will at least tell you what options it has:
lsregister: [OPTIONS] [ ... ]
[ -apps [,domain]... ]
[ -libs [,domain]... ]
[ -all [,domain]... ]
Paths are searched for applications to register with the Launch Service database.
Valid domains are "system", "local", "network" and "user". Domains can also
be specified using only the first letter.
-kill Reset the Launch Services database before doing anything else
-seed If database isn't seeded, scan default locations for applications and libraries to register
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-lazy n Sleep for n seconds before registering/scanning
-r Recursive directory scan, do not recurse into packages or invisible directories
-R Recursive directory scan, descending into packages and invisible directories
-f force-update registration even if mod date is unchanged
-u unregister instead of register
-v Display progress information
-dump Display full database contents after registration
-h Display this help
Note that if you’re having Launch Services-related problems in one user account but not another, you’ll likely want to start with the “user” domain. (It pays to understand the domain structure of Mac OS X, so that you only make changes where you need to.)
In my Mercurial-based workﬂow for updating Drupal sites, there is a sequence of commands I need whenever a new version of Drupal comes out. I have a hard time remembering the options for “tar” in this sequence — and my original source for the instructions diﬀers from what I need to do on my Web host — so I need to help my memory. The tar command, as constructed below, places its output into the speciﬁed destination directory.
Here it is, with tar’s “—strip-path=1” and “-C” options:
$ cd path/to/repository/parent/directory
$ curl -O http://ftp.drupal.org/files/projects/drupal-5.12.tar.gz
$ tar --strip-path=1 -C drupal_source -zxv -f drupal-5.12.tar.gz
There is some important information in the Info.plist ﬁles contained in Mac OS X applications. But, some of that information isn’t really standardized — I’m looking at all of you, you crazy version number and vendor attributes (just the ones I’m interested in!). So, given that, how do you ﬁnd them all to make comparisons between Apple and third-party apps?
Answer: You can use the “ﬁnd” command to ﬁnd all of the Info.plist ﬁles for applications in your /Applications directory.
$ find /Applications -name Info.plist -ipath /Applications/\*.app/Contents/Info.plist -depth 3 -print 2>/dev/null
Since that intentionally limits the depth traversal, you could modify it slightly to support ﬁnding Info.plists in your /Applications/Utilities directory, as well. However, I would say it’s less likely you’ll be dropping third-party applications in the Utilities directory, so you might not care.
I was concerned when reading Kerberos: The Deﬁnitive Guide that Mac OS X clients bound to an Active Directory didn’t have an easy way to specify that their Kerberos tickets should work behind NAT. The option to obtain addressless tickets is deﬁned in the krb5.conf ﬁle (or, for Mac OS X, the edu.mit.Kerberos.plist ﬁle) with:
noaddresses = true
… And it is not an option you can choose either in the Directory Utility GUI or the dsconﬁgad command line tool. This is important because addressless tickets don’t have IP addresses associated with them, and thus work in situations such as those where a client is behind NAT.
Before I submitted a feature request, though, I looked up the option in the krb5.conf man page on a Leopard system. I’m glad I did, because it says:
Presumably, this documented default is applying on Leopard with Active Directory Kerberos. When I examined a TGT issued by a domain, I did not see any IP addresses associated with it, so the default does appear to be the case for me.
I am happy about a solution I just came up with to the problem of not being able to deﬁne an arbitrary set of dates as the recurrence pattern for an event in Microsoft Entourage 2008.
I wanted to enter an event that was split across two days, and wouldn’t have obviously ﬁt any type of “every Wednesday” or “every second Thursday” pattern. The ideal way to handle this, I think, was available in the Steltor CorporateTime calendar I used to use: create an event and add arbitrary dates to it, so that each recurrence appeared as part of the series. You can’t do that in Entourage — or I’ve never found any trickery to allow it.
Luckily, however, the event’s start time and duration was the same on each of the two days, so I realized I didn’t need to make two diﬀerent events for it. And, I only had two recurrences to deal with — if there’d been more, it’s unlikely they would have been evenly spaced.
I used my “Compare dates” AppleScript to determine how many days apart the two instances of this particular event were. I came up with 20. I entered that as the number of days between recurrences. I set the recurrence to end on the date after the last event.
The result? I got two events (and two events only), both on the days I intended, and they were linked as part of a recurrence pattern. Sweet. It’s the little victories, you know?
“Life Balance 3.x customers with Macintosh licenses can upgrade to version 4 for just $59.95,” claims Llamagraphics, the purveyor of the ﬁne time management application, Life Balance.
This sounds like a great deal! Until I remember that the only reason I want to upgrade from version 3 to 5 (not 4) is for compatibility with the new iPhone version of Life Balance! So to get them both, I’d be spending:
|Life Balance Mac upgrade||$59.95|
Compare that to my current cost for Life Balance — which I’m not currently using because my Treo repeatedly made me want to throw it forcefully into the ground (loved the Palm, hated the defective phone!) and the desktop software looks like crap — which I’ve summarized below:
|Life Balance Mac and Palm bundle||$39.95|
|Life Balance Mac and Palm upgrade||$50.00|
That’s right, folks. After an investment to date of $89.95 in this software, I’d have to shell out another $79.94 to stay current and get the application on the mobile device I currently use. I’d be paying more for the Mac upgrade than I’ve ever paid for any single purchase or upgrade from Llamagraphics in the past!
I’m surprised I’m even thinking about this. However, Life Balance has always made the most sense of any task management application, and has always done the best job of helping me prioritize. (Of other current applications, OmniFocus doesn’t make sense to me, and Things was great for entry but felt horrid at showing me what I needed to do next.) At the cost of Life Balance, despite how it worked for me, maybe it’s simply time to try something else.
The least expensive overall, and perhaps most interesting because it supports task sharing, is to go with Remember The Milk. I’m not sure I want to use a Web or “cloud” service for this, and there’s no desktop application per se, but I’m at the point in my life where sharing to-do’s with others (and outside the work environment) is compelling. The new+Remember+The+Milk+iPhone+application may tip me in that direction.
A while back, Microsoft announced their Silverlight software. I didn’t think much of it, but now that they have announced the Azure platform, I realized that they have developed a Forgotten Realms theme in their products.
Let’s look at this, while we’re in the beginning of the trend, to see how this relates to the the SSI “gold box” Forgotten Realms games:
|Product platform||How it relates||To this SSI FR game|
|Microsoft Silverlight||… silver light is the color of light that gleams oﬀ silver blades …||Secret of the Silver Blades|
|Microsoft Azure||… azure is the color of the bonds tattooed on the adventurers’ arms …||Curse of the Azure Bonds|
Based on this ﬂimsy evidence, I suspect the next major product platform from Microsoft to be related, somehow, to “radiance.” (As in Pool of Radiance, of course.)
We might also expect a future initiative centered around “darkness,” but I consider that less likely — or, it may already have happened, given the reverse chronology that seems to be at work. (See Pools of Darkness.)
I am continually coming across useful features in my Fastmail.fm account that I have previously overlooked. For example, I now know that I can import contacts into the account’s address book. As with many mail systems, this provides several beneﬁts:
Since I enabled “aggressive” ﬁltering on my Fastmail account, having that whitelist functionality is of interest to me.
The Fastmail developers have helpfully provided a way to upload multiple kinds of contact data, so I chose vCards. They were easy for me to obtain from Apple Address Book. Here’s the basic process I followed:
Fastmail has done a reasonable job of matching imported vCards to existing contacts, as long as they were previously imported from a vCard. I had some duplicates for those people who I’d added manually through the Fastmail interface before importing their vCards. Fastmail does state they try to match up contacts to reduce duplicates during the import process, but I still needed to do a little cleanup — and, unfortunately, there is no “merge contact” feature I came across.
For what it’s worth, the import process is fast, but I probably brought in under 100 contacts total, so I wasn’t necessarily taxing it.
Not all of the vCard data seems to come through and be displayed in the Fastmail address book. That’s okay for me; I have it elsewhere. In particular, I didn’t see Web addresses beyond the ﬁrst one show up. Other contact information, like e-mail addresses and phone numbers, seemed to display ﬁne. (I haven’t done an export from FM to vCards to see about roundtrip ﬁdelity yet.)
Once you have cards in your address book, you can update them later. If you’re going to bother importing them in the ﬁrst place, you’re probably concerned about keeping them up to date. Since the Fastmail software does a decent job of avoiding duplicates (in my brief experience), this shouldn’t be hard to do.
The most diﬃcult part is sorting out which cards have been changed over time. You could re-import all of your cards, certainly. Or, you could use Apple Address Book to help ﬁnd the recent changes to your contacts — whether those changes were done in Address Book or synchronized via Sync Services (perhaps from Microsoft Entourage).
While this is far more manual eﬀort than I’d like, it’s not terrible. It’s something that I can envision doing every few months. I do most of my e-mail in a desktop application rather than on Fastmail’s Web site, so if my online address book there is a little out of date, it’s not a huge concern.
I just installed the Drupal Administration Menu contributed module, and I really like it. When you are logged in and have administrative privileges, it provides a small menu bar with drop-down menus and submenus at the top of every page in your site. It provides quick access to every admin function I’ve needed, and really streamlines the process of making changes to the site.
Here’s a screen shot of what it looks like:
In that respect, I rank it up there with the Taxonomy Manager module, which also provides a major productivity boost.
Update: Apparently I’m not alone; Administration Menu is among the modules included with the Acquia Drupal distribution. I think that lends quite a bit of credibility to this module … if my own recommendation didn’t provide a tipping point for you.
There are cases where you may want to have Launchd run a job once, and then have that job removed so it doesn’t run again. This topic came up on the Launch-Dev mailing list not too long ago and some answers were provided. In particular, Quinn the Eskimo said:
“Alternatively, don’t unload the job. Once a job is loaded, it
doesn’t depend on the plist ﬁle, so removing the plist ﬁle out from
underneath launchd won’t cause you any problems. The job will
continue to exist in launchd (until the system restarts) but it won’t
get run against unless someone speciﬁcally invokes it.”