10
4
For example, if I enter steam://connect/127.0.0.1
in the Omnibox, it will search for the URL instead of launching the program that handles that protocol.
How can Chrome be configured to treat custom protocols correctly?
10
4
For example, if I enter steam://connect/127.0.0.1
in the Omnibox, it will search for the URL instead of launching the program that handles that protocol.
How can Chrome be configured to treat custom protocols correctly?
11
This can be adjusted in Chrome's Local State
file.
The exact location depends on your OS. For example:
%LOCALAPPDATA%\Google\Chrome\User Data\Local State
on Windows 7.~/Library/Application Support/Google/Chrome/Local State
on Mac OS X 10.8.~/.config/google-chrome/Local State
on Ubuntu 12.04.Steps:
Close Google Chrome.
Open the Local State
file and search for excluded_schemes
in protocol_handler
.
Add the line
"steam": false,
to excluded_schemes
.
Restart Google Chrome.
Right now on Windows 10 this setting is located in the file: %LOCALAPPDATA%\Google\Chrome\User Data\Default\Preferences – Tomer Godinger – 2017-07-29T13:30:22.317
Hmm, that’s strange. ed2k://
and magnet:
work fine without having to manually change anything. What’s special/wrong with steam://
? Maybe the program didn’t register the protocol correctly? I assume that Steam has an associate function… – Synetech – 2012-07-20T15:09:46.717
I'm not sure, but I suppose Google has those predefined. There's no entry for any of the common protocols: http
, ftp
, etc. I just know I had to add it for Skype. – Dennis – 2012-07-20T15:12:27.267
Nope. I just checked and Chrome does not include any protocols by default (create a new profile and then check the Local State
file; it will not even have a protocol_handler
section). Further, setting it to true
does not make it search, it makes it do nothing whatsoever, so that can’t be the problem. – Synetech – 2012-07-20T15:44:23.850
By by default, I meant that Chrome recognized the protocol natively, so there's no need to create a Local State
entry. But that's just a guess. I don't know if the "steam": false,
entry is the proper way to achieve this, but it definitely worked for skype://
. – Dennis – 2012-07-20T16:01:41.853
Do you mean that it was set to true
for Skype? – Synetech – 2012-07-20T16:06:12.900
No, it was just missing. But whether it's missing or set to true
, Skype links aren't recognized. That might be a bug, as far as the true
entry is concerned. – Dennis – 2012-07-20T16:08:11.453
Is there a way to make this work for every protocol rather than adding them one by one manually? – Avery3R – 2012-07-20T16:10:10.830
@MMavipc: Not that I know of. This would also have the unpleasant side effect of typo://url
silently failing. – Dennis – 2012-07-20T16:14:17.420
Where's this file under Linux? – Behrang Saeedzadeh – 2012-11-28T00:02:16.977
1@Behrang: As stated in my answer, the file's full path is ~/.config/google-chrome/Local State
on Ubuntu 12.04. I wouldn't know about other distributions. – Dennis – 2012-11-28T02:12:55.150
This was an excellent answer. We had to modify this to get the Atlassian SourceTree handler to work. Thanks! – Bob King – 2014-06-04T13:06:30.433
1
As a reference it looks like Custom URIs not being followed in the Omnibox or when passed as a command line parameter is known issue 560809 in Chromium.
As of writing the issue does not describe any workarounds :/
1Looks like this issue was fixed April 10 2018. Version 66.0.3359.170 works. Woo! – CrazyTim – 2018-05-15T06:27:23.623
Did you ever get the dialog box asking you for permission to launch an external program? – Synetech – 2012-07-20T15:44:47.997