Adding x-scheme-handler without a popup in firefox

Tags:

Answer: 1

9 hours ago

I have written a simple application which registers an "x-scheme-handler" in the .desktop file. Something like this:-

[Desktop Entry]
Name=Foo
Exec=/usr/bin/foo %u
Type=Application
NoDisplay=true
Categories=System;
MimeType=x-scheme-handler/foo;

This allows a user to click a foo:// link in the browser to launch my app. However firefox pops up a "Launch Application" dialog box to ask the user which application to launch, with mine being the default.

How can I suppress this dialog box so that firefox just launches the application without requiring the popup confirmation.

Added by: Dr. Gail Conn DDS

Answer: 2

26 hours ago

You should consider adding a RDF schema in your ~/.mozilla/firefox/PROFILE/mimeTypes.rdf file, such as:

<RDF:Description RDF:about="urn:scheme:foo"
               NC:value="foo">
               <NC:handlerProp RDF:resource="urn:scheme:handler:foo"/>
</RDF:Description>

Or, if this doesn't work:

<RDF:Description RDF:about="urn:mimetype:handler:foo"
   NC:alwaysAsk="false"
   NC:useSystemDefault="true"
   NC:saveToDisk="false">
   <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:foo"/>
</RDF:Description>

Answer: 3

33 hours ago

When the Launch Application dialog comes up for the first time, click the box that says "Remember my choice", then click OK.

firefox launch application dialog

Added by: Assunta Wisoky

Answer: 4

7 hours ago

Firefox has got a system that recognizes the file extension or browser bar extension. In the Firefox Preferences (Menu -> Edit -> Preferences -> Applications) you can specify what to do when opening which file.

That what you are looking for is an application protocol. With this, you can open a specific file or launch an application.

These scheme-handlers are stored in a the file ~/.mozilla/firefox/YOUR_PROFILE_ID/mimeTypes.rdf. Open the .rdf file with gedit or your favorite text editor.

Now you should see XML text. You can divide the file into a header, the schemes and the footer.

A normal entry looks like this:

<RDF:Description RDF:about="urn:scheme:NAME"
     NC:value="ENTER YOUR VALUE">
    <NC:handlerProp RDF:resource="urn:scheme:handler:NAME"/>
</RDF:Description>

Now you can edit the scheme-handler file and add your own entry. I hope this helps you!

Added by: Tyler Maggio

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9