Bug 440675 - flatpaks do not respect default apps and associations
Summary: flatpaks do not respect default apps and associations
Status: RESOLVED DUPLICATE of bug 420050
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.22.2
Platform: Fedora RPMs Linux
: HI normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-07 00:06 UTC by Mikel Pérez
Modified: 2022-01-18 19:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikel Pérez 2021-08-07 00:06:45 UTC
SUMMARY
opening web links on flatpak apps open up whatever I have associated on GNOME instead. so do "Show containing folder on file manager" actions - so I deleted nautilus, and now it tries to open Visual Studio Code ._.

STEPS TO REPRODUCE
1. change default browser app in system settings
2. open a link in a flatpak'd app

OBSERVED RESULT
it will open either in whatever you had set in GNOME as default, if you uninstall it will open on some random app. I don't know what happens if you never had GNOME installed

EXPECTED RESULT
respecting defaults

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.22.4 
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
seems to happen to all flatpak apps, be it Qt GTK or Electron (GTK too)
Comment 1 Nicolas Fella 2022-01-17 21:13:12 UTC
AFAIK opening URLs via portals does not go through the portal backends. It is all handled in the xdg-desktop-portal frontend: https://github.com/flatpak/xdg-desktop-portal/blob/master/src/open-uri.c

I think this is the same root cause as I am seeing for (non-Flatpak'd) Firefox where files are opened with other apps than expected. IIRC that's due to GTK and KDE having different interpretations/implementations of the mime type handling, but I don't remember the details well enough to judge who needs fixing
Comment 2 Nicolas Fella 2022-01-17 21:26:06 UTC
The case of opening URLs should be fixed with https://github.com/flatpak/xdg-desktop-portal/pull/473
Comment 3 Nicolas Fella 2022-01-18 19:26:34 UTC
*** This bug has been marked as a duplicate of bug 420050 ***