20

Some applications will signal to the OS that they can open special link type, such as ssh:// or github-mac://. They get automatically opened for such links by the web browser (or when using open in a terminal). If I have multiple such applications, how can I set which one should be the default?

For example, both GitHub Desktop and SourceTree can handle github-mac://. When I installed GitHub Desktop, it became the default handler for these links. How can I set SourceTree as the default handler without uninstalling GitHub Desktop?

5 Answers 5

22

Update December 2020
Rubicode (RCDefaultApp) seems to have gone. That leaves SwiftDefaultApps as the new go-to for this task.

Late Edit July 2019:
Though RCDefaultApp still works on Mojave, it may not survive Catalina [time will tell]
There is, however, a new kid on the block - SwiftDefaultApps, which may become the newer standard. Time will tell (again;)

Very late edit May 2020. I have no Mac that can run Catalina, so I'm reliant on others to keep this answer up to date.
From comments, SwiftDefaultApps reported as working in Catalina 10.15.5


You can do that with a freeware app called RCDefaultApp. It's ancient, but still works on El Capitan.
Update April 2019 - still works on Mojave too.

You can define the default app for any URL scheme.

I don't have one for github, but this shows how you can set, for example, ftps specifically to any installed app that supports the protocol.

enter image description here

7
  • it doesn't support extra parameters and adding custom cmd
    – NeverBe
    Commented Apr 16, 2019 at 0:53
  • 1
    Just to report that SwiftDefaultApps works on Mojave quite well!
    – Rade_303
    Commented May 1, 2020 at 13:56
  • 2
    Reporting that SwiftDefaultApps 2.0.1 works on Catalina 10.15.5. Also, you don't need to compile yourself if you don't overlook the Release tab. github.com/Lord-Kamina/SwiftDefaultApps/releases
    – dualmon
    Commented Jun 9, 2020 at 0:25
  • SwiftDefaultApps worked perfectly. Using it on macOS 10.14.6. Link to RCDefaultApp is currently dead.
    – inspirednz
    Commented Dec 14, 2020 at 8:09
  • @inspirednz - thanks for the heads-up. I've updated the answer to reflect that
    – Tetsujin
    Commented Dec 14, 2020 at 8:20
4

You can also try this: https://onflapp.wordpress.com/lincastor/. It allows you to register arbitrary url schemes such as chrome-devtools://

2

Since it hasn't been mentioned yet, there is also a great, modern app called Choosy that can be used to change default browser-opening behavior for different links, different times of day, etc.

1
  • 2
    It's good to point out that this is a paid app.
    – Szabolcs
    Commented Oct 17, 2020 at 11:19
1

And there is URL Scheme Defaults, though not as powerful as SwiftDefaultApps. The app only handles URL schemes and no file extensions, etc.. But it is a standalone app and does not require you to install a pref pane.

URL Scheme Defaults

2
  • 1
    I wish it had an option to disable, not just edit.
    – Nakilon
    Commented Jun 17, 2023 at 12:18
  • 1
    @Nakilon new version published. And if you had reached out via Github, I would have answered earlier ;-) I dont follow this thread actively. ... PS. you cannot simply disable a scheme, but you can provide an application that does not respond to it. e.g., com.apple.systemuiserver or com.apple.dock
    – lupdidup
    Commented Aug 12, 2023 at 11:28
1

Install duti. It's the most complete and serious solution to instantly bind UTIs to Appls. You have it here: duti on GitHub

If you prefer something with Graphic Interface: SwiftDefaultApps on GitHub

1
  • Can't figure out how to use it.
    – Nakilon
    Commented Jun 17, 2023 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .