From 75638ed7f0a619027609e213deccf22f1b29981a Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Mon, 29 Apr 2013 17:17:42 -0700 Subject: [PATCH] desktop-entry: add DBusActivatable Add a DBusActivatable key along with the recommendation that desktop files be named like "org.example.FooViewer.desktop". --- desktop-entry/desktop-entry-spec.xml | 85 +++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/desktop-entry/desktop-entry-spec.xml b/desktop-entry/desktop-entry-spec.xml index 7d99d0a..3b59530 100644 --- a/desktop-entry/desktop-entry-spec.xml +++ b/desktop-entry/desktop-entry-spec.xml @@ -52,6 +52,15 @@ + + Ryan + Lortie + +
+ desrt@desrt.ca +
+
+
@@ -79,6 +88,10 @@ fall back to recognition via "magic detection". + For applications, the part of the name of the desktop file (before the .desktop) + should follow the "reverse DNS" convention, e.g. org.example.FooViewer.desktop. + + 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 significant everywhere in the file. @@ -467,6 +480,20 @@ NO 1-3 + + DBusActivatable + + A boolean value specifying if D-Bus activation is supported for this application. If this key is + missing, the default value is false. If the value is true + then implementations should ignore the Exec key and send a D-Bus message to + launch the application. See D-Bus Activation for more information on + how this works. Applications should still include Exec= lines in their desktop files for + compatibility with implementations that do not understand the DBusActivatable key. + + boolean + NO + + TryExec @@ -798,6 +825,57 @@ %U field codes may only be used as an argument on their own. + + D-Bus Activation + + Applications that support being launched by D-Bus must implement the following interface (given in D-Bus + introspection XML format): + + + + + + + + + + + + + + + ]]> + + + The application must name its desktop file in accordance with the naming recommendations in the + introduction section (e.g. the filename must be like org.example.FooViewer.desktop). + The application must have a D-Bus service activatable at the well-known name that is equal to the desktop + file name with the .desktop portion removed (for our example, + org.example.FooViewer). The above interface must be implemented at an object path + determined as follows: starting with the well-known D-Bus name of the application, change all dots to + slashes and prefix a slash. For our example, this is /org/example/FooViewer. + + + The Activate method is called when the application is started without files to open. + + + The Open method is called when the application is started with files. The array of + strings is an array of URIs, in UTF-8. This method will only be called if the application has listed one + or more MIME types. + + + The ActivateAction method is called when Desktop + Actions are activated. The action-name parameter is the name of the action. + + + All methods take a platform-data argument that is used in a similar way to how + environment variables might be used. Currently, only one field is defined by the specification: + desktop-startup-id. This should be a string of the same value as would be stored in + the DESKTOP_STARTUP_ID environment variable, as specified by the Startup Notification Protocol + Specification. + + Registering MIME Types @@ -965,10 +1043,13 @@ application/x-bar=bar.desktop; Program to execute for this action, possibly with arguments. See the Exec - key for details on how this key works. + key for details on how this key works. The Exec key is required if + DBusActivatable is not set to true in the main desktop entry + group and should be included for compatibility with implementations that do not understand + DBusActivatable. string - YES + NO -- 1.8.1.4