I've just done the latest system upgrade to my Ubuntu LT 14.04 and now pdfs don't open with Firefox; instead they open with Gedit to give mangled nonsense.

After searching around ask Ubuntu I found two useful question/answers here and here from which I cribbed the following 'almost'-fix.

I did a fix of this using vi ./.local/share/applications/mimeapps.list and putting a # as follows #application/octet-stream=gedit.desktop; and I also added an extra line as follows, application/octet-stream=evince.desktop; but I still have a problem.

The pdf is downloaded and then opened rather than simply opened (like it used to...).

Does anyone have any suggestion as to how to modify the line?


This phenomenon may be peculiar to certain urls rather than to the current set-up of my Linux Box. Using this link gives the problem described; whereas using this link works as it did in the past. Your thoughts are welcome.

  • 1
    what's your setting in Firefox Preferences → applications?
    – luckyrumo
    Jun 21, 2015 at 11:51
  • @luckyrumo Portable Document Format (PDF) Preview in Firefox. (Found by going to Edit/Preferences with Firefox and then scrolling down). Jun 21, 2015 at 12:08

1 Answer 1


Please comment (add #) or remove

# application/octet-stream=gedit.desktop; 

in your


That's works for me.

  • 4
    The mimeapps.list could be located on another place. On my Ubuntu 17.10 ~/.local/share/applications/mimeapps.list does not exist but I have several mimeapps.list files on my profil folder. The one I have to correct was /home/myprofilname/.config/mimeapps.list. Nov 1, 2017 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .