Why Chrome on Linux shows "External protocol request" dialog for unknown protocol? -


i creating custom protocol handler google chrome on linux. link looks this:

<a href="myprotocol:someargument">trigger app param</a> 

i have noticed if 'myprotocol:' not registered (my app not installed), google chrome on linux displays "external protocol request" dialog , tries use xdg-open:

enter image description here

while on other os, such windows 10 , os x el capitan nothing displayed if protocol not registered.

i have verified firefox works consistently unknown protocols on windows, os x , linux - nothing displayed.

chrome behavior on linux quite confusing users.

any idea why chrome on linux (i testing on ubuntu 14.04) acts differently other os , web browsers?

the issue if chrome lacks local protocol handler wants use handler configured in user's environment. no 2 oses provide same api launch default handler. figuring out program before launching not clear api on windows or linux.

both "mac" , windows implementations end knowing external application responsible protocol , therefore able suppress unhandled calls without issuing call warning. windows implementation kludge relies on observations of windows registry on existing versions on windows. type of api violation more dangerous on linux many flavors have different forks of related settings tools.

it considered bug windows , osx don't issue alternate warning they've called nothing, may want comment here if think right behavior.

here observation of how 3 systems work based on current source:

linux

in linux, when register protocol handlers (window) system, like:

xdg-settings set default-url-scheme-handler myprotocol evolution.desktop 

now, application evolution responsible protocol , can call:

 xdg-open myprotocol:... 

to open evolution on these links. other oses have similar mechanisms, may not have external program call stub.

this nice , abstract , knowing/saying external app calling xdg-open prevents complication in linux implementation. not information user wants. getting information require using xdg-settings instead , risks being incorrect if there or ever way conditionally override default handler in flavors of system.

windows

in windows handler, apparently can go snooping around in registry , make educated guess calling api going do. technically, chrome has since way opens external programs through system api, there not external stub xdg-open refer in warning.

mac

in "mac" handler, there proper api ask app specific url launch, chrome does, if application name empty string can drop call before generating warning.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -