From fa0e2f82ca6aca2baff6bb35df39a11001d0a74e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 11 Oct 2017 10:38:28 +0100 Subject: [PATCH 1/4] desktop-entry-spec: New section "File naming" This combines the notes on file naming that were previously part of "Basic format of the file" with the former appendix "Desktop File ID". Signed-off-by: Simon McVittie --- desktop-entry/desktop-entry-spec.xml | 78 +++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/desktop-entry/desktop-entry-spec.xml b/desktop-entry/desktop-entry-spec.xml index c4d3299..9d0b5f5 100644 --- a/desktop-entry/desktop-entry-spec.xml +++ b/desktop-entry/desktop-entry-spec.xml @@ -85,8 +85,8 @@ the specification, becomes simpler. - - Basic format of the file + + File naming Desktop entry files should have the .desktop extension, except for files of Type @@ -103,6 +103,46 @@ [A-Z][a-z][0-9] along with dash ('-') and underscore ('_'). Components may not begin with a digit. + + + Desktop File ID + + Each desktop entry representing an application is identified by + its desktop file ID, which is based on its + filename. + + + 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. + + + + + Basic format of the file Desktop entry files are encoded in UTF-8. A file is interpreted as a series of lines that are separated by linefeed characters. Case is @@ -1554,40 +1594,6 @@ Icon=fooview-new the name as it appears in the "Encoding" column above. - - 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. - - Changes to this Specification
-- 2.15.0.rc0