As in subject. When I change the order of applications and press Apply there are forced some entries on specified positions. Below please find steps to reproduce: For example I would like to change applications order showing after click on ui file. 1. RMB on file mydialog.ui and open Properties 2. Press button "File Type Options" (it shows File type editor) 3. Change order in "Application Preference Order" like this: KUIViewer Qt Designer Qt Creator KWrite Kate Diffuse Merge Tool and others 4. Press Apply button Actual result: The order have been changed like this: KUIViewer KWrite Qt Creator Kate Qt Designer Diffuse Merge Tool Expected result: The order of applications should not be changed. If some applications are necessary to be here then let them be put on end of list and should not break the order set by user.
Created attachment 152458 [details] Videocast of Firefox insisting on opening xml files I can quite easilly confirm this on Kubuntu 22.04 (with backports, so Plasma 5.25). It does not reliably get triggered for each association, but I managed to get it for mime type "text/x-c++src" and also for xml - Firefox is especially persistent (see the video). It can be workaround by removing the applications that are misbehaving - but they get added anyway, so that only works for changing the default application, not their order on further places.
There used to be this bug: https://bugs.kde.org/show_bug.cgi?id=291177 but I am not sure if it and the solution to it is in any way relevant.
*** Bug 493738 has been marked as a duplicate of this bug. ***
*** Bug 497391 has been marked as a duplicate of this bug. ***
Added two more recent bugs as duplicates to this, as they all described inconsistent but incorrect applying of the Application Preference Order in the File Type Editor. It might be worth noting here, I could not personally reproduce the bug when the preference order was among a small (<=5) number of applications - the video examples that folks have attached appear to show longer lists being affected, so perhaps there's something triggered when there is a larger number of entries there?
I looked into this a little and found some things: - the settings are saved correctly in `mimeapps.list` - only happens when I change qtcreator, other apps are kate, kwrite, firefox, vivaldi and zed (org.kde.kate.desktop; org.kde.kwrite.desktop; org.mozilla.firefox.desktop; vivaldi-stable.desktop; org.qt-project.qtcreator.desktop; dev.zed.Zed.desktop;) - there's a conflict with the `text/plain` entry in the config file, if I remove the `text/plain` entry it works as expected I tested with the `text/html` mime type.
Created attachment 178833 [details] The preferred program resets on plaintext, but not other file types
I have confirmed the bug on version 6.3.0. It is definitely happening on plain text but not every file type. One suggestion for this specific bug: The product might be better listed as systemsettings and the component as kcm_filetypes, but I don't seem to have the ability to do this on this ticket.
*** Bug 500369 has been marked as a duplicate of this bug. ***
This behavior/bug has existed for a long time. It is not limited to Arch Linux, I've seen in Kubuntu (I'm currently using 24.04). It is also not limited to specific file/mime types AFAICT. After reordering the applications for a mime type, the only change that persists upon clicking Apply is that to the default/first application. Changes to the rest of the list do not persist.
Created attachment 186885 [details] Video capture of the problem Still happening in KDE 6.5.2 Operating System: Fedora Linux 43 KDE Plasma Version: 6.5.2 KDE Frameworks Version: 6.20.0 Qt Version: 6.10.0 Kernel Version: 6.17.7-300.fc43.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor Memory: 32 GiB of RAM (31,2 GiB usable) Graphics Processor: NVIDIA GeForce RTX 3080 Ti Manufacturer: Gigabyte Technology Co., Ltd. Product Name: B550M DS3H
The comment made by George in https://bugs.kde.org/show_bug.cgi?id=393700#c6 is a workaround which works for me. In this case I wanted VSCodium to be the default entry to open .json files, it kept defaulting to Kate. I edited ~/.local/share/applications/codium.desktop Then updated the values stored for key MimeType and removed 'text/plain' from the list. The order of the applications are preserved and applied successfully.
In my case, for text/x-cmake I can remove all other associations and have only two: Kate and GVim. Any time I attempt to put GVim above Kate, it immediately switches Kate to be on top. If I have other applications in the list, I can move them in any order, and that order appears to be preserved EXCEPT Kate, which is always forced to be first. Once I remove Kate, then everything seems to work as expected.
(In reply to akb825 from comment #13) > In my case, for text/x-cmake I can remove all other associations and have > only two: Kate and GVim. Any time I attempt to put GVim above Kate, it > immediately switches Kate to be on top. If I have other applications in the > list, I can move them in any order, and that order appears to be preserved > EXCEPT Kate, which is always forced to be first. Once I remove Kate, then > everything seems to work as expected. I have exactly the same situation.
For all these kinds of bugs, you can investigate what's really happening behind the scene (and therefore improve greatly the usefulness of your report/comments) by looking at ~/.config/mimeapps.list (before and after any changes) (note that there are multiple sections in that file, don't just grep it)
In my case, the ordering of the entries in ~/.config/mimeapps.list matched the modifications made before hitting "Apply". For example, if I put GVim before Kate, I see the GVim entry before Kate. However, both immediately after pressing "Apply" and when I load the dialog afterward, as well as when opening a file of the associated type, the order in mimeapps.list is ignored and Kate displays first.