How to prevent “Open With…” from accessing external drives

external-disklaunch-servicesperformancesleep-wakespotlight

Frequently, when I try to open the (10.9) Finder's "Open With…" menu, I experience a delay that appears to be due to connected FireWire drives. This delay is very long when the drives need to spin up, but is also perceptible when the drives have not spun down. For me, this delay makes no sense: I have no applications that I use stored on my external drives, and I have disabled Spotlight searches of these drives (using Spotlight's "Privacy" setting).

Is there some way to prevent the "Open With…" menu examining external drives?


Note that this is not a question about speeding up the OW menu in general (e.g., by pruning apps and file type associations), nor about keeping duplicate apps on external drives from appearing in the OW menu (I have none as my Spotlight settings noted above exclude them).

Best Answer

The apps that are displayed in "Open With..." are taken from the Launch Services database which keeps track of what apps can open which file types. In your case it would seem that Launch Services thinks you may have an appropriate app on your Firewire disks (even though you there aren't any - it is wanting to look).

Older versions of macOS seem to be particularly susceptible to this database becoming somewhat tangle/messy.

The solution is to rebuild the Launch Services database. You can do that at the terminal with this command:

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

It is running the lsregister app to reset the database. It may take sometime to complete. And you should check that the location for lsregister is correct for your version of macOS.

If using the Terminal is a challenge you can use the highly regarded Onyx to rebuild the database. It is on the Maintenance pane. Make sure you disable all the other choices before running the rebuild task. Note there is a different version of Onyx for each macOS version.

This has been covered before. For example: Finder "Open With" very slow.

For a more in depth discussion of Launch Services, read these: Recent Items, Launch Services, and SharedFileLists and Launch Services database problems