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:
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.
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
~/.mozilla/firefox/<profile>/mimeTypes.rdf
file and the issue persits.~/.local/share/applications/mimeapps.list
file and the issue still persists.Here's the Firefox file association screen:
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
or
find / -name 'mimeapps.list'
Check for any application/octet-stream
entries in those, and either comment them out or remove them.
~/.config/mimeapps.list
that contained application/octet-stream=org.gnome.gedit.desktop
. — Oct 20, 2015 at 14:50 External links referenced by this document: