I, Blog

December 12, 2007

Leopard LaunchServices Database - How do I rebuild it?

Filed under: leopard, tips — Scott @ 1:38 am

The LaunchServices database, among other things, associates file types with the apps used to open them. If you right-click on a file and choose “open witih”, this database determines what options show up. Yay! Unfortunately sometimes it gets hosed.. under Tiger i used to get a lot of duplicate entries or whatever.

My problem now is due to Parallels and its SmartSelect feature. it allows you to have OS X show you options for Windows or OS X apps to open files with - something I really didn’t want. I do not WANT visual studio even KNOWN about by the leopard LaunchServices database, for example. Or IE 7. Or notepad. Or whatever. Unfortunately for Parallels (and me), disabling this did not rebuild my launchservices db. But eventually I got to the point of clean up where the following terminal command to rebuild the launchservices db did the trick (note: this needs to be all one online with no returns):

Update: Joe points out in the comments he found my path to the command didn’t work. I checked on the Apple site and also in my own terminal window, and here’s the command with the path I see to lsregister (for Leopard, different for Tiger):

/System/Library/Frameworks/CoreServices.framework/Versions/A
/Frameworks/LaunchServices.framework/Versions/A/Support
/lsregister -kill -r -domain local -domain system -domain user

Again, all on one line with no spaces except where obvious in the command above.

I’m really only putting this here so I can easily find it again, but I hope it benefits a lot of you. Hehe.

PS. The Tiger way of doing this is detailed here.

And btw, I’ve now switched to VMWare Fusion.

Technorati Tags:
,

5 Comments »

  1. very interesting, but I don’t agree with you
    Idetrorce

    Comment by Idetrorce — December 15, 2007 @ 10:52 pm

  2. ummmm.. you don’t agree with me about what? that this works for resetting the launch services database?

    uhh.. yeah, well, it does. so good luck with that whole disagreement thing.

    Comment by Scott — December 16, 2007 @ 2:16 am

  3. Scott - I had a bit of trouble with this, only in the sense that I had no …/A/Support folder under the path that you’ve provided. In my case, I was forced to go to /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/
    to find lsregister.

    In the end, the full command that I used was ‘/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user’ ; it did the trick just fine. Thanks for the post - always useful info.

    Comment by Joe — January 22, 2008 @ 11:59 am

  4. doh, my css is hiding your comment partially. interesting, i’ll have to double check that i got the right path for leopard… and it looks like you are correct:

    http://discussions.apple.com/thread.jspa?messageID=5730491

    Comment by Scott — January 22, 2008 @ 12:23 pm

  5. [...] Database, redux Filed under: software, tips — Scott @ 11:13 am Awhile back I posted about the Launch Services Database in OS X and how to reset this in Leopard. The problem is that [...]

    Pingback by LaunchServices Database, redux « I, Blog — February 10, 2008 @ 11:13 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.