Opening programs via the ‘Application Launcher’ menu, then selecting the program works.
Using the launcher generated on the panel, eg by right-clicking on an open program, then selecting ‘Show A Launcher When Not Running’ places a .desktop file which is opened with
xdg-mime query filetype /opt/kde/share/applications/org.kde.dolphin.desktop
text/plain, as does the same command for
xdg-mime query default text/plain then returns
org.kde.kate.desktop, explaining why the files are being opened by
Presumably the problem here is that the mimetype of the
*.desktop files should be something other than
text/plain. What should it be? Is there a simple way to check/find out/change these?
Note: KDE-5, Plasma-5, (C)LFS, source installs, etc. No package manager.
update-mime-database repeatedly, with
/usr/share/mime fixed this problem.
As was mentioned by Firelord in a comment, the type that the
*.desktop files were assigned following this operation was
application/x-desktop. I suspect it is likely that manually setting this as their mime-type would be sufficient to solve the problem.
For those who later see this post, in case it is helpful:
In related (to the solution, but not to the original question) news, this also takes me a step closer to making
rekonq download files.