Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Firefox 15 on Ubuntu 12.04.

If I go to a website with a .deb link, Firefox downloads the file, then tries to open it with gedit. If I use Nautilus to open the .deb file, it runs it in either gdebi or Ubuntu Software Center (I've experimented with both).

Oddly, no matter what I've done I can't seem to get Firefox to believe that debs should not be opened by gedit. See below from my mimeapps.list. Also, there are no references to my .deb files in /usr/share/applications/defaults.list

FF Opening In Dialog



share|improve this question
Change the mime type settings in firefox application settings.Im not sure what the desktop stuff has to do with your case.For instance if you picked save file instead of open with then clicked the saved .deb it should open as its supposed to however the action taken is through firfox. –  damien Sep 7 '12 at 14:42

3 Answers 3

up vote 11 down vote accepted

Firefox also has its own application list. Check Preferences->Applications, then find the Debian files. It probably says "Always ask" next to it if you haven't changed anything. If you click on "Always ask" you can select "Use other" and pick the Ubuntu software center or Synaptic or whatever you'd like it to be (though unfortunately you will have to use the file finder to actually get to the application file, which can be a slight annoyance). The Ubuntu Software Center is in /usr/bin/software-center and gdebi can be found in /usr/bin/gdebi-gtk.

share|improve this answer
This is where I use gdebi-gtk. It's much smaller and faster than USC or synaptic. Plus, gdebi still provides a description of the app and will handle dependancies. It can be found at /usr/bin/gdebi-gtk. –  matt davis Sep 7 '12 at 16:53
Thanks both of you. @Matt Davis, I configured your variant as I agree regarding smaller/faster. –  Kendor Sep 7 '12 at 20:43
To find 'where's an application' You can just use 'which' command. It's like 'which firefox'. –  kcpr May 7 '14 at 18:40

There are default programs xdg-open and gnome-open which automatically select appropriate tool for a file.

I managed to find out that its enough to change association for unknown type and everything works fine.


This is everything you need BEGIN

sed 's#.*octet-stream.*#application/octet-stream=gnome-open.desktop#' ~/.local/share/applications/mimeapps.list -i


I have got to this conclusion by using find, ubuntu-tweak- inotifywatch

share|improve this answer
This works like a charm. Now all previously "unknown" filetypes are downloaded by default. Clicking the downloaded file (for example .ppt) opens it in the appropriate program (LibreOffice), not gedit. –  np8 Nov 29 '14 at 11:17

This occurs because some packages break your mime-type-application bindings.

I got the same and removed the list file in my home directory but that will only last until you update the software again that is causing this.

To fix the issue, you need to set the apps for the mime-type accordingly. The settings in /usr/share/applications/defaults.list should be correct.

You will notice that these ".desktop" files are located in /usr/share/applications/; you can use any in there and even create your own, with root privileges.

share|improve this answer
I assume the entries "application/x-deb=ubuntu-software-center.desktop & application/x-debian-package=ubuntu-software-center.desktop" are correct in this instance, i.e. if one has this, things are already correct. –  dez93_2000 Oct 25 '14 at 18:14

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.