Difference between revisions of "Firefox/protocols"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<hide>
 +
[[page type::article]]
 +
[[thing type::software feature]]
 +
</hide>
 
==Adding a New Protocol==
 
==Adding a New Protocol==
 +
{{hdr/warning|'''Note''': This does not appear to work with the Snap-installed deployment of Firefox on [[Ubuntu]]. Something interferes with Firefox's ability to run the executable, though it is able to run some other executables such as the Zoom desktop client. One easy-ish workaround is to simply download the Firefox binary and execute that directly.}}
 +
 
To add a new protocol -- e.g. <code>wooz://</code> -- you add the following entries to <code>about:config</code>:
 
To add a new protocol -- e.g. <code>wooz://</code> -- you add the following entries to <code>about:config</code>:
  network.protocol-handler.app.{{arg|protocol}} = /usr/share/bin
+
  network.protocol-handler.app.{{arg|protocol}} = {{arg|path to executable}}
 
  network.protocol-handler.expose.{{arg|protocol}} = false
 
  network.protocol-handler.expose.{{arg|protocol}} = false
 
  network.protocol-handler.external.{{arg|protocol}} = true
 
  network.protocol-handler.external.{{arg|protocol}} = true
Line 12: Line 18:
 
Protocol handlers appear in Settings (<code>about:preferences</code>) under "Applications", and can be edited or deleted from there.
 
Protocol handlers appear in Settings (<code>about:preferences</code>) under "Applications", and can be edited or deleted from there.
 
==Links==
 
==Links==
 +
===Reference===
 +
* MozKB:
 +
** [http://kb.mozillazine.org/Register_protocol Register protocol]: instructions for various versions of Firefox under different OSes, but doesn't explain what the config entries do
 +
** [http://kb.mozillazine.org/Network.protocol-handler.app.%28protocol%29 network.protocol-handler.app.(protocol)]: main article
 +
** [http://kb.mozillazine.org/Network.protocol-handler.expose-all network.protocol-handler.expose-all]: setting this FALSE may result in Firefox asking permission to load "https" links on a per-domain basis, which isn't generally what we want.
 +
** [http://kb.mozillazine.org/Network.protocol-handler.expose.%28protocol%29 network.protocol-handler.expose.(protocol)]
 +
 +
===Posts===
 
* '''2017-07-30''' [https://support.mozilla.org/en-US/questions/1169576 I want to register a custom protocol handler in Firefox/Linux] @Mozilla Support
 
* '''2017-07-30''' [https://support.mozilla.org/en-US/questions/1169576 I want to register a custom protocol handler in Firefox/Linux] @Mozilla Support

Latest revision as of 15:56, 6 June 2022

Adding a New Protocol

Note: This does not appear to work with the Snap-installed deployment of Firefox on Ubuntu. Something interferes with Firefox's ability to run the executable, though it is able to run some other executables such as the Zoom desktop client. One easy-ish workaround is to simply download the Firefox binary and execute that directly.

To add a new protocol -- e.g. wooz:// -- you add the following entries to about:config:

network.protocol-handler.app.<protocol> = <path to executable>
network.protocol-handler.expose.<protocol> = false
network.protocol-handler.external.<protocol> = true

...where in this case <protocol> would be wooz.

The value of the first line may be arbitrary, as Firefox will let you browse for the executable to use when handling a link.

(To add an item to about:config, search for it. The UI will give you the option to add or modify. [1])

Protocol handlers appear in Settings (about:preferences) under "Applications", and can be edited or deleted from there.

Links

Reference

Posts