3

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 kate.

xdg-mime query filetype /opt/kde/share/applications/org.kde.dolphin.desktop

returns text/plain, as does the same command for

/opt/kde/share/applications/org.kde.rekonq.desktop etc.

xdg-mime query default text/plain then returns org.kde.kate.desktop, explaining why the files are being opened by kate.

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.

2
  • 1
    I don't have KDE-5 but KDE-4.1x. However, this shouldn't matter much here IMO. The xdg-mime command for a .desktop file returned me application/x-desktop as the mime type. So as the Properties -> Application -> Mimetype that can be accessed by right-clicking .desktop file and choosing Properties. (This also allows you to add this mimetype.)
    – Firelord
    Commented May 21, 2015 at 18:37
  • Let me know if it works.
    – Firelord
    Commented May 21, 2015 at 18:37

1 Answer 1

2

Running update-mime-database repeatedly, with /opt/kde/share/mime, /opt/gnome/share/mime, /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.

1
  • Interesting, thanks, but repeated use of update-mime-database did not work around the execution problem in my case. Related: askubuntu.com/a/894380/25036 under *.desktop files opening in Kate Commented Mar 18, 2017 at 18:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .