I've been reading a lot online about custom URL handlers / custom protocol handlers such as:
I get that you can tell the system that a particular program is able to handle a certain scheme / protocol with the Info.plist
file:
CFBundleURLTypes
CFBundleURLName
Local File
CFBundleURLSchemes
local
NSUIElement
But if there are multiple applications that are capable of opening the same URL handler, such as mailto:
how do you specify which one you want the system to use?
There were some references to utilities like the More Internet preference pane
which no longer seems to be available from the author's site. I did find it online by Googling but it seems a bit shaky - like it was written for an older OSX - perhaps Tiger.
I haven't been able to find information on how to set the URL handler for protocols and custom protocols. I'm assuming there is a plist
file somewhere that I can edit - or maybe there is a newer, better utility that works well with Mountain Lion?
Answer
The file you seek is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist
.
It holds an array called LSHandlers
, and the Dictionary children that define an LSHandlerURLScheme
can be modified accordingly with the LSHandlerRole
.
Rather than manually editing this file, you can also use RCDefaultApp, which gives you a nice Preference Pane. It is said not to be working for macOS 10.12 and up, but I can confirm it runs under macOS 10.14.
An alternative is SwiftDefaultApps.
For example, here's SVN and SSH:
… and in RCDefaultApp:
Comments
Post a Comment