Open With

Latest

  • How to spring clean "Open With" duplicates

    by 
    Shawn Boyd
    Shawn Boyd
    03.25.2013

    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. We initially covered this command in a 2009 post about rebuilding your launch services, but this post is updated with video and a few new methods that'll work in OS X Mountain Lion. In the video below, I will demonstrate the basic terminal command. I will also show you how to create a bash script to make it easier to repeat this cleaning whenever needed, as well as create an Alfred workflow to do the same (requires the Alfred powerpack.) Below you'll find the commands used in the video. 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: 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"' Fix Duplicate "Open With" via Bash alias: 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"' 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.

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

    by 
    Jason Clarke
    Jason Clarke
    06.11.2009

    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. Just copy and paste it into terminal and it'll work just fine. /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -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.