Download the new Switched app for your iPhone

Skip to Content

Engadget for the iPhone: download the app now
AOL Tech

contextual posts

Filed under: Terminal Tips, Leopard

Terminal Tips: Rebuild your Launch Services database to clean up the Open With menu

TipsProblem: 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.

Tip of the Day

Customize your desktop. While in the Finder, control-click (right-click) and choose 'Show View Options'. A box will appear allowing you to change the size of desktop icons, their spacing, text size and the position of icon labels.

Follow us on Twitter!

TUAW [Cafepress] 

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
Storyist 2.0
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor

 

Our Writers

Victor Agreda, Jr.

Programming Manager, AOL Tech

RSS Feed

View more Writers

More Apple Analysis

AOL Radio TUAW on Stitcher