Bug 247108 - www/firefox: consistently chooses wrong applications to open files
Summary: www/firefox: consistently chooses wrong applications to open files
Status: Closed Not Enough Information
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Graham Perrin
Depends on:
Reported: 2020-06-09 12:27 UTC by Tobias C. Berner
Modified: 2023-05-17 06:26 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Note You need to log in before you can comment on or make changes to this bug.
Description Tobias C. Berner freebsd_committer 2020-06-09 12:27:27 UTC
Moin moin 

This has been annyoing me for years now. I use firefox as Browsre in KDE Plasma.

Firefox consistently uses wrong applications to open files. I can configure them in firefox settings dialog; say "pdf -> okular", "xls->libreoffice". I can, but it just has no effect.

Assuming the last opened file from firefox used 'libreoffice', the next time any download will just suggest to use "libreoffice". No matter its type. Assuming it was a PDF, I silently curse, and chose "okular" from the dropdown. Great. Now firefox just assumes I want to open all the following files in okular.

I have this behaviour on all my systems, FreeBSD 12/13, FF up to date.

mfg Tobias
Comment 1 Chris Hutchinson 2020-06-09 16:23:39 UTC
I can confirm that this is also true in GTK based
DEs as well. It appears that FF will only use, or
offer to use applications chosen by the DE for
"preferred" applications to deal with content.
While FF indicated you can "make this change permanent"
in FF "preferences". It has little, if any effect.
As a result, I'm forced to right-click > save-as
in FF, to ever open content with my *chosen* application.

Comment 2 Jan Beich freebsd_committer 2020-06-13 16:05:34 UTC
Please, provide clear steps to reproduce in a fresh profile. I don't use this feature, don't use any DE, don't use ocular/libreoffice and can't reproduce.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2020-10-09 16:27:38 UTC
Is <https://unix.stackexchange.com/a/162743/13260> related?
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-04-23 15:18:38 UTC
I hesitate before closing this, however I do believe that – realistically – this will not be fixed downstream in the port of Firefox. 

Optimistically: something upstream (I don't know what, maybe the desktop environment (not Firefox)) might have partially improved in recent weeks/months, because: 

* previously, if neither Dolphin nor Thunar was open, then using the 
  'Show in Folder' option of the download button menu would open 
  Thunar alone

* today, the option opens both Thunar _and_ Dolphin. 

Maybe related to the above, but probably off-topic from www/firefox: 

* if Dolphin runs before Show in Folder, then an additional Dophin window 
  opens to show the item (and I have not bothered to investigate the 

KDE Plasma 5.27.4
KDE Frameworks 5.105.0

% pkg iinfo x11-fm/dolphin www/firefox x11-fm/thunar
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #38 main-n262032-5e2e3615d91f: Fri Apr  7 18:54:28 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400085 1400085


A few months ago, I probably did have one file type (probably .xlsx files opened from within SharePoint) that persistently failed to open in my preferred LibreOffice. I vaguely recall that the unwanted application (for this file type) was editors/linux-wps-office, which fell off my system a while ago, I have not yet bothered to rebuild and install from ports.
Comment 5 Tatsuki Makino 2023-05-17 06:26:42 UTC
> Not Enough Information

I still use seamonkey-2.49.4_27... 🤣

It seems that we have already reached similar information, but in gecko browsers, these seem to be affected by xdg-utils.
For example, in the case of some pdf, the one that appears by typing the following command becomes the default.

xdg-mime query filetype some.pdf # <- for getting mimetype, will get application/pdf
xdg-mime query default application/pdf

Information related to these is stored in /usr/local/share/{applications,mime} and in ~/.local/share/{applications,mime}.

I thought I touched these when the behavior around seamonkey's helper application got weird.
That was a long time ago, so I forgot about it :)
I don't know because I haven't touched Firefox deeply now, but is this still the same?