Changes to mimeapps.list files take effect immediately, no need to logout/in to check the effects, so it’s easy to figure out how it works. (Rename or remove all but one of the mimeapps.list files, then make changes in the remaining one and check the effect in dolphin.)
After some testing, I’m sure the problem is not in the mimeapps.list files.
I tried one with a different user logon, and it works fine there, but not with my usual logon.
EDIT: also I saw “delete or rename the existing mimeapps.list
, log out and log back in” here, but for me it didn’t change anything. (No mimeapps.list was created when I logged back in, and when I made a simple one, the problem was still there.)
The problem is that Dolphin is not recognizing most of the file types.
For types that it recognizes, the entry in mimeapps.list actually works.
Dolphin sees most files as all/all
, and opens them with okteta,
because I have put all/all=org.kde.okteta.desktop;
in mimeapps.list.
If I change it to Kate, Dolphin tries to open them with Kate.
In this screenshot of dolphin, at the right end of each row, is the file-type that dolphin sees.
You can see here that it does not recognize jpg, log, and png.
(The log is plain text – it recognizes some such without txt extension, but not this one.)
.
In another folder, I saw that it recognizes mkv files as ‘Matroska video’, but mp4 as ‘all/all’.
The point is: mimeapps.list is fine, and dolphin is reading it correctly.
The problem is: dolphin has to know what type a file is before it looks for the type in mimeapps.list, and dolphin is not correctly recognizing the type of most files.
How or where does Dolphin discover the mime type of a file?
That’s where the error happens.
Here’s a funny picture – what Gwenview says when I tell it to open a png file:
.
The mistake is happening at a lower level, not just in Dolphin.
PCmanFM seems to go by the filename extension directly, not by mime-type; for example, it shows the type of PNG correctly.
But when I double-click a PNG in PCmanFM, it hands it off to some part of the system that passes it on to Gwenview, and then Gwenview shows the message above.
EDIT: Maybe it’s because Gwenview is a similar KDE app: it relies on the mimetype, and sees a wrong mimetype in the same way that Dolphin does. In PCmanFM I can open a video in mpv no problem; it’s not a KDE app, and I guess it doesn’t bother looking for the mimetype.
Obviously I could dump my current user profile, and start another, but then I would lose a huge amount of customization, and it would take ages to get back to my current work routine.
After about 20 years on Windows, 3 on Xubuntu, and 4 on Manjaro KDE, this is one of the worst problems I have ever had. Usually I can solve them myself, but for this one I don’t know KDE well enough. Every time I try to understand how KDE works, I get lost just trying to find the documentation! I find simple noob-user documentation, and high-level developer documentation, but not much in between for the ‘power user’ or ‘desktop administrator’.
Might switch back to XFCE when I have time. But I’ve got hooked on Dolphin – Thunar, PCmanFM and SpaceFM all used to crash because I use file managers so heavily, but Dolphin can handle the load. (Usually I have six workspaces, about 15 dolphin windows open, with a full row of tabs in each. KDE’s session manager saves them all, and opens them when I log on again. This is how I find my way back to each of the various jobs that I’m working on, in my labyrinthine file sytem.)
Hope some kind soul who knows KDE well enough can point me in the right direction.