General Computing
linux firefox fedora gnome mime-types
Updated Fri, 20 May 2022 22:31:37 GMT

Firefox tries to open application/octet-stream with gedit

I'm using Firefox 41.0.1 on Fedora 22.

I noticed this behaviour when I was trying to open a PNG image link on a GitLab site. The server replies with "Content-Disposition:"inline; filename="logo.png" and Content-Type:"application/octet-stream".

I want it to either display the image on the browser, or offer me to open it on the system default image viewer. I know it is possible, at least in Windows. See the GIF below kindly provided by @JourneymanGeek:

enter image description here

I made some tests using this tool and, apparently, when I click a link and the response headers contains the application/octet-stream mime type, Firefox offers me to open the file using gedit, stating it's the default application.

enter image description here

  • If I download the file (in this case, a PNG image) and double-click on it, it opens on Eye of Gnome.
  • xdg-open also opens it in Eye of Gnome.
  • application/octet-stream isn't present on /usr/share/applications/defaults.list
  • $ grep "gedit" /usr/share/applications/defaults.list returns only text/plain=org.gnome.gedit.desktop
  • I have removed the ~/.mozilla/firefox/<profile>/mimeTypes.rdf file and the issue persits.
  • I have also removed the ~/.local/share/applications/mimeapps.list file and the issue still persists.
  • I have restarted Firefox and logged out of my Gnome profile as well.

Here's the Firefox file association screen:

enter image description here

So, again, my question is: is it possible to have Firefox either display the file on the browser (if it is a file it's able of rendering), or offering the correct application able of rendering it (if there's one on the system)?

Or does the server declaring the incorrect mime-type renders it all impossible?

Also, why is it thinking gedit is the default octet-stream handler? Is this correct?


I have also removed the ~/.local/share/applications/mimeapps.list file and the issue still persists.

There is likely another mimeapps.list elsewhere on the system. You can go through the list here, or search through your system with one of the following commands:

locate mimeapps.list


find / -name 'mimeapps.list'

Check for any application/octet-stream entries in those, and either comment them out or remove them.

Comments (3)

  • +2 – For me it was ~/.config/mimeapps.list that contained application/octet-stream=org.gnome.gedit.desktop. — Oct 20, 2015 at 14:50  
  • +0 – (This answer was posted following some chat discussion.) — Oct 20, 2015 at 14:51  
  • +0 – Thanks man. Removing the line fixed this immediately. Was struggling with that for months now. — Apr 13, 2016 at 13:49