SUMMARY *** I am trying to have some custom file associations, but every time the system is restarted, the custom settings are gone. *** STEPS TO REPRODUCE 1. Create a "Dosbox-x conf" entry under "Applcations > File Associations > Application 2. Set the filename pattern to "dosbox-x.conf" 3. Add Dosbox-x as primary application for these files, and Kate as secondary. 4. Apply 5. Reboot OBSERVED RESULT The Applications associated with this entry disappears upon reboot, even though it works properly during the session after they were set. EXPECTED RESULT The Applications associated for this file type to be permanent, and survive reboots SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.27.1 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.2.1-AMD-znver2 (64-bit) Graphics Platform: X11 Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics Memory: 36.9 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 20T8001JUS System Version: ThinkPad E15 Gen 2 ADDITIONAL INFORMATION It's neat that you can run dosbox-x just by clicking on it's configuration file. As I am reviewing old MS-DOS games, I have a lot of those files. Check out the channel to see how I use this file association: https://www.youtube.com/channel/UCWdmCsCQiPyVzyjYyehj3xQ
Funny thing, now these associations have started surviving reboots. I'll keep an eye on this, and if it still keeps working for a week or so I'll close the bug. :)
This problem is now completely gone. Since this is a rolling update system, there was probably an update that fixed it, but I would not know which one. Thanks, everybody, for looking
This is happening again, now. I posted a quick video of it to Youtube: https://youtu.be/slNl3TSXJ6s
This issue is becoming more frequent, and it looks like file associations are forgotten/changed whenever anything updates the file association table. I have never seen behavior like this in KDE, and it may very well be down to something I am doing different. Normally file associations have an asterisk in the definition, like *.txt so that it would match any file that ends with ".txt" In my case, there is no asterisk, as I want to match the entire file name exactly. In my case, if there is a file called "dosbox-x.conf" in a directory, when I click on that file I want the default action to be to run dosbox-x in the directory where the file is residing, and in the context menu I want to have Kate, so that I can edit this text file. When I just add an asterisk in front of "dosbox-x.conf" this strange behavior goes away.
OK, so I was a bit optimistic there, and my file associations are still disappearing randomly. Here is a video clip showing it happening in real time: https://youtu.be/uI4HLHXOmwc
I can't reproduce the bug exactly the way you have, but there is definitely a major issue here. I can reproduce the issue by adding Dolphin to the apps list of the newly-created doxbox entry; when I click Apply, all apps disappear. This is 100% reproducible for me.
While investigating, I also ran into Bug 468512. Not sure they're related, but it also looks fishy.
I tracked down my issues to what I suspect was a corrupted mimeapps.list Anything that would re-create the mime database would trigger these associations to be lost. Following https://wiki.archlinux.org/title/XDG_MIME_Applications i discovered where the mimetype overrides are kept. So I deleted both the current and depreciated copies, then made a new file association. Once that was completed, I linked the default mimeapps.list to the depreciated location, as suggested on that page. Now I can't trigger the issue anymore, I guess after years of messing with file associations it was time to clear them out and start fresh? I hope this helps someone with the same issues. For now I will close this ticket.
Good catch. However sending us a copy of the corrupted file would have helped us make the code more robust :-)
Created attachment 158229 [details] mimeapps.list with the issue I honestly don't think it will help much. but just in case, here is the mimeapps.list that was causing the issue.