Open address in external application from inside Chrome Browser

Posted on

Problem :

enter image description here

After Chrome browser has abandoned NPAPI-based extensions (which included addons for this purpose, similar to Openwith and Flashgot from Firefox) is there a way of sending a link from the browser to an external application (like other browser, a video player, custom downloader, etc.)?

This NPAPI addon is called just like that: “Open with external application”.

Is there an alternative to that given the change that took place?

Solution :

One cannot any more directly call on Chrome an external application except via
a dedicated extension, but I could not find one that does not use NPAPI.

There is still one method that should work, that needs to be set up in
the operating system: Custom Protocols, called also Custom URI Schemes.

A URI scheme is the part that one find at the beginning of the URL.
Some common ones are : http(s)://, ftp://, feed://, mailto:, news:.
The list of all known ones can be found in the IANA list of
Uniform Resource Identifier (URI) Schemes.

All that these protocols do is launch an application that handles the parameter.
Once the application has successfully launched, it can use command-line parameters to retrieve the URI that launched it.
The usual method is to call a known script that processes its argument
and launches the required program.

Including here a tutorial for Windows, Linux and Mac is much too heavy,
but here are some useful references :


To answer the request by the poster, below is a Linux KDE script that sets
/path/prog as handler for the protocol xyz://. It creates for KDE the file
$KDEDIR/share/services/xyz.protocol and populates it.
The Gnome settings are also set (if possible) since some applications still use them
even if running on KDE.
The script is adapted from github.

#!/usr/bin/env bash
#
# This script attempts to register a protocol handler for
# links that look like sgaction://blah.
#
# It should be sufficient for gnome apps like pidgin and kde apps
# like konqueror. Firefox seems to pay attention to the gnome
# settings at least to the degree that it recognizes links of the
# form $protocol://blah as hot-links, but it may still ask you to
# select the application the first time you click on one.

protocol=xyz
handler="/path/prog"

echo "Installing $protocol protocol handler for Gnome."

gconfTool="$(which gconftool-2)"
if [[ "$gconfTool" ]]; then
gconftool-2 --set --type=string /desktop/gnome/url-handlers/$protocol/command "$handler "%s""""

Leave a Reply

Your email address will not be published.