Bug 451095 - Associations for user provided applications are not persisted
Summary: Associations for user provided applications are not persisted
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_filetypes (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-03 16:35 UTC by Ian Goddard
Modified: 2025-07-13 18:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Goddard 2022-03-03 16:35:18 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. I have a program /opt/CardFile/Cardfile with a menu entry in the Office section of the menu.  The files it uses are text files so this could probably be mocked up with a copy of kate or any other text editor.  The program has written a file with suffix .krd on the desktop
2. Using system settings create an entry appication/Cardfile for the krd suffix
3. Click the .krd file to open

OBSERVED RESULT
Initially the association works.  Randomly, however it fails.  A right click on the desktop file will then allow the entry to be remade with Open with... option and ticking the box to associate the file type but again it does not persist.  In extremis I've even found that the association does not even persist long enough to allow the file to be reopened immediately after closure.  There appears to be no rationale as to what triggers this.  


EXPECTED RESULT
Clicking the file should open it every time.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Devuan
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
The association is found in ~/.local/share/applications/mimeapps.list but not in mimeinfo.cache
Comment 1 David Faure 2022-03-07 12:43:22 UTC
We don't use mimeinfo.cache, that's a glib-specific thing AFAIK.

Does this create a mimetype under ~/.local/share/mime/packages ?
Comment 2 Ian Goddard 2022-03-07 13:49:36 UTC
(In reply to David Faure from comment #1)
> We don't use mimeinfo.cache, that's a glib-specific thing AFAIK.
> 

That's OK, then ;)

> Does this create a mimetype under ~/.local/share/mime/packages ?

Yes, and it looks OK to me.
Comment 3 David Faure 2022-03-10 18:53:12 UTC
Did update-mime-database then create other files in ~/.local/share/mime that mention krd? E.g. the globs file, etc.
Comment 4 Ian Goddard 2022-03-15 18:06:28 UTC
(In reply to David Faure from comment #3)
> Did update-mime-database then create other files in ~/.local/share/mime that
> mention krd? E.g. the globs file, etc.

Sorry for the delay in reporting but, intermittent problems being what they are, it's not shown a problem until today and even then I had to provoke it by installing (no effect) and then uninstalling the Calligra suite.

It didn't create any new entries,  There were already entries in globs & globs2 and XML documents in the application and packages directories but they were nearly 2 weeks old.