Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

[Desktop Entry]
Exec=/usr/bin/foo %u

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.

share|improve this question
... I presume you mean to open "automatically"? I note that the software-center is not opened by default when you click apt links - you get the launch application dialog but if you click the little check box at the bottom then it always opens. Which app type does not open the launch application dialog by default? – fossfreedom Jul 17 '12 at 22:34

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:handlerProp RDF:resource="urn:scheme:handler:foo"/>

Or, if this doesn't work:

<RDF:Description RDF:about="urn:mimetype:handler:foo"
   <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:foo"/>
share|improve this answer
That could work, but I don't think packages are 'allowed' to monkey with data in home during install are they? So my application wouldn't be able to do this, but perhaps there is a system wide place that could be modified by root? – popey Jul 13 '12 at 13:35
They should, as you're installing/upgrading as sudoer. Anyway, you could consider to add the new mimetype to /etc/mime.types too, and install xul-ext-ubufox package to make Firefox file associations consistent with Ubuntu file associations. – jasmines Jul 13 '12 at 15:54

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

share|improve this answer

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"/>

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.