When running something from the command-line, the which
command can be used to find out which executable is actually called. That is great. I would like to be able to find out that information also for programs that are started using the graphical launcher.
For example, if I press the super key (the one with a windows logo on it) and start typing "sound", the program "Sound Recorder" pops up and I can click on it to start it. Then it starts, fine, but how do I know which executable it was that I just started? The name is not necessarily the same as the name "Sound Recorder" that I clicked on.
For this example I can figure it out doing some guesswork, like this:
ps -A | grep sound
1848 tty2 00:00:00 gsd-sound
13645 tty2 00:00:00 gnome-sound-rec
So it is probably gnome-sound-recorder and then I can do
which gnome-sound-recorder
to find out it is actually /usr/bin/gnome-sound-recorder
.
But that was assuming the executable same was something with "sound", what if that was not the case? Is there a better way to find out which executable is launched?
Find the desktop launcher in one of these 2 locations:
/usr/share/applications/
~/.local/share/applications
The Exec line is what is executed so ...
(random example) would show