Pages

Wednesday 27 March 2013

cleaning up messy "open with" menu's in OSX


If you use your Mac for any period of time, you will find the need to open a document with a different program other than the one set as default. The "Open With" menu appears in the Finder whenever you right-click or control-click on the icon of a document. The "Open With" command is designed to give you a list of alternative choices to handle the file that you've selected, but after long-term use you will find this list can get a little bit messy.
Duplicate entries in your "Open With" menu can be easily cleaned via a simple terminal command, methods that'll work in OS X Mountain Lion. I will also show you how to create a bash script to make it easier to repeat this cleaning whenever needed.
Below you'll find the commands. If you are creating the .bash_profile alias method, remember you will have to quit and relaunch terminal for this to work.
Fix Duplicate "Open With" Terminal:
1
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
Fix Duplicate "Open With" via Bash alias:
1
alias fixow='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"'
view rawfixowThis Gist brought to you by GitHub.
If you are a little shy of monkeying around in terminal and bash, you can use utilities such as Onyx or Cocktail to get the job done.

No comments:

Post a Comment