4

When I download a PDF and try to open it from the Downloads window, it will attempt to open it in File Roller, which will complain that about PDF not being a supported archive type; I'd like to open it in Document Viewer instead. How do I do that from Firefox, other than going through Nautilus?

When opening the PDF from Nautilus, it opens the file correctly in Document viewer. I also went in about:preferences#applications and set Use Document Viewer (default) as the action for PDFs, but it didn't work.

3 Answers3

0

Some newly installed applications take over the "default" status in FF's about:preferences instead of the per-filetype normal application set at system level (e.g. Palemoon takes over as default instead of gwenview for jpeg files, Inskape or File Roller takes over instead of Okular for pdf file.).

"Always ask" is the choice that should be used in this case and then trying to create a per-user file ~/.local/share/applications/mimeinfo.cache with the lines:

[MIME Cache]
application/pdf=okularApplication_pdf.desktop

The disadvantage of the above is that it is a per-file-type setting. To have a solution for all files (as said in this answer), run:

cd .local/share/applications/
ln -s mimeapps.list defaults.list

In case this stops working: see that the undesired application is not again selected under about:preferences: be sure "Always ask" is selected there. Setting manually a different program (even the default for your file-type at system level, but which is not marked as "default" in the list for your file under about:preferences) might not work.

Tested in Firefox 60.0 in Kubuntu 18.04.


Something is not right with the Firefox settings. "Always ask" and "Save file" do not make sense for files already downloaded, therefore settings under about:preferences shouldn't affect the Downloads list. But they do. And they do in an inconsistent manner: only selecting the application marked as default is followed, switching to another application is not. To reverse that one might need to select "Always ask" and then follow the steps mentioned above.

0

Firefox uses its own rules on how to handle file types and can be different than Nautilus.

Click the Firefox menu button and select Options.
In Options, click Applications then select the file type PDF. In the Action section, change the action for how you want to open the file.

If it's already set, change it to something else, and then back to the PDF viewer.

Delorean
  • 11,563
0

There are several settings for PDFs in Firefox - for different MIME content types - see the screenshot.

PDF lines in Firefox Application settings

Is it possible that you changed just one of the lines to Use Document Viewer (default), but at least one of the others is still configured to use File Roller?

Please note that, to my knowledge, you cannot configure the other lines to be opened directly in Firefox. You would have to select Evince or whatever PDF reader you want to use.

Try different PDFs, e.g.:

  • this soccer rules document opens internally in Firefox on my computer
  • this one does NOT open internally, but gives me a prompt where I can download or open in external PDF editor
okolnost
  • 1,140