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
.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/…