https://bugs.kde.org/show_bug.cgi?id=527276
Bug ID: 527276
Summary: File Associations ignores ghostwriter as the user
default until kde-mimeapps.list is created
Classification: Applications
Product: systemsettings
Version First 6.6.4
Reported In:
Platform: Kubuntu
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: kcm_filetypes
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
## Summary
The File Associations settings do not honor the configured user-level default
application for Markdown files.
Although `~/.config/mimeapps.list` and `xdg-mime` both identify ghostwriter as
the default application for `text/markdown`, KDE continues to show Kate first
in the application preference list and opens Markdown files with Kate.
Creating a KDE-specific user-level `kde-mimeapps.list` resolves the problem.
## Steps to reproduce
1. In System Settings → File Associations, select `text/markdown`.
2. Move ghostwriter above Kate and click Apply.
3. Observe that Kate remains or returns to the first position.
4. Run `xdg-mime query default text/markdown`.
5. Observe that the result is `org.kde.ghostwriter.desktop`.
6. Verify that `~/.config/mimeapps.list` contains:
`[Added Associations]`
`text/markdown=org.kde.ghostwriter.desktop;org.kde.kate.desktop;...`
`[Default Applications]`
`text/markdown=org.kde.ghostwriter.desktop;`
7. Create a test file:
`printf '# Markdown test\n\nTest document.\n' > /tmp/mht-markdown-test.md`
8. Open it using:
`kioclient exec /tmp/mht-markdown-test.md`
## Actual result
Kate opens the Markdown file even though the XDG default is ghostwriter.
The File Associations module also places Kate first.
Running `kbuildsycoca6 --noincremental` and reopening System Settings did not
resolve the problem.
The KDE MIME type detector (`kmimetypefinder`) correctly identified the test
file as `text/markdown`.
The desktop entry `/usr/share/applications/org.kde.ghostwriter.desktop` exists
and explicitly supports `text/markdown`.
## Expected result
KDE should honor the default application configured in the user's
`~/.config/mimeapps.list`.
Ghostwriter should appear first and should open Markdown files.
## Workaround
Initially, `~/.config/kde-mimeapps.list` did not exist.
I created it with:
```ini
[Default Applications]
text/markdown=org.kde.ghostwriter.desktop;
[Added Associations]
text/markdown=org.kde.ghostwriter.desktop;org.kde.kate.desktop;
```
I then ran:
`kbuildsycoca6 --noincremental`
After this change, ghostwriter immediately appeared first in the File
Associations list and successfully opened the Markdown test file.
The exact contribution of the two sections of the workaround has not been
tested separately.
The system-level `/usr/share/applications/kde-mimeapps.list` specifies Kate as
the preferred Markdown application.
## Software / OS versions
- Operating System: Kubuntu 26.04 LTS
- KDE Plasma: 6.6.4
- KDE Frameworks: 6.24.0
- Qt: 6.10.2
- Kernel: 7.0.0-38-generic (64-bit)
- Graphics Platform: Wayland
- Hardware: Dell Latitude 5420
- CPU: Intel Core i5-1145G7
- Graphics: Intel Iris Xe
- Memory: 32 GiB
## Additional information
The workaround is successful, but the underlying cause has not been identified.
The problem was observed repeatedly on the affected system before applying the
workaround. It has not yet been reproduced on a fresh user profile.
This report concerns inconsistent handling of MIME association preferences
rather than a Markdown file detection problem.
--
You are receiving this mail because:
You are watching all bug changes.