From 6855384d021d88557f80674798c584c15b547f36 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Sun, 28 May 2006 23:53:11 +0000 Subject: Patch by Vincent Untz * cleanup of text and some reorg for clearity * move all of the legacy-mixed encoding stuff to the appendix * deprecate the Swallow* keys * improve definition of group headers * reorder the list of standard keys so they are sorted by type See http://lists.freedesktop.org/archives/xdg/2006-May/008131.html --- desktop-entry/ChangeLog | 8 + desktop-entry/desktop-entry-spec.xml | 403 +++++++++++++++++------------------ 2 files changed, 206 insertions(+), 205 deletions(-) (limited to 'desktop-entry') diff --git a/desktop-entry/ChangeLog b/desktop-entry/ChangeLog index 8ec57c3..7fa8c3c 100644 --- a/desktop-entry/ChangeLog +++ b/desktop-entry/ChangeLog @@ -1,3 +1,11 @@ +2006-05-28 Vincent Untz + * cleanup of text and some reorg for clearity + * move all of the legacy-mixed encoding stuff to the appendix + * deprecate the Swallow* keys + * improve definition of group headers + * reorder the list of standard keys so they are sorted by type + See http://lists.freedesktop.org/archives/xdg/2006-May/008131.html + Tue Jul 13 18:04:11 2004 Jonathan Blandford * desktop-entry-spec.xml: Update the MIME description to make it diff --git a/desktop-entry/desktop-entry-spec.xml b/desktop-entry/desktop-entry-spec.xml index c890a57..46db5ed 100644 --- a/desktop-entry/desktop-entry-spec.xml +++ b/desktop-entry/desktop-entry-spec.xml @@ -4,8 +4,8 @@
Desktop Entry Specification - Version 0.9.4 - 7 July 2003 + Version 0.9.5 + 28 May 2006 Preston @@ -34,6 +34,15 @@ + + Vincent + Untz + +
+ vuntz@gnome.org +
+
+
@@ -61,25 +70,8 @@ should be simply called .directory. - The basic format of the desktop entry file requires that there be - a "group" header named [Desktop Entry]. This - "group" entry denotes that all {key,value} - pairs following it belong in the Desktop Entry group. There may - be other groups present in the file, but this is the most - important group which explicitly needs to be supported. This - group should also be used as the "magic key" for automatic MIME - type detection. There should be nothing proceeding this group in - the desktop entry file but possibly one or more comments (see - below). - - - Group headers may not contain the characters [ and - ] as those delimit the header. - - - Lines beginning with a # and blank lines are - considered comments and will be ignored, however they should be - preserved across reads and writes of the desktop entry file. + Desktop entry files are encoded as lines of 8-bit characters separated + by LF characters. Case is significant everywhere in the file. Compliant implementations MUST not remove any fields from the file, @@ -88,45 +80,120 @@ This ensures that any desktop-specific extensions will be preserved even if another system accesses and changes the file. + + Comments - Entries in the file are {key,value} pairs in the format: - - Key=Value - - Space before and after the equals sign should be ignored; the = - sign is the actual delimiter. + Lines beginning with a # and blank lines are + considered comments and will be ignored, however they should be + preserved across reads and writes of the desktop entry file. - The escape sequences \s, \n, - \t, \r, and - \\ are supported, meaning ASCII space, newline, - tab, carriage return, and backslash, respectively. + Comment lines are uninterpreted and may contain any character + (except for LF). However, using UTF-8 for comment lines that + contain characters not in ASCII is encouraged. + + + Group headers + + A group header with name groupname is a line in the + format: + + [groupname] + + Group names may contain all ASCII characters except for + [ and ] and control characters. + + + All {key,value} pairs following a group header until + a new group header belong to the group. + + + The basic format of the desktop entry file requires that there be + a group header named Desktop Entry. There may + be other groups present in the file, but this is the most + important group which explicitly needs to be supported. This + group should also be used as the "magic key" for automatic MIME + type detection. There should be nothing preceding this group in + the desktop entry file but possibly one or more comments. + + + + Entries + + Entries in the file are {key,value} pairs in the + format: + + Key=Value + + Space before and after the equals sign should be ignored; the + = sign is the actual delimiter. + + + Key names must contain only the characters A-Za-z0-9- + + + As the case is significant, the keys Name and + NAME are not equivalent. + + Possible value types - The value types recognized are string, localestring, regexp, - boolean (encoded as the string true/false), and numeric. + The value types recognized are string, + localestring, regexp, + boolean, and + numeric. + + + + Values of type string may contain all ASCII + characters except for control characters. + + + + + Values of type localestring are user displayable, + and are encoded in UTF-8. + + + + + Values of type boolean must either be the string + true or false. + + + + + Values of type numeric must be a valid floating + point number as recognized by the %f specifier for + scanf. + + + - Values of type string must contain only ASCII - characters excluding control characters. Values of type - localestring are user displayable, and are - encoded in UTF-8 unless the Legacy-Mixed - Encoding is specified (see .) + The escape sequences \s, \n, + \t, \r, and + \\ are supported for values of type + string and localestring, meaning + ASCII space, newline, tab, carriage return, and backslash, respectively. - Some keys can have multiple values; these should be separated by a - semicolon. Those keys which have several values should have a - semicolon as the trailing character. Semicolons in these values - need to be escaped using \;. + Some keys can have multiple values. In such a case, the value of the key + is specified as a plural: for example, string(s). The + multiple values should be separated by a semicolon. Those keys which + have several values should have a semicolon as the trailing character. + Semicolons in these values need to be escaped using + \;. - - Recognized desktop entry keys + + Localized values for keys - Keys with type localestring may be postfixed by [LOCALE], + Keys with type localestring may be postfixed by + [LOCALE], where LOCALE is the locale type of the entry. LOCALE must be of the form lang_COUNTRY.ENCODING@MODIFIER, @@ -144,11 +211,7 @@ LOCALE postfixes of all occurrences of the key, with the .ENCODING part - stripped. The - .ENCODING field is - used only when the value of the Encoding key - for the desktop entry file is Legacy-Mixed - (see .) + stripped. The matching of is done as follows. If @@ -236,13 +299,11 @@ then the value of the Name keyed by sr_YU is used. + + + Recognized desktop entry keys - Case is significant. The keys Name and NAME are not equivalent. - The same holds for group names. Key values are case sensitive as - well. - - - Keys are either OPTIONAL or REQUIRED. If a key is optional it may or + Keys are either OPTIONAL or REQUIRED. If a key is OPTIONAL it may or may not be present in the file. However, if it isn't, the implementation of the standard should not blow up, it must provide some sane defaults. Additionally, keys either MUST or MAY be @@ -273,9 +334,9 @@ Type There are 4 types of desktop entries: - Application, - Link, FSDevice - and Directory. + Application (type 1), + Link (type 2), FSDevice + (type 3) and Directory (type 4). string YES @@ -296,18 +357,6 @@ YES 1-4 - - Encoding - - Encoding of the whole desktop entry file - (UTF-8 or - Legacy-Mixed). - - string - YES - YES - 1-4 - Name @@ -361,10 +410,9 @@ name is an absolute path, the given file will be used. If the name is not an absolute path, an implementation-dependent search algorithm will be used - to locate the icon. Icons may be localized with the - Icon[xx]= syntax. + to locate the icon. - string + localestring NO YES 1-4 @@ -384,6 +432,22 @@ NO 1-4 + + OnlyShowIn, NotShowIn + + A list of strings identifying the environments that should + display/not display a given desktop entry. Only one of + these keys, either OnlyShowIn or + NotShowIn, may appear in a group (for + possible values see the Desktop + Menu Specification). + + string(s) + NO + NO + 1-4 + FilePattern @@ -440,54 +504,70 @@ 1 - SwallowTitle + Actions - If entry is swallowed onto the panel, this should be the title of the window. + Additional actions possible, see MIME type discussion in . - localestring - NO + string(s) NO + YES 1 - SwallowExec + MimeType - Program to exec if swallowed app is clicked. + The MIME type(s) supported by this entry. - string + string(s) NO NO 1 - Actions + Categories - Additional actions possible, see MIME type discussion in . + Categories in which the entry should be shown in a menu (for + possible values see the Desktop + Menu Specification). string(s) NO - YES + NO 1 - MimeType + StartupNotify - The MIME type(s) supported by this entry. + If true, it is KNOWN that the application will send a "remove" + message when started with the DESKTOP_LAUNCH_ID environment variable + set (see the Startup Notification Protocol Specification for more details). - strings(s) + boolean NO NO 1 - SortOrder + StartupWMClass - This may specify the order in which to display files. + If true, it is KNOWN that the application will map at least one + window with the given string as its WM class or WM name hint (see the Startup Notification Protocol Specification for more details). - string(s) + string NO NO - 4 + 1 + + + URL + + If entry is Link type, the URL to access. + + string + NO + YES + 2 Dev @@ -541,118 +621,19 @@ 3 - URL - - If entry is Link type, the URL to access. - - string - NO - YES - 2 - - - Categories - - Categories in which the entry should be shown in a menu (for - possible values see the Desktop - Menu Specification). - - string(s) - NO - NO - 1 - - - OnlyShowIn, NotShowIn + SortOrder - A list of strings identifying the environments that should - display/not display a given desktop entry. Only one of - these keys, either OnlyShowIn or - NotShowIn, may appear in a group (for - possible values see the Desktop - Menu Specification). + This may specify the order in which to display files. string(s) NO NO - 1-4 - - - StartupNotify - - If true, it is KNOWN that the application will send a "remove" - message when started with the DESKTOP_LAUNCH_ID environment variable - set (see the Startup Notification Protocol Specification for more details). - - boolean - NO - NO - 1 - - - StartupWMClass - - If true, it is KNOWN that the application will map at least one - window with the given string as its WM class or WM name hint (see the Startup Notification Protocol Specification for more details). - - string - NO - NO - 1 + 4 - - Character set encoding of the file - - Desktop entry files are encoded as lines of 8-bit characters separated - by LF characters. - - - - - Key names must contain only the characters A-Za-z0-9- - - - - - Group names may contain all ASCII characters except for - [ and ] and control characters. - - - - - Values of type string may contain all ASCII characters except - for control characters. - - - - - Values of type boolean must either be the string true or - false. - - - - - Numeric values must be a valid floating point number as recognized - by the %f specifier for scanf. - - - - - Comment lines are uninterpreted and may contain any character - (except for LF). However, using UTF-8 for comment lines that - contain characters not in ASCII is encouraged. - - - The encoding for values of type localestring is determined by the - Encoding field. - - List of valid <varname>Exec</varname> parameter variables @@ -741,7 +722,7 @@ - %i + %i The Icon field of the desktop entry expanded as two parameters, first @@ -878,7 +859,6 @@ application/x-bar=bar.desktop; [Desktop Entry] Version=1.0 Type=Application -Encoding=UTF-8 Name=Foo Viewer Comment=The best viewer for Foo objects available! TryExec=fooview @@ -955,9 +935,11 @@ Icon=fooview-edit.png - Encoding=Legacy-Mixed, which allowed - localestrings in the encoding of the specified locale, is - deprecated. + The Encoding key is deprecated. It was used to + specify whether keys of type localestring were + encoded in UTF-8 or in the specified locale. Possible values are + UTF-8 and Legacy-Mixed. See + for more details. @@ -973,7 +955,7 @@ Icon=fooview-edit.png Deprecated keys: MiniIcon (small icon for - menus, etc), TerminalOptions (if the + menus, etc.), TerminalOptions (if the program runs in a terminal, any options that should be passed to the terminal emulator before actually executing the program), Protocols, @@ -982,6 +964,17 @@ Icon=fooview-edit.png MapNotify. + + + The SwallowTitle and + SwallowExec keys are deprecated. + The SwallowTitle key is of type + localestring and specifies the title of the window + if is swallowed onto the panel. The SwallowExec + key is of type string and specifies the + program to exec if swallowed app is clicked. + + Historically some booleans have been represented by the numeric @@ -1003,12 +996,12 @@ Icon=fooview-edit.png The <constant>Legacy-Mixed</constant> Encoding (Deprecated) - The Legacy-Mixed encoding corresponds to the traditional encoding - of desktop files in older versions of the GNOME and KDE desktop - files. In this encoding, the encoding of each localestring key - is determined by the locale tag for that key, if any. For keys - without a locale tag, the value must contain only ASCII - characters. + The Legacy-Mixed encoding corresponds to the + traditional encoding of desktop files in older versions of the GNOME and + KDE desktop files. In this encoding, the encoding of each + localestring key is determined by the locale tag for + that key, if any, instead of being UTF-8. For keys without a locale tag, + the value must contain only ASCII characters. If the file specifies an unsupported encoding, the implementation -- cgit v1.2.3-54-g00ecf