Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

ძიება მხარდაჭერაში

ნუ გაებმებით თაღლითების მახეში მხარდაჭერის საიტზე. აქ არასდროს მოგთხოვენ სატელეფონო ნომერზე დარეკვას, შეტყობინების გამოგზავნას ან პირადი მონაცემების გაზიარებას. გთხოვთ, გვაცნობოთ რამე საეჭვოს შემჩნევისას „დარღვევაზე მოხსენების“ მეშვეობით.

Learn More

How to change what Firefox does when you click on an entry in the Downloads selection?

  • 4 პასუხი
  • 1 მომხმარებელი წააწყდა მსგავს სიძნელეს
  • 3 ნახვა
  • ბოლოს გამოეხმაურა Kawaii Amber

When I click on a link to a document (a PDF in my case), I'm asked for a location to store it. That's fine.

Now, if I click on the Downloads button in the Toolbar, a selection with all downloaded files opens. How do I specify/change the application used to open the file if I select it there?

Firefox 78.0.2 (64-bit) Mozilla Firefox for Ubuntu canonical - 1.0

When I click on a link to a document (a PDF in my case), I'm asked for a location to store it. That's fine. Now, if I click on the Downloads button in the Toolbar, a selection with all downloaded files opens. How do I specify/change the application used to open the file if I select it there? Firefox 78.0.2 (64-bit) Mozilla Firefox for Ubuntu canonical - 1.0
მიმაგრებული ეკრანის სურათები

გადაწყვეტა შერჩეულია

I've changed the entry in mimeinfo.cache manually to

  • application/pdf=okularApplication_pdf.desktop;gimp.desktop;gv.desktop;libreoffice-draw.desktop;net.sourceforge.gscan2pdf.desktop;

and that seems to solve the problem. But why the corret result of xdg_mime? And how would I have changed it the correct, i.e., tool way?

პასუხის ნახვა სრულად 👍 0

ყველა პასუხი (4)

On Linux, firefox uses xdg-open to determine how to open different mimetypes. You can check what is currently being used by running: $ xdg-mime query default application/pdf Then, assuming your app makes a standard .desktop entry in /usr/share/applications, you can set it by doing $ xdg-mime default <app>.desktop application/pdf If you need to manually set it, the file that sets these are in $HOME/.config/mimeapps.list

If you're referring to internally how firefox handles files, that can be changed in about:preferences .

$ xdg-mime query default application/pdf yields okularApplication_pdf.desktop, so that seems to be right. I've attached my settings in about:preferences as picture. So, what else could be the reason? (Actually, I would like okular to open pdf files but gimp is used instead)

The only suspicious entries in /usr/share/applications with gimp and pdf are (/usr/share/applications$ grep gimp * | grep pdf)

  • gimp.desktop:MimeType=image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;application/postscript;image/png;image/x-icon;image/x-xpixmap;image/x-exr;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/x-xcursor;
  • mimeinfo.cache:application/pdf=gimp.desktop;gv.desktop;libreoffice-draw.desktop;net.sourceforge.gscan2pdf.desktop;okularApplication_pdf.desktop;

Maybe it's the mimeinfo.cache entry. But why then the correct result of xdg-mime query?

ჩასწორების თარიღი: , ავტორი: scholz

შერჩეული გადაწყვეტა

I've changed the entry in mimeinfo.cache manually to

  • application/pdf=okularApplication_pdf.desktop;gimp.desktop;gv.desktop;libreoffice-draw.desktop;net.sourceforge.gscan2pdf.desktop;

and that seems to solve the problem. But why the corret result of xdg_mime? And how would I have changed it the correct, i.e., tool way?

Please see the man page for xdg-mime; it describes what the query option actually does. I'm glad to see a manual edit fixed your issue.