E. Desktop File ID

The desktop file ID is the identifier of an installed desktop entry file.

To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.

For example /usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.

If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.

For example, if $XDG_DATA_DIRS contains the default paths /usr/local/share:/usr/share, then /usr/local/share/applications/org.foo.bar.desktop and /usr/share/applications/org.foo.bar.desktop both have the same desktop file ID org.foo.bar.desktop, but only the first one will be used.

If both foo-bar.desktop and foo/bar.desktop exist, it is undefined which is selected.

If the desktop file is not installed in an applications subdirectory of one of the $XDG_DATA_DIRS components, it does not have an ID.