0

When I hover over a quick launch icon, the name of the underlying application is displayed. But how can I find what application is really being invoked?

In a MS Windows context, I would right click the icon and select Properties - then the path of the file to be executed would be shown.

This came up because my "Files" quick launch icon would do nothing, and it took some considerable research to realize that icon was actually linked to /usr/bin/nautilus.

1
  • It is also a right click context. We use the Properties entry for more information on files. If you had put a .desktop file on the desktop you could use this menu there but usually they are located in other places. See here: askubuntu.com/questions/126268/…
    – Takkat
    May 16, 2017 at 18:10

1 Answer 1

1

In GNU/Linux we use .desktop files aka "Desktop Entries", they are located at:

/usr/share/applications/

also can be find per user as:

~/.local/share/applications/

From here:

Desktop Entry specification provides a standard for applications to integrate into a desktop environment. Desktop entries are the configuration files that describe how an application is launched and which data it can handle. They also configure how an application appears in a menu with an icon, which is subject to the related menu specification standard.

You can locate them using locate command too:

locate nautilus.desktop

or

locate nautilus | grep ".desktop"

let's see what is in nautilus.desktop:

$ cat /usr/share/applications/nautilus.desktop

[Desktop Entry]
NotShowIn=Unity;
Name=Files
Comment=Access and organize files
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window %U

As you see the name is "Files" however it executes nautilus --new-window %U. For the command nautilus itself as you should know we can use which to find out where it is located:

$ which nautilus
/usr/bin/nautilus

To find them by name you can do as follow, say we want to know by clicking on an icon with the name "Files" which program will be executed:

 grep -lRi name=files /usr/share/applications/
  • -l: show only file names
  • -R: recersuve
  • -i: in-case sensitive

it will outputs:

/usr/share/applications/org.gnome.Nautilus.desktop
/usr/share/applications/nautilus-folder-handler.desktop
/usr/share/applications/nautilus.desktop

then I can look into those files for Exec= to see which program really will be run.

something like this will do it more convenience:

grep -lRi name=files /usr/share/applications/ | xargs grep exec= -i
1
  • To give a quick one-liner:
    – Luke H
    Mar 4, 2020 at 6:59

You must log in to answer this question.

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