Filed under: Terminal Tips, Leopard
Terminal Tips: Rebuild your Launch Services database to clean up the Open With menu
Problem: Some piece (or pieces) of rogue software have cluttered up your Open With contextual menu, which you can see by right-clicking or control-clicking any document in the Finder. This problem seems to be most prevalent with virtual machines that allow you to open documents with Windows applications, but tend not to clean up after themselves. After having both Parallels and VMWare installed on my MacBook Pro, my Open With menu was a mess.
Solution: Lucky for me, I noticed David Chartier's question about this on Twitter around the same time as I was wondering what to do about it. Some friendly person pointed him to a posting on Apple's discussion forum (also noted on Mac OS X Hints here and here), noting that running a specific command in a terminal window will rebuild your launch services, which repopulates the Open With menu with a current list of applications, without duplicates. It worked perfectly for me, but beware, on my system it took about 10 minutes to complete, and I suspect it could take more on a sufficiently gummed-up system.
Here's the Leopard version of the command (the path to the tool is different in Tiger, see here). I broke it into three lines for readability, but the \ at the end of the line is bash-speak for "keep on going with the same command" -- you can copy and paste it directly and it should work, or if you type it on one line without the backslashes, it will also work fine.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\
LaunchServices.framework/Versions/A/Support/lsregister -kill\
-r -domain local -domain system -domain user
If, preferring to avoid the Terminal, you want a handy GUI app to rebuild the Launch Services database with a couple of clicks, check out Titanium's OnyX or Maintenance utilities, both free of charge.
In ye olde times, with "
There's quite a debate going on in the Mac web over Safari 4's new user interface. Personally, I think the new tab implementation is hideous, so I was glad to see that Caius Durling has discovered a bevy of
When I shared an AppleScript last week which created
Do you like giving ratings to songs in iTunes? If so, then you've probably noticed that you are only able to rate songs on a full-star basis, not enough granularity for some music fans... there's a longstanding 
Sometimes you want your Mac to be backed up more frequently than usual. If you want to instantly back up using 
You may recall that 

TUAW reader David wrote us to ask how he could view .erb files (Rails development) in Quick Look. The fact is, there are a lot of plain-text files with extensions that Quick Look doesn't recognize. It's relatively straightforward to tell Quick Look to treat these files like any other text file and preview them as plain text; it does require diving into plist files and possibly breaking an application, so don't dive in unless you're comfortable and fully backed up. Read on for a short tour of Quick Look hacking basics ...
![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)

