Linux .desktop file - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Linux .desktop file (/Thread-Linux-desktop-file) |
Linux .desktop file - akovia - 06-10-2020 So I've been in the process of rebuilding my system from scratch and ran into something strange today. I'm running Arch/xfce with Whisker Menu. I always had a panel at the top of my screen with some launchers for commonly used programs, gimp being one of them. Well I decided to get rid of the panel and just use Whisker Menu's program search instead which is like how Windows menu works for the uninitiated. Press the windows key and just start typing what you want. This has been working well until I tried to launch gimp and it didn't return a match. It was trivial to figure out why, as the word gimp wasn't anywhere in the .desktop file, so there was nothing to match. It just struck me funny that it wasn't and I wondered who was in charge of that. I would think that you'd want the single word your program is known by to be somewhere in the name or the description/comment. It was easily fixed by adding gimp to the Comment line, but still.... Code: [Desktop Entry] RE: Linux .desktop file - rich2005 - 06-10-2020 Interesting. Might be how Gimp is installed in Arch. The .desktop file in Debian comes with the package, same for flatpak versions. What does $whereis gimp show? This in my laptop kubuntu 18.04 Code: rich@rich-nova:~$ whereis gimp but /usr/bin/gimp is a symbolic link to the actual executable gimp-2.10 and the .desktop contains Code: Exec=gimp-2.10 %U But the 'other' single word' gimp (the symbolic link) should start from a terminal. FWIW On my old netbook, xubuntu 18.04 search gives what looks like a pointer to the .desktop and the actual [attachment=4521] A bit spoiled in the KDE machines, making .desktop files is really easy. KDE has a comprehensive menu editor. RE: Linux .desktop file - akovia - 06-10-2020 Quote:Might be how Gimp is installed in Arch. The .desktop file in Debian comes with the package, same for flatpak versions.The .desktop file comes with with the Arch package as well. In fact, I believe it's identical to the source code, other than the one installed has all the different localizations included, but the English entries are the same. It appears our installations are identical as well. Code: $ whereis gimp What I meant about the "single word", was a user facing name or description. In this context, a word you could search and find the application you were looking for. I know Whisker menu is not the only implementation of a search interface for all programs. I believe Ubuntu Unity uses a similar interface and I'm sure there are more. So upon a closer look, I realized that the single word was indeed in the .desktop file under Keywords. You would think that would be a searchable field, but Whisker menu could never find it until I added the word "Gimp" to the Comment field. It always did find the "Run gimp" link like in your example, but I thought it should find the true .desktop file with the app icon after a fresh installation, without having to modify anything. Now that I am thoroughly intrigued I have been trying to roll back my changes to do more testing but I haven't been able clear the mime-cache properly it seems. When I edited the Comment field before to include the word "Gimp", it created a local copy of the .desktop file with my changes that overrides the system default. /home/akovia/.local/share/applications/gimp.desktop Even after deleting this file and my attempt to update the mime-cache, update-mime-database ~/.local/share/mime it still finds gimp every time, so I have no idea how to get back to square 1. What I do know is when it couldn't find gimp from the search, I edited the Comment to read "Gimp Image Editor", and then I could find it. I'm in the middle of transferring around a terabyte of data right now or I would try rebooting. I think in the end this may be a Whisker Menu issue and not a gimp issue. As they have the word GIMP listed as a Keyword, it seems Whisker Menu should find it without having to change the Name or Comment fields. In fact, I found another issue already when searching for Kodi. Whisker Menu can't find it even though the Name field is the word "Kodi" [attachment=4527] Code: [Desktop Entry] I suppose I'll report a Whisker Menu bug. I really want to see what's going on here. |