The menu system in any XDG compliant desktop searches .desktop
launchers in specific directories in order to build the application menu. These directories are ~/.local/share/applications
and any applications
directory under each directory listed in the XDG_DATA_DIRS
environmental variable. If files with the same name exist in multiple of these directories, the first one encountered will be used. Thus, for example, a file ~/.local/share/applications/firefox.desktop
will be used, and not /usr/share/applications/firefox.desktop
. This mechanism allows to override systemwide installed launchers with launchers customized for the current user.
Files where NoDisplay
is set to true
will not be included in the application menu. This is the case in your first /usr/share/applications/bluetooth-sendto.desktop
launcher. The ~/.local/share/applications/bluetooth-sendto.desktop
does not have that directive. Because the default for NoDisplay
is true
, that launcher should cause a menu item to be shown.
- Is the second and third ones considered "obsolete" or do they just exist to fulfill some backward compatibility?
The second one is the one that is in use when you are logged in. The first one is the systemwide one, i.e., will be used if a user does not have a private one. The third one is not within the search path for the menu system, at least not on a default Ubuntu system.
- Which file is controlled by menulibre?
If you change a .desktop
file in menulibre, changes will always be stored in ~/.local/share/applications
. If a .desktop
launcher is already existing there, changes will be added to that file. If instead a systemwide launcher was in effect, changes made with menulibre will be stored in a copy under ~/.local/share/applications
.