6

I want specific urls to open certain desktop apps, but I want to detect the urls with my own rules. I am running OS X, but if there's an OS independent way to do that, I'd prefer that. Is there a way to do that?

In chrome web apps can apparently register a content handler and have their web app handle specific urls instead of opening in a new tab (or whatever). I am curious if I can add these myself? (stackoverflow reference)

I went to Settings > Show Advanced Settings... > Content Settings... (in Privacy) > Manage Handlers. There seems to be a list of handlers there, but I don't see how I can add one. Should I just create a Chrome Plugin?

I also know there is BrowserFairy that sounds like it does what I want on OS X...

Thanks.

5
  • 1
    "I want specific urls to open certain apps" - Apps as in web apps or standalone apps? If the latter, on which OS? (Your post mentions OSX, but doesn't specify if that's what you're using.)
    – Karan
    Dec 3, 2012 at 16:38
  • Thanks @Karan, I updated the question, but standalone desktop apps and I am running OS X, but OS independent would be more helpful.
    – xbakesx
    Dec 3, 2012 at 16:56
  • Hmm, I'm not entirely sure registerProtocolHandler will allow you to launch desktop apps due to obvious security issues. I believe you'll need to register the protocol handler with the OS itself. I know of a way to do this on Windows, but I don't have Chrome so you'll have to test it. (I tested it on IE and FF though and it works.)
    – Karan
    Dec 3, 2012 at 17:07
  • How do you do it on Windows? I am also pretty sure it can launch desktop applications because that's how iTunes and the App Store urls work... Then again those are also native Apple apps, so maybe they have exceptions for that
    – xbakesx
    Dec 3, 2012 at 17:14
  • Added an answer below with the info. for Windows. If there's no generic Chrome-only way of doing this irrespective of the OS, you might be better off with separate questions per OS.
    – Karan
    Dec 3, 2012 at 17:21

2 Answers 2

5

On Windows you can either register the custom URL protocol handler manually by following the Registering an Application to a URL Protocol MSDN article, or you can use a small app called CustomURL that automates this. Just add the handler as below (I believe Chrome requires the "web+" prefix) and the app will handle the registry edits, as well as the actual app launching and passing of the URL:

1

1
1

In OSX you need to include a CFBundleURLTypes in your application's info.plist file. Here is a sample you can use:

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

If you need more information, check this blog post . it's a bit old but still valid.

You must log in to answer this question.

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