seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2020/10/25, 23:39:23


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Firefox download handler  (Read 1061 times)

0 Members and 1 Guest are viewing this topic.

Offline sunrat

  • User
  • Posts: 366
Firefox download handler
« on: 2020/08/06, 02:02:33 »
When I open the Downloads drop down from the icon in its taskbar and click on a downloaded PDF file, it opens in GIMP. I'd like to set Okular instead of GIMP in the FF Downloads box. 
In FF preferences PDF is set to "Save File". System handler is set to Okular. Opening a PDF in Dolphin uses Okular as expected.
 I searched for "gimp" and "pdf' in about:config with no result. And I checked, config search is case insensitive.
Where is the FF Downloads handler set?

Offline toga

  • User
  • Posts: 49
Re: Firefox download handler
« Reply #1 on: 2020/08/06, 09:47:37 »
Have you tried this:

„General“, „Applications“, use „search for .pdf“ and select „use other“ or „use system default application“.
so i can open pdf with firefox or ocular.

Hope this helps,

toga

Offline sunrat

  • User
  • Posts: 366
Re: Firefox download handler
« Reply #2 on: 2020/08/06, 10:19:54 »
„General“, „Applications“, use „search for .pdf“ and select „use other“ or „use system default application“.
so i can open pdf with firefox or ocular.

I already said it is set there to "Save File" and I know I can change it like you said but that's not the question I asked. When clicking on the Downloads arrow icon in the taskbar after downloading it offers a choice to "Open file" or "Open containing directory". Open file there it opens it in GIMP. I want it to open in Okular from there instead.

Offline jure

  • User
  • Posts: 530
Re: Firefox download handler
« Reply #3 on: 2020/08/06, 13:13:45 »
I think toga means this

Gruss Juergen

Offline sunrat

  • User
  • Posts: 366
Re: Firefox download handler
« Reply #4 on: 2020/08/06, 15:10:00 »
I know that's what they mean. It's not relevant to what I am asking. It seems words aren't working so see this visual explanation. I wish to open the already downloaded file in Okular by clicking "Open file" in the Downloads box.


Offline titan

  • User
  • Posts: 238
Re: Firefox download handler
« Reply #5 on: 2020/08/06, 18:32:01 »
Can you right click on file and get "open with system viewer"  which will be Okular if that is system viewer

Offline jure

  • User
  • Posts: 530
Re: Firefox download handler
« Reply #6 on: 2020/08/06, 18:53:26 »
system-configuration>application>file allocation>pdf>okular
Gruss Juergen

Offline sunrat

  • User
  • Posts: 366
Re: Firefox download handler
« Reply #7 on: 2020/08/07, 01:28:52 »
Can you right click on file and get "open with system viewer"  which will be Okular if that is system viewer
Still opens in GIMP.

system-configuration>application>file allocation>pdf>okular
System viewer is set as Okular.
Firefox is doing it wrong. My question is where does FF save the setting for this? It didn't show in about:config .
It's not a great problem as I can open the Download folder from there and click on the file where it does actually open in the system viewer Okular. It's just not working correctly and I have to fix it. Call it an obsession.  :P ;)

Offline jure

  • User
  • Posts: 530
Re: Firefox download handler
« Reply #8 on: 2020/08/07, 09:07:00 »
about:config

Gruss Juergen

Offline der_bud

  • User
  • Posts: 948
  • member
Re: Firefox download handler
« Reply #9 on: 2020/08/07, 09:16:22 »
These are sometimes ocurring mimetype hickups combined with firefox' file picker. Your system (and so your filemanager) are set to open pdf with okular, probably preconfigured via xdg-open, one of the many standards
Firefox as gtk app might use gio-open instead, another standard. In earlier versions of firefox (pre-68 I think) there was an about:config setting for ui.allow_platform_file_picker, resulting in internal firefox dialog windows using your desktopmanagers filemanager.

What you can try:
 - look in your local mime database, one of the two files ~/.local/share/applications/defaults.list or ~/.local/share/applications/mimeapps.list, if there is any line combinig pdf with gimp, and see if you can correct that somehow

 or

 - in a terminal, check the diffents between
Code: [Select]
xdg-mime query default application/pdf and
Code: [Select]
gio mime application/pdf If the xdg one points to okular and the gio one points to gimp, that is the culprit. So correct it with setting
Code: [Select]
gio mime application/pdf okular.desktop
 update-mime-database ~/.local/share/mime
 update-desktop-database ~/.local/share/applications

- Additionally (you use KDE I think) in Systemsettings there are settings for applications and filetypes, search for pdf and look if gimp is there even as second and third choice, if so delete that.

All of that is just assumed, but hopefully thats enough vocabulary to feed your internet search machine ;)

Some hints I got from:
https://bugzilla.mozilla.org/show_bug.cgi?id=1427700
https://deluge.readthedocs.io/en/latest/how-to/set-mime-type.html
https://unix.stackexchange.com/questions/36380/how-to-properly-and-easy-configure-xdg-open-without-any-environment#comment512430_59088
https://unix.stackexchange.com/questions/146904/set-new-default-file-manager-for-firefox-in-archlinux
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline sunrat

  • User
  • Posts: 366
Re: Firefox download handler
« Reply #10 on: 2020/08/07, 10:48:39 »
Direct hit, der_bud. Thank you.  ;) 8)

Needed a minor adjustment, this is what fixed it:
Code: [Select]
$ gio mime application/pdf okularApplication_pdf.desktop
Set okularApplication_pdf.desktop as the default for application/pdf
$ update-mime-database ~/.local/share/mime
$ update-desktop-database ~/.local/share/applications

I didn't even know about gio-open. The FF profile is probably from way before v68 so it may have depended on that deprecated about:config setting.
Didn't need to touch KDE System Settings.