Fix “Open With” menu of OSX

After removing and re-installing some software, there may be some of obsoleted or duplicated item in osx “Open With” menu of right-click mouse menu. In that case, you need to run this code in terminal to rebuild that menu.

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

As you seen, after rebuild menu, Finder will be killed and restart also.

Alternatively, you may want to save that code as a shortcut by this:

  1. Start Teminal;
  2. nano .bash_profile
  3. write this text below and save that file:
    alais FixOpenWithMenu = '/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user; killall Finder'

After doing that, you will only need to type FixOpenWithMenu in terminal window instead of that long command.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.