Bug 503326 - "Always open [file type] files with the chosen app" checkbox doesn't do what it says it will
Summary: "Always open [file type] files with the chosen app" checkbox doesn't do what ...
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.4
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2025-04-25 06:43 UTC by Axel Braun
Modified: 2025-06-03 13:54 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.0
Sentry Crash Report:


Attachments
Error description in detail (317.27 KB, application/vnd.oasis.opendocument.text)
2025-04-25 06:43 UTC, Axel Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2025-04-25 06:43:40 UTC
Created attachment 180629 [details]
Error description in detail

Not sure if I picked the correct assignment, but I assume it is a plasma 6 issue.
When opening a file in dolphin or ark, it picks permanently the wrong application, ignoring the current settings
PLease see attached - I have added some description and screenshots
Comment 1 Axel Braun 2025-04-25 06:44:17 UTC
Operating System: openSUSE Tumbleweed 20250418
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-1-default (64-bit)
Graphics Platform: X11
Comment 2 Nate Graham 2025-04-25 11:38:17 UTC
I can reproduce this issue. I thought it was supposed to be fixed in https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/5375fcfc308ed1dd4736168c8a818a418141659f, but either no, or that didn't actually fix it.
Comment 3 Nate Graham 2025-05-14 21:08:55 UTC
I debugged this a bit by opening a PDF document in a Telegram group when Telegram is packaged as a Flatpak. I discovered that the "remember" setting is working correctly as technically implemented; it does indeed update the system's file associations for that file type.

The problem here is that the checkbox says "Always open [file type] with the chosen app" but but that isn't what it's doing; it's simply updating the file associations.

So the next time you open a file of that file type, you'll see the app chooser again, presenting the app you previously chose as the default option — but it's still asks you to confirm this anyway! That's the annoying part.

Probably when you check that checkbox, it should trigger logic to suppress the chooser dialog for that file type in the future, and instead always open with the previously-chosen app.

I'd even say this whole dialog should be suppressed as much as possible in favor of always consulting the system's default file associations, at least when run on Plasma, and it should only be shown when encountering a file with no associations. But that's probably a bigger topic.
Comment 4 David Edmundson 2025-06-02 14:06:00 UTC
The XDG desktop portal code is kinda weird. 

It does "if you selected the same app 3 times in a row for a given type, it won't prompt again unless the app explicitly requests it".
This doesn't quite match our wording, so I'll do a change there.

It's a bit frustrating that we can't modify this behaviour, but that can be tracked at: https://github.com/flatpak/xdg-desktop-portal/issues/472
Comment 5 Bug Janitor Service 2025-06-02 14:20:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/395
Comment 6 David Edmundson 2025-06-03 13:25:16 UTC
Git commit c573eedb13ba04cd43960e81527bc386c96a8463 by David Edmundson.
Committed on 03/06/2025 at 13:25.
Pushed by davidedmundson into branch 'master'.

appchooser: Adjust text for "always open with"

This text makes a promise that we can't keep.

The xdg-desktop-portal effectively ignores the default for a lot of
situations, it has it's own logic to avoid the prompt if you select the
same app to open a file 3 times in a row.

This can be tracked at:
https://github.com/flatpak/xdg-desktop-portal/issues/472

In addition even if upstream behaviour is changed, the application can
force the "ask" flag which will show this dialog, or there's a path in
the permission store to always ask.

Setting the default still matters as it will be first in our list.

M  +1    -1    src/AppChooserDialog.qml

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/c573eedb13ba04cd43960e81527bc386c96a8463