Score:1

How to find the location of a specific app (or .desktop file) visible in launcher

us flag

Sometimes I find an application very easily in the native Launcher, or even a third-party one like Synapse; but locating the corresponding app (or at least its .desktop file, which contains the path to the app binary) is very difficult.

Unlike Windows, right-clicking on a desktop icon, whether in the side bar/panel or native Launcher does not offer an Open Location command (at least on Unity desktop; if it works on Gnome or some other desktop, please tell me which). Even on Windows it's not great: this will send you to the Shortcut file (equivalent of .desktop file). Then you must right-click > Open Target Location again. But it's feasible entirely via GUI, in 4 clicks.

Similarly, third-party launchers like Synapse and Ulauncher don't display the full path besides the app name.

As a workaround, I have to resort to these workarounds each time:

A. Open one of the Desktop applications folder: /usr/share/applications/ ~/.local/share/applications/

and do a deep search (Ctrl+F) for a certain app name. Hopefully the .desktop file is named like the app and this works.

One day, when looking for an AppImage I was a little too quick and did a typeahead search (legacy Nautilus behavior when you press a letter directly without Ctrl+F, which can be restored with ppa:lubomir-brindza/nautilus-typeahead). However the desktop file name was prefixed with "appimagekit-" so I missed it... You really need full search to be sure, although other desktop files should be fine.

B. Go to /, then: $ locate *.desktop | grep appname or $ locate appname.desktop if you're sure the desktop file name ends with appname

Again, the desktop file must be named properly.

C. If all else fails, the desktop file is probably badly named, and you must search for the app name inside .desktop text inside each file. Any command will do (rg, ag, ack... even opening folder in VS Code and running a full search)

but all come down to the same: manually searching for a string inside a set of folders.

In addition, once I have found the .desktop file, I must still open it in some editor and read the target path to finally find the application binary.

Is there not a way to locate a specific .desktop file (or better, the app directly) while it's shown right in front of me in the side bar/panel or the Launcher/Dash? It would be a much more natural, and efficient, approach to me.

pl flag
My first question would be "why?". Why do you *need* to find the binary specified in a desktop file, if it launches from the desktop just fine? What's the goal here other than curiosity?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.