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.
You should consider adding a RDF schema in your
~/.mozilla/firefox/PROFILE/mimeTypes.rdf
file, such as:Or, if this doesn't work:
When the Launch Application dialog comes up for the first time, click the box that says "Remember my choice", then click OK.
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:
Now you can edit the scheme-handler file and add your own entry. I hope this helps you!