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
I had this behaviour with Firefox too. It was opening PDFs, .DOCs, .DOCXs, etc with Gedit. Very annoying. Didn't matter than the Applications list in Firefox specified LibreOffice, Evince, etc., as the preferred application UNLESS I clicked on the 'Show All Downloads' link at the bottom of the downloads menu (in the firefox taskbar).
To fix this, I opened
.local/share/applications/mimeapps.list
and removed the association ofapplication/octet-stream
withgedit.desktop
. Doing that restored the normal/expected behaviour.This clearly highlights a bug in Firefox, which is that it sometimes uses its applications list, but not always (as of version 35.0.1 on Ubuntu 12.04).
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
.There are default programs
xdg-open
andgnome-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.
Solution
This is everything you need BEGIN
END
I have got to this conclusion by using find, ubuntu-tweak- inotifywatch
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.
To add to SMeznaric's top post: I checked the Firefox preferences and both deb entries were already ubuntu software center. A workaround was to change the default option to 'save file', since at least this works. Clicking them in the downloads folder in Thunar works as normal and you have a copy in a logical place (rather than /tmp/mozilla-firefox0)
I had this problem, along with Firefox's Preferences->Applications window being totally blank.
Did the following:
It fixed both issues (for now, I'll check back in if it recurs) and all of my settings and plugins are still intact.