Bug 342974

Summary: File associations preference order not always respected
Product: [Frameworks and Libraries] kdelibs Reporter: Spraff <spraff>
Component: kdecoreAssignee: kdelibs bugs <kdelibs-bugs>
Status: CONFIRMED ---    
Severity: normal CC: aspotashev, cfeck, mahen, mindboosternoori, smowtenshi
Priority: NOR    
Version: frameworks   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Spraff 2015-01-17 16:47:02 UTC
Settings / File Associations entry for inode/directory contained, in the following order:

Dolphin
Gwenview
Filelight

With this configuration, opening the downloads directrory from firefox would open the directory in Filelight. Fixed by removing everything except Dolphin from the inode/directory list in File Associations panel, although this should not  have been necessary.

Reproducible: Always

Steps to Reproduce:
1. Install Kubuntu 14.10
2. Install Firefox, remove rekonq, install filelight
3. Download something in firefox and try to open downloads directory from firefox

Actual Results:  
Directory opens in filelight.

Expected Results:  
Directory should open in Dolphin.

Dolphin is above filelight in File Associations panel.
Comment 1 Christoph Feck 2015-01-17 23:05:12 UTC
Hm, Firefox is no KDE application, so I wonder how it should respect those settings.
Comment 2 Spraff 2015-01-18 12:06:21 UTC
In Qt there's QDesktopServices::openUrl and I imagine there's some GTK equivalent which will be interpreted by KDE to launch the appropriate application. Shouldn't the choice of child application happen outside the parent application?
Comment 3 Mahendra Tallur 2018-02-19 13:46:43 UTC
Hi ! I noticed a strange behavior regarding files associations, that only affect some GTK apps like Firefox / Thunderbird. I may file another bugreport if necessary.

How to reproduce :
1) install a clean KDE Neon distribution (or Manjaro KDE, same behavior). Plasma 5.12.1.
2) install wine
3) check the files associations for PNG and JPEG images in the KDE settings : gwenview is first, wineserver is second
4) try to open a PNG or JPG in Dolphin : Gwenview is indeed invoked
5) try to open a PNG or JPG in Firefox : wineserver is invoked !!

WORKAROUND

6) go back to the files associations preferences, move some items back and forth in the PNG / JPG lists ; save them
7) now, Gwenview will be invoked in Firefox, even though the list appears to be the same ! Gwenview is indeed displayed as "default" in the FF/TB preferences (while it was wineserver before)

SO : the KDE files associations list IS taken into account by Firefox / Thunderbird BUT it has to be modified / saved first for some unknown reasons.
Comment 4 Marcos Marado 2020-05-03 15:54:47 UTC
Confirmed as still happening on Kubuntu 19.10. Also confirmed that the workaround on comment #3 works.