Register protocol: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(added SeaMonkey "not a registered protocol: screenshot, examples of browser, mail and RealPlayer programs registering a protocol.)
(removed images, which don't add that much. Added "external protocol request info, Note about Moz/SM integration; expanded Troubleshooting, linked to related SUMO article)
Line 1: Line 1:
A [http://en.wikipedia.org/wiki/Protocol_%28computing%29 protocol] is a method that is used to send, receive, and handle information over a connection. Common protocols viewed from the browser include ''http'', ''https'', ''ftp'', and ''mailto''. In order for you to view information sent over a specific protocol, it must be registered.   Once registered, the protocol can then be handled by the program you specify, such as your browser or a third party viewer. This means that a hyperlink ( e.g. foo://fred ) can use the handler for protocol ''foo'' to open the file named ''fred''.  If a protocol is not registered, you will receive the message, ''protocol (foo) isn't associated with any program'' (Firefox) or ''foo is not a registered protocol'' (Mozilla Suite/SeaMonkey). {{Right-pic|SMnotaRegisteredProtocol.PNG}}
A [http://en.wikipedia.org/wiki/Protocol_%28computing%29 protocol] is a method that is used to send, receive, and handle information over a connection. Common protocols viewed from the browser include ''http'', ''https'', ''ftp'', and ''mailto''. In order for you to view information sent over a specific protocol, it must be registered.   If  you enter a URL for an unknown protocol (foo) in the Location Bar, you will receive a message such as, ''Firefox doesn't know how to open this address, because the protocol (foo) isn't associated with any program'' or, in Mozilla Suite/SeaMonkey,  ''foo not a registered protocol''.  


Once registered, the protocol can then be handled by the program you specify, such as your browser or a third party viewer.  This means that a hyperlink ( e.g. foo://fred) can use the handler for protocol ''foo'' to open the file named ''fred''. 
 
==Windows==
==Windows==
On Windows, registration is done by the operating system (OS).  For example, when you set a web browser as the [[default browser]], the OS will register the http, https and ftp protocols so that they are associated with that web browser and when you set a mail program as the [[default mail client]], the OS will register the ''mailto'' protocol so that it uses that mail program.   As another example, you can set [[RealPlayer]] as the registered protocol handler for RTSP ([http://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol Real Time Streaming Protocol]) using RealPlayer's advanced preference settings for Media Types [http://forums.mozillazine.org/viewtopic.php?p=2031121#2031121]).   
On Windows, registration is done by the operating system (OS).  For example, when you set a web browser as the [[default browser]], the OS will register the ''http'', ''https'' and ''ftp'' protocols and associate them with that web browser.  When you open a URL link in another application such as Thunderbird,  it will launch your default browser.  Similarly, when you set a [[default mail client]], the OS registers the ''mailto'' protocol so that ''mailto'' links in your browser that let you compose a mail message will open your default mail program.
 
Note: Mozilla Suite and SeaMonkey integrate handling of mail and browser URLs, regardless of the default mail and browser applications. Web URL links  (e.g.,  http, https and ftp) that are opened from SeaMonkey Mail will open a SeaMonkey browser window and mailto links in a SeaMonkey browser window will be handled by SeaMonkey Mail.   
 
Other protocols can be registered to associate URLs with external applications.  For example, you can set [[RealPlayer]] as the registered protocol handler for RTSP ([http://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol Real Time Streaming Protocol]) using RealPlayer's advanced preference settings for content Media Types.  When you next  open  a URL for the protocol, Firefox or Mozilla Suite/SeaMonkey will ask you to confirm the external protocol request before it will launch the application  [http://forums.mozillazine.org/viewtopic.php?p=2031121#2031121] [https://bugzilla.mozilla.org/show_bug.cgi?id=202715].   


It is also possible to register a protocol by creating a .reg file such as the following, and placing this in the file:
It is also possible to register a protocol by creating a .reg file such as the following, and placing this in the file:
Line 28: Line 34:


==Troubleshooting==
==Troubleshooting==
* If the path or name is incorrect, Firefox will display an error saying "protocol (foo) isn't associated with any program". (See [https://bugzilla.mozilla.org/show_bug.cgi?id=312953 bug 312953]).<br/>
* (''Linux and Mac'') If the path or name is incorrect when setting the '''network.protocol-handler.app.(protocol)''' preference , Firefox will display an error saying "protocol (foo) isn't associated with any program". ([https://bugzilla.mozilla.org/show_bug.cgi?id=312953 bug 312953])
[[Image:Protocol is not associated.PNG]]
* If you receive a message in Firefox that the ''mailto'' protocol is not associated with any program, reset your [[default mail client]]. [http://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=20432&forumId=1]
*Certain unsafe protocols are ignored by default ([https://bugzilla.mozilla.org/show_bug.cgi?id=173010 bug 173010]).


==See also==
==See also==
Line 35: Line 42:
*[[network.protocol-handler.external.(protocol)]]
*[[network.protocol-handler.external.(protocol)]]


==External links==
[http://support.mozilla.com/kb/The+protocol+is+not+associated+with+any+program The protocol is not associated with any program (Firefox Support)]


[[Category:Configuration]]
[[Category:Configuration]]
[[Category:Integration with external applications - browser]]
[[Category:Integration with external applications - browser]]
[[Category:Mozilla Suite]]
[[Category:Mozilla Suite]]

Revision as of 15:57, 8 March 2008

A protocol is a method that is used to send, receive, and handle information over a connection. Common protocols viewed from the browser include http, https, ftp, and mailto. In order for you to view information sent over a specific protocol, it must be registered. If you enter a URL for an unknown protocol (foo) in the Location Bar, you will receive a message such as, Firefox doesn't know how to open this address, because the protocol (foo) isn't associated with any program or, in Mozilla Suite/SeaMonkey, foo not a registered protocol.

Once registered, the protocol can then be handled by the program you specify, such as your browser or a third party viewer. This means that a hyperlink ( e.g. foo://fred) can use the handler for protocol foo to open the file named fred.

Windows

On Windows, registration is done by the operating system (OS). For example, when you set a web browser as the default browser, the OS will register the http, https and ftp protocols and associate them with that web browser. When you open a URL link in another application such as Thunderbird, it will launch your default browser. Similarly, when you set a default mail client, the OS registers the mailto protocol so that mailto links in your browser that let you compose a mail message will open your default mail program.

Note: Mozilla Suite and SeaMonkey integrate handling of mail and browser URLs, regardless of the default mail and browser applications. Web URL links (e.g., http, https and ftp) that are opened from SeaMonkey Mail will open a SeaMonkey browser window and mailto links in a SeaMonkey browser window will be handled by SeaMonkey Mail.

Other protocols can be registered to associate URLs with external applications. For example, you can set RealPlayer as the registered protocol handler for RTSP (Real Time Streaming Protocol) using RealPlayer's advanced preference settings for content Media Types. When you next open a URL for the protocol, Firefox or Mozilla Suite/SeaMonkey will ask you to confirm the external protocol request before it will launch the application [1] [2].

It is also possible to register a protocol by creating a .reg file such as the following, and placing this in the file:

REGEDIT4

[HKEY_CLASSES_ROOT\foo]
@="URL:foo Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\foo\shell]

[HKEY_CLASSES_ROOT\foo\shell\open]

[HKEY_CLASSES_ROOT\foo\shell\open\command]
@="\"C:\\Program Files\\Application\\program.exe\" \"%1\"" 

Replace foo with the protocol you're specifying and C:\\Program Files\\Application\\program.exe with the program you want to run. Note that backslashes must be doubled and the additional slashes and quotes before the path must not be removed. Save the file, then double-click it to insert into the Windows registry. See Registering an Application to a URL Protocol for additional information.

Linux and Mac

  • Type about:config into the address bar and press Enter.
  • Right-click -> New -> Boolean -> Name: network.protocol-handler.external.foo -> Value -> true (Replacing foo with the protocol you're specifying)
  • Right-click -> New -> String -> Name: network.protocol-handler.app.foo -> Value -> /path/to/app (Replacing foo with the protocol you're specifying and /path/to/app with the path to the application you want to run.
  • Ensure network.protocol-handler.expose-all is set to true.

Troubleshooting

  • (Linux and Mac) If the path or name is incorrect when setting the network.protocol-handler.app.(protocol) preference , Firefox will display an error saying "protocol (foo) isn't associated with any program". (bug 312953)
  • If you receive a message in Firefox that the mailto protocol is not associated with any program, reset your default mail client. [3]
  • Certain unsafe protocols are ignored by default (bug 173010).

See also


External links

The protocol is not associated with any program (Firefox Support)