How do I configure custom URL handlers on OS X?












52















I've been reading a lot online about custom URL handlers / custom protocol handlers such as:




  • Launching External Applications using Custom Protocols under OSX

  • OS X URL handler to open links to local files


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:



<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Local File</string>
<key>CFBundleURLSchemes</key>
<array>
<string>local</string>
</array>
</dict>
</array>
<key>NSUIElement</key>
<true/>


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?










share|improve this question



























    52















    I've been reading a lot online about custom URL handlers / custom protocol handlers such as:




    • Launching External Applications using Custom Protocols under OSX

    • OS X URL handler to open links to local files


    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:



    <key>CFBundleURLTypes</key>
    <array>
    <dict>
    <key>CFBundleURLName</key>
    <string>Local File</string>
    <key>CFBundleURLSchemes</key>
    <array>
    <string>local</string>
    </array>
    </dict>
    </array>
    <key>NSUIElement</key>
    <true/>


    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?










    share|improve this question

























      52












      52








      52


      29






      I've been reading a lot online about custom URL handlers / custom protocol handlers such as:




      • Launching External Applications using Custom Protocols under OSX

      • OS X URL handler to open links to local files


      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:



      <key>CFBundleURLTypes</key>
      <array>
      <dict>
      <key>CFBundleURLName</key>
      <string>Local File</string>
      <key>CFBundleURLSchemes</key>
      <array>
      <string>local</string>
      </array>
      </dict>
      </array>
      <key>NSUIElement</key>
      <true/>


      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?










      share|improve this question














      I've been reading a lot online about custom URL handlers / custom protocol handlers such as:




      • Launching External Applications using Custom Protocols under OSX

      • OS X URL handler to open links to local files


      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:



      <key>CFBundleURLTypes</key>
      <array>
      <dict>
      <key>CFBundleURLName</key>
      <string>Local File</string>
      <key>CFBundleURLSchemes</key>
      <array>
      <string>local</string>
      </array>
      </dict>
      </array>
      <key>NSUIElement</key>
      <true/>


      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?







      macos mac osx-mountain-lion url protocol






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 7 '13 at 20:54









      cwdcwd

      6,0783696143




      6,0783696143






















          8 Answers
          8






          active

          oldest

          votes


















          46














          The file you seek is ~/Library/Preferences/com.apple.LaunchServices.plist.



          (in OSX 10.11 the main plist is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist though the above still exists…)



          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 (…doesn't work in OSX 10.12 anymore).



          Edit Mar 2018

          I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.

          If someone would like to test & report back...



          For example, here's SVN and SSH:





          … and in RCDefaultApp:








          share|improve this answer





















          • 31





            4 minutes 19 seconds? Seriously?

            – Daniel Beck
            Feb 7 '13 at 21:00






          • 2





            Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

            – cwd
            Feb 7 '13 at 21:06











          • @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

            – slhck
            Feb 7 '13 at 21:09











          • This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

            – nute
            Aug 25 '15 at 7:57






          • 1





            @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

            – slhck
            Aug 25 '15 at 11:17



















          14














          Update Jul 2017: RCDefaultApp and lstool no longer work on macOS 10.12 or later. We'll have to find a new solution.



          Edit Mar 2018

          I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.





          Furthering the previous answer, if you would like to do this on the command line you can use the lstool command, which is the core of RCDefaultApp, found under RCDefaultApp.prefPane/Contents/Resources/lstool.



          Its usage is straightforward:



          [~]$lstool --help
          Usage:

          lstool read [<lsscheme> [<type>]]
          lstool [-n] write <lsscheme> <type> <app>
          lstool [-n] setoption <lsscheme> <type> login|ignorecreator YES|NO
          lstool [-n] register {<app>}
          lstool [-n] unregister {<path> | <app>}
          lstool apps

          -n means do not make changes
          <lsscheme> is one of: internet, media, url, extension, uti, mime, ostype
          <app> is the path to an application or a name to be looked up





          share|improve this answer





















          • 2





            I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

            – luckman212
            Sep 1 '17 at 13:16













          • I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

            – SuperTempel
            Nov 28 '17 at 14:58













          • @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

            – Quinn Comendant
            Dec 25 '17 at 9:59











          • SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

            – Quinn Comendant
            Mar 26 '18 at 7:56






          • 3





            I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

            – Gregorio Litenstein
            Apr 15 '18 at 19:53



















          10














          Listing current LaunchServices URL handler settings on Apple OS X 10.10 (Yosemite):



          defaults read com.apple.LaunchServices/com.apple.launchservices.secure





          share|improve this answer
























          • Yay for using the builtin tools that don't break or require you to go download something.

            – xdhmoore
            Jan 12 '18 at 1:18



















          5














          I actually wrote an application simplifying registration of custom URL protocols, if anyone is interested. It is called LinCastor (http://onflapp.wordpress.com/lincastor/).
          Handlers can be defined as AppleScript or shell script (which can perl, python or what ever).






          share|improve this answer
























          • Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

            – Flash Sheridan
            Feb 17 '17 at 21:15











          • That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

            – Flash Sheridan
            Feb 25 '17 at 18:58



















          5














          Open the file with XCode works quite easy.



          Using the build in command plutil as described in the answer on https://discussions.apple.com/thread/5815759 to convert between format xml1 or binary1 works similar.



          plutil -convert xml1 /file-i-wish

          nano /file-i-wish & save file

          plutil -convert binary1 /file-i-wish


          No need for 'alien' tools :-)






          share|improve this answer

































            3














            You can also use duti:



            echo $'com.apple.mail mailtoncom.googlecode.iterm2 x-man-page'>~/.duti;duti ~/.duti





            share|improve this answer































              0














              I just tried the old More Internet, under El Capitan.



              It is funky and the only way it works is via using the up and down arrow keys to select the protocol, and a drag/drop of the APP icon into the window to make a change.



              I switched the default from Safari to Chrome, and the change stuck, so it works still.






              share|improve this answer
























              • What is this? Your answer is unclear.

                – lacostenycoder
                Aug 25 '18 at 20:23



















              0














              Another way to list current LaunchServices URL handler settings with Xcode on Apple OS X 10.10+ (Yosemite):



              open -a Xcode ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist





              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "3"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f548119%2fhow-do-i-configure-custom-url-handlers-on-os-x%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                8 Answers
                8






                active

                oldest

                votes








                8 Answers
                8






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                46














                The file you seek is ~/Library/Preferences/com.apple.LaunchServices.plist.



                (in OSX 10.11 the main plist is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist though the above still exists…)



                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 (…doesn't work in OSX 10.12 anymore).



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.

                If someone would like to test & report back...



                For example, here's SVN and SSH:





                … and in RCDefaultApp:








                share|improve this answer





















                • 31





                  4 minutes 19 seconds? Seriously?

                  – Daniel Beck
                  Feb 7 '13 at 21:00






                • 2





                  Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                  – cwd
                  Feb 7 '13 at 21:06











                • @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                  – slhck
                  Feb 7 '13 at 21:09











                • This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                  – nute
                  Aug 25 '15 at 7:57






                • 1





                  @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                  – slhck
                  Aug 25 '15 at 11:17
















                46














                The file you seek is ~/Library/Preferences/com.apple.LaunchServices.plist.



                (in OSX 10.11 the main plist is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist though the above still exists…)



                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 (…doesn't work in OSX 10.12 anymore).



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.

                If someone would like to test & report back...



                For example, here's SVN and SSH:





                … and in RCDefaultApp:








                share|improve this answer





















                • 31





                  4 minutes 19 seconds? Seriously?

                  – Daniel Beck
                  Feb 7 '13 at 21:00






                • 2





                  Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                  – cwd
                  Feb 7 '13 at 21:06











                • @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                  – slhck
                  Feb 7 '13 at 21:09











                • This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                  – nute
                  Aug 25 '15 at 7:57






                • 1





                  @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                  – slhck
                  Aug 25 '15 at 11:17














                46












                46








                46







                The file you seek is ~/Library/Preferences/com.apple.LaunchServices.plist.



                (in OSX 10.11 the main plist is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist though the above still exists…)



                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 (…doesn't work in OSX 10.12 anymore).



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.

                If someone would like to test & report back...



                For example, here's SVN and SSH:





                … and in RCDefaultApp:








                share|improve this answer















                The file you seek is ~/Library/Preferences/com.apple.LaunchServices.plist.



                (in OSX 10.11 the main plist is ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist though the above still exists…)



                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 (…doesn't work in OSX 10.12 anymore).



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.

                If someone would like to test & report back...



                For example, here's SVN and SSH:





                … and in RCDefaultApp:









                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 24 '18 at 9:29









                Tetsujin

                15.8k53362




                15.8k53362










                answered Feb 7 '13 at 20:58









                slhckslhck

                162k47448470




                162k47448470








                • 31





                  4 minutes 19 seconds? Seriously?

                  – Daniel Beck
                  Feb 7 '13 at 21:00






                • 2





                  Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                  – cwd
                  Feb 7 '13 at 21:06











                • @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                  – slhck
                  Feb 7 '13 at 21:09











                • This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                  – nute
                  Aug 25 '15 at 7:57






                • 1





                  @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                  – slhck
                  Aug 25 '15 at 11:17














                • 31





                  4 minutes 19 seconds? Seriously?

                  – Daniel Beck
                  Feb 7 '13 at 21:00






                • 2





                  Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                  – cwd
                  Feb 7 '13 at 21:06











                • @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                  – slhck
                  Feb 7 '13 at 21:09











                • This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                  – nute
                  Aug 25 '15 at 7:57






                • 1





                  @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                  – slhck
                  Aug 25 '15 at 11:17








                31




                31





                4 minutes 19 seconds? Seriously?

                – Daniel Beck
                Feb 7 '13 at 21:00





                4 minutes 19 seconds? Seriously?

                – Daniel Beck
                Feb 7 '13 at 21:00




                2




                2





                Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                – cwd
                Feb 7 '13 at 21:06





                Thanks for the fast and detailed answer. Looks good! Question though - I think that I tried RCDefaultApp before and had some issue with it. Has it been working seamlessly for you?

                – cwd
                Feb 7 '13 at 21:06













                @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                – slhck
                Feb 7 '13 at 21:09





                @cwd I honestly have to say I don't use it often. More for screenshots for Super User than anything else :) Whenever I need to change file associations I do it through the Get Info… dialog in Finder. I never needed to change protocol and MIME handlers. But it seemed stable enough for me.

                – slhck
                Feb 7 '13 at 21:09













                This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                – nute
                Aug 25 '15 at 7:57





                This seems to be to open a real "app". What if I want to do some custom processing, using a terminal command, etc?

                – nute
                Aug 25 '15 at 7:57




                1




                1





                @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                – slhck
                Aug 25 '15 at 11:17





                @nute Just from the top of my head, not sure. Perhaps an app created with Automator that wraps a shell script?

                – slhck
                Aug 25 '15 at 11:17













                14














                Update Jul 2017: RCDefaultApp and lstool no longer work on macOS 10.12 or later. We'll have to find a new solution.



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.





                Furthering the previous answer, if you would like to do this on the command line you can use the lstool command, which is the core of RCDefaultApp, found under RCDefaultApp.prefPane/Contents/Resources/lstool.



                Its usage is straightforward:



                [~]$lstool --help
                Usage:

                lstool read [<lsscheme> [<type>]]
                lstool [-n] write <lsscheme> <type> <app>
                lstool [-n] setoption <lsscheme> <type> login|ignorecreator YES|NO
                lstool [-n] register {<app>}
                lstool [-n] unregister {<path> | <app>}
                lstool apps

                -n means do not make changes
                <lsscheme> is one of: internet, media, url, extension, uti, mime, ostype
                <app> is the path to an application or a name to be looked up





                share|improve this answer





















                • 2





                  I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                  – luckman212
                  Sep 1 '17 at 13:16













                • I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                  – SuperTempel
                  Nov 28 '17 at 14:58













                • @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                  – Quinn Comendant
                  Dec 25 '17 at 9:59











                • SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                  – Quinn Comendant
                  Mar 26 '18 at 7:56






                • 3





                  I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                  – Gregorio Litenstein
                  Apr 15 '18 at 19:53
















                14














                Update Jul 2017: RCDefaultApp and lstool no longer work on macOS 10.12 or later. We'll have to find a new solution.



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.





                Furthering the previous answer, if you would like to do this on the command line you can use the lstool command, which is the core of RCDefaultApp, found under RCDefaultApp.prefPane/Contents/Resources/lstool.



                Its usage is straightforward:



                [~]$lstool --help
                Usage:

                lstool read [<lsscheme> [<type>]]
                lstool [-n] write <lsscheme> <type> <app>
                lstool [-n] setoption <lsscheme> <type> login|ignorecreator YES|NO
                lstool [-n] register {<app>}
                lstool [-n] unregister {<path> | <app>}
                lstool apps

                -n means do not make changes
                <lsscheme> is one of: internet, media, url, extension, uti, mime, ostype
                <app> is the path to an application or a name to be looked up





                share|improve this answer





















                • 2





                  I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                  – luckman212
                  Sep 1 '17 at 13:16













                • I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                  – SuperTempel
                  Nov 28 '17 at 14:58













                • @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                  – Quinn Comendant
                  Dec 25 '17 at 9:59











                • SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                  – Quinn Comendant
                  Mar 26 '18 at 7:56






                • 3





                  I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                  – Gregorio Litenstein
                  Apr 15 '18 at 19:53














                14












                14








                14







                Update Jul 2017: RCDefaultApp and lstool no longer work on macOS 10.12 or later. We'll have to find a new solution.



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.





                Furthering the previous answer, if you would like to do this on the command line you can use the lstool command, which is the core of RCDefaultApp, found under RCDefaultApp.prefPane/Contents/Resources/lstool.



                Its usage is straightforward:



                [~]$lstool --help
                Usage:

                lstool read [<lsscheme> [<type>]]
                lstool [-n] write <lsscheme> <type> <app>
                lstool [-n] setoption <lsscheme> <type> login|ignorecreator YES|NO
                lstool [-n] register {<app>}
                lstool [-n] unregister {<path> | <app>}
                lstool apps

                -n means do not make changes
                <lsscheme> is one of: internet, media, url, extension, uti, mime, ostype
                <app> is the path to an application or a name to be looked up





                share|improve this answer















                Update Jul 2017: RCDefaultApp and lstool no longer work on macOS 10.12 or later. We'll have to find a new solution.



                Edit Mar 2018

                I found SwiftDefaultApps but can't test as I'm not on High Sierra yet.





                Furthering the previous answer, if you would like to do this on the command line you can use the lstool command, which is the core of RCDefaultApp, found under RCDefaultApp.prefPane/Contents/Resources/lstool.



                Its usage is straightforward:



                [~]$lstool --help
                Usage:

                lstool read [<lsscheme> [<type>]]
                lstool [-n] write <lsscheme> <type> <app>
                lstool [-n] setoption <lsscheme> <type> login|ignorecreator YES|NO
                lstool [-n] register {<app>}
                lstool [-n] unregister {<path> | <app>}
                lstool apps

                -n means do not make changes
                <lsscheme> is one of: internet, media, url, extension, uti, mime, ostype
                <app> is the path to an application or a name to be looked up






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 24 '18 at 9:27









                Tetsujin

                15.8k53362




                15.8k53362










                answered Sep 12 '13 at 21:49









                Quinn ComendantQuinn Comendant

                69178




                69178








                • 2





                  I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                  – luckman212
                  Sep 1 '17 at 13:16













                • I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                  – SuperTempel
                  Nov 28 '17 at 14:58













                • @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                  – Quinn Comendant
                  Dec 25 '17 at 9:59











                • SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                  – Quinn Comendant
                  Mar 26 '18 at 7:56






                • 3





                  I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                  – Gregorio Litenstein
                  Apr 15 '18 at 19:53














                • 2





                  I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                  – luckman212
                  Sep 1 '17 at 13:16













                • I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                  – SuperTempel
                  Nov 28 '17 at 14:58













                • @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                  – Quinn Comendant
                  Dec 25 '17 at 9:59











                • SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                  – Quinn Comendant
                  Mar 26 '18 at 7:56






                • 3





                  I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                  – Gregorio Litenstein
                  Apr 15 '18 at 19:53








                2




                2





                I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                – luckman212
                Sep 1 '17 at 13:16







                I found a possible replacement for RCDefaultApp at github.com/Lord-Kamina/SwiftDefaultApps although you will have to build it yourself with Xcode.

                – luckman212
                Sep 1 '17 at 13:16















                I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                – SuperTempel
                Nov 28 '17 at 14:58







                I'm using version 2.1 of RCDefaultApp and it works just fine for me on 10.12. At least is still lists all items. Or does only some specific operation not work any more? Please elaborate

                – SuperTempel
                Nov 28 '17 at 14:58















                @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                – Quinn Comendant
                Dec 25 '17 at 9:59





                @SuperTempel The lstool command-line tool displays this error when you try to run it: objc[1049]: Objective-C garbage collection is no longer supported. (lstool is the internal program used by the RCDefaultApp preference pane. While the preference pane appears to work, I don't think it can do anything because lstool is broken.)

                – Quinn Comendant
                Dec 25 '17 at 9:59













                SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                – Quinn Comendant
                Mar 26 '18 at 7:56





                SwiftDefaultApps apparently doesn't work on Intel processors. No fix until at least April 2018.

                – Quinn Comendant
                Mar 26 '18 at 7:56




                3




                3





                I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                – Gregorio Litenstein
                Apr 15 '18 at 19:53





                I am the developer of SwiftDefaultApps, SWDA was coded from the beginning with macOS Sierra and higher in mind (In fact, I began working on it after much frustration reading this question and similar ones). It was not working in 10.13 largely due to a bug in either Swift or macOS itself, but it appears to have been fixed with the update to 10.13.4/Swift 4.1.

                – Gregorio Litenstein
                Apr 15 '18 at 19:53











                10














                Listing current LaunchServices URL handler settings on Apple OS X 10.10 (Yosemite):



                defaults read com.apple.LaunchServices/com.apple.launchservices.secure





                share|improve this answer
























                • Yay for using the builtin tools that don't break or require you to go download something.

                  – xdhmoore
                  Jan 12 '18 at 1:18
















                10














                Listing current LaunchServices URL handler settings on Apple OS X 10.10 (Yosemite):



                defaults read com.apple.LaunchServices/com.apple.launchservices.secure





                share|improve this answer
























                • Yay for using the builtin tools that don't break or require you to go download something.

                  – xdhmoore
                  Jan 12 '18 at 1:18














                10












                10








                10







                Listing current LaunchServices URL handler settings on Apple OS X 10.10 (Yosemite):



                defaults read com.apple.LaunchServices/com.apple.launchservices.secure





                share|improve this answer













                Listing current LaunchServices URL handler settings on Apple OS X 10.10 (Yosemite):



                defaults read com.apple.LaunchServices/com.apple.launchservices.secure






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 19 '15 at 23:12









                VirtualJMillsVirtualJMills

                10112




                10112













                • Yay for using the builtin tools that don't break or require you to go download something.

                  – xdhmoore
                  Jan 12 '18 at 1:18



















                • Yay for using the builtin tools that don't break or require you to go download something.

                  – xdhmoore
                  Jan 12 '18 at 1:18

















                Yay for using the builtin tools that don't break or require you to go download something.

                – xdhmoore
                Jan 12 '18 at 1:18





                Yay for using the builtin tools that don't break or require you to go download something.

                – xdhmoore
                Jan 12 '18 at 1:18











                5














                I actually wrote an application simplifying registration of custom URL protocols, if anyone is interested. It is called LinCastor (http://onflapp.wordpress.com/lincastor/).
                Handlers can be defined as AppleScript or shell script (which can perl, python or what ever).






                share|improve this answer
























                • Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                  – Flash Sheridan
                  Feb 17 '17 at 21:15











                • That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                  – Flash Sheridan
                  Feb 25 '17 at 18:58
















                5














                I actually wrote an application simplifying registration of custom URL protocols, if anyone is interested. It is called LinCastor (http://onflapp.wordpress.com/lincastor/).
                Handlers can be defined as AppleScript or shell script (which can perl, python or what ever).






                share|improve this answer
























                • Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                  – Flash Sheridan
                  Feb 17 '17 at 21:15











                • That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                  – Flash Sheridan
                  Feb 25 '17 at 18:58














                5












                5








                5







                I actually wrote an application simplifying registration of custom URL protocols, if anyone is interested. It is called LinCastor (http://onflapp.wordpress.com/lincastor/).
                Handlers can be defined as AppleScript or shell script (which can perl, python or what ever).






                share|improve this answer













                I actually wrote an application simplifying registration of custom URL protocols, if anyone is interested. It is called LinCastor (http://onflapp.wordpress.com/lincastor/).
                Handlers can be defined as AppleScript or shell script (which can perl, python or what ever).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 24 '13 at 21:42









                On FlappOn Flapp

                5911




                5911













                • Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                  – Flash Sheridan
                  Feb 17 '17 at 21:15











                • That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                  – Flash Sheridan
                  Feb 25 '17 at 18:58



















                • Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                  – Flash Sheridan
                  Feb 17 '17 at 21:15











                • That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                  – Flash Sheridan
                  Feb 25 '17 at 18:58

















                Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                – Flash Sheridan
                Feb 17 '17 at 21:15





                Very nice idea, but I’m afraid I can’t get the supplied example script to work. More on your blog, awaiting moderation: getitdoneapps.wordpress.com/lincastor-browser/support/…

                – Flash Sheridan
                Feb 17 '17 at 21:15













                That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                – Flash Sheridan
                Feb 25 '17 at 18:58





                That seemed to be some baffling line-break weirdness in the example file, diagnosed by running the script from the command line. (“/bin/sh: bad interpreter: Operation not permitted”) Saving a copy in BBEdit, and changing and recharging the line breaks to/from Windows, worked around the problem.

                – Flash Sheridan
                Feb 25 '17 at 18:58











                5














                Open the file with XCode works quite easy.



                Using the build in command plutil as described in the answer on https://discussions.apple.com/thread/5815759 to convert between format xml1 or binary1 works similar.



                plutil -convert xml1 /file-i-wish

                nano /file-i-wish & save file

                plutil -convert binary1 /file-i-wish


                No need for 'alien' tools :-)






                share|improve this answer






























                  5














                  Open the file with XCode works quite easy.



                  Using the build in command plutil as described in the answer on https://discussions.apple.com/thread/5815759 to convert between format xml1 or binary1 works similar.



                  plutil -convert xml1 /file-i-wish

                  nano /file-i-wish & save file

                  plutil -convert binary1 /file-i-wish


                  No need for 'alien' tools :-)






                  share|improve this answer




























                    5












                    5








                    5







                    Open the file with XCode works quite easy.



                    Using the build in command plutil as described in the answer on https://discussions.apple.com/thread/5815759 to convert between format xml1 or binary1 works similar.



                    plutil -convert xml1 /file-i-wish

                    nano /file-i-wish & save file

                    plutil -convert binary1 /file-i-wish


                    No need for 'alien' tools :-)






                    share|improve this answer















                    Open the file with XCode works quite easy.



                    Using the build in command plutil as described in the answer on https://discussions.apple.com/thread/5815759 to convert between format xml1 or binary1 works similar.



                    plutil -convert xml1 /file-i-wish

                    nano /file-i-wish & save file

                    plutil -convert binary1 /file-i-wish


                    No need for 'alien' tools :-)







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited May 14 '16 at 2:26









                    techraf

                    4,083111729




                    4,083111729










                    answered Oct 13 '14 at 11:23









                    Clemens TolboomClemens Tolboom

                    15014




                    15014























                        3














                        You can also use duti:



                        echo $'com.apple.mail mailtoncom.googlecode.iterm2 x-man-page'>~/.duti;duti ~/.duti





                        share|improve this answer




























                          3














                          You can also use duti:



                          echo $'com.apple.mail mailtoncom.googlecode.iterm2 x-man-page'>~/.duti;duti ~/.duti





                          share|improve this answer


























                            3












                            3








                            3







                            You can also use duti:



                            echo $'com.apple.mail mailtoncom.googlecode.iterm2 x-man-page'>~/.duti;duti ~/.duti





                            share|improve this answer













                            You can also use duti:



                            echo $'com.apple.mail mailtoncom.googlecode.iterm2 x-man-page'>~/.duti;duti ~/.duti






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Oct 25 '13 at 7:56









                            LriLri

                            31.4k590131




                            31.4k590131























                                0














                                I just tried the old More Internet, under El Capitan.



                                It is funky and the only way it works is via using the up and down arrow keys to select the protocol, and a drag/drop of the APP icon into the window to make a change.



                                I switched the default from Safari to Chrome, and the change stuck, so it works still.






                                share|improve this answer
























                                • What is this? Your answer is unclear.

                                  – lacostenycoder
                                  Aug 25 '18 at 20:23
















                                0














                                I just tried the old More Internet, under El Capitan.



                                It is funky and the only way it works is via using the up and down arrow keys to select the protocol, and a drag/drop of the APP icon into the window to make a change.



                                I switched the default from Safari to Chrome, and the change stuck, so it works still.






                                share|improve this answer
























                                • What is this? Your answer is unclear.

                                  – lacostenycoder
                                  Aug 25 '18 at 20:23














                                0












                                0








                                0







                                I just tried the old More Internet, under El Capitan.



                                It is funky and the only way it works is via using the up and down arrow keys to select the protocol, and a drag/drop of the APP icon into the window to make a change.



                                I switched the default from Safari to Chrome, and the change stuck, so it works still.






                                share|improve this answer













                                I just tried the old More Internet, under El Capitan.



                                It is funky and the only way it works is via using the up and down arrow keys to select the protocol, and a drag/drop of the APP icon into the window to make a change.



                                I switched the default from Safari to Chrome, and the change stuck, so it works still.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Jul 13 '16 at 2:42









                                Calgary GuruCalgary Guru

                                1




                                1













                                • What is this? Your answer is unclear.

                                  – lacostenycoder
                                  Aug 25 '18 at 20:23



















                                • What is this? Your answer is unclear.

                                  – lacostenycoder
                                  Aug 25 '18 at 20:23

















                                What is this? Your answer is unclear.

                                – lacostenycoder
                                Aug 25 '18 at 20:23





                                What is this? Your answer is unclear.

                                – lacostenycoder
                                Aug 25 '18 at 20:23











                                0














                                Another way to list current LaunchServices URL handler settings with Xcode on Apple OS X 10.10+ (Yosemite):



                                open -a Xcode ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist





                                share|improve this answer




























                                  0














                                  Another way to list current LaunchServices URL handler settings with Xcode on Apple OS X 10.10+ (Yosemite):



                                  open -a Xcode ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist





                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    Another way to list current LaunchServices URL handler settings with Xcode on Apple OS X 10.10+ (Yosemite):



                                    open -a Xcode ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist





                                    share|improve this answer













                                    Another way to list current LaunchServices URL handler settings with Xcode on Apple OS X 10.10+ (Yosemite):



                                    open -a Xcode ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered May 12 '17 at 9:20









                                    oikonomopooikonomopo

                                    1054




                                    1054






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Super User!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f548119%2fhow-do-i-configure-custom-url-handlers-on-os-x%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                        Mangá

                                        Eduardo VII do Reino Unido