From 100928a8e53dafb0fd698028ef464ac9e42bfc86 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Mon, 13 Feb 2006 20:16:08 +0000 Subject: Autostart spec added --- autostart/.cvsignore | 14 +++ autostart/AUTHORS | 5 + autostart/ChangeLog | 4 + autostart/Makefile.am | 16 +++ autostart/NEWS | 0 autostart/README | 6 + autostart/autogen.sh | 3 + autostart/autostart-spec.xml | 272 +++++++++++++++++++++++++++++++++++++++++++ autostart/configure.in | 61 ++++++++++ 9 files changed, 381 insertions(+) create mode 100644 autostart/.cvsignore create mode 100644 autostart/AUTHORS create mode 100644 autostart/ChangeLog create mode 100644 autostart/Makefile.am create mode 100644 autostart/NEWS create mode 100644 autostart/README create mode 100755 autostart/autogen.sh create mode 100644 autostart/autostart-spec.xml create mode 100644 autostart/configure.in diff --git a/autostart/.cvsignore b/autostart/.cvsignore new file mode 100644 index 0000000..f5518ef --- /dev/null +++ b/autostart/.cvsignore @@ -0,0 +1,14 @@ +config.log +config.status +config.sub +configure +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +config.guess +config.h +config.h.in +install-sh +missing +autostart-spec.html diff --git a/autostart/AUTHORS b/autostart/AUTHORS new file mode 100644 index 0000000..cc42641 --- /dev/null +++ b/autostart/AUTHORS @@ -0,0 +1,5 @@ +John Palmieri +Kévin Ottens +Renato Caldas +Rodrigo Moya +Waldo Bastian diff --git a/autostart/ChangeLog b/autostart/ChangeLog new file mode 100644 index 0000000..b7b5318 --- /dev/null +++ b/autostart/ChangeLog @@ -0,0 +1,4 @@ +2006-02-13 Waldo Bastian + + * Import of autostart spec + diff --git a/autostart/Makefile.am b/autostart/Makefile.am new file mode 100644 index 0000000..f13d2c9 --- /dev/null +++ b/autostart/Makefile.am @@ -0,0 +1,16 @@ +HTML_FILES= autostart-spec.html + +XML_FILES= autostart-spec.xml + +EXTRA_DIST= $(HTML_FILES) $(XML_FILES) + +if XML_DOCS_ENABLED +all-local: $(HTML_FILES) +endif + +%.html: %.xml + $(XMLTO) html-nochunks $< + +maintainer-clean-local: + rm -f $(HTML_FILES) + diff --git a/autostart/NEWS b/autostart/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/autostart/README b/autostart/README new file mode 100644 index 0000000..7700629 --- /dev/null +++ b/autostart/README @@ -0,0 +1,6 @@ +This is the autostart specification. + +It covers +* automatic launching of applications when the user logs in +* automatic launching of applications when a new media is mounted + diff --git a/autostart/autogen.sh b/autostart/autogen.sh new file mode 100755 index 0000000..b1376df --- /dev/null +++ b/autostart/autogen.sh @@ -0,0 +1,3 @@ +#! /bin/sh +autoreconf -v --install || exit 1 +./configure --enable-maintainer-mode "$@" diff --git a/autostart/autostart-spec.xml b/autostart/autostart-spec.xml new file mode 100644 index 0000000..9da220c --- /dev/null +++ b/autostart/autostart-spec.xml @@ -0,0 +1,272 @@ + + + ]> + +
+ + Desktop Application Autostart Specification + Version &version; + 13 February 2006 + + + John + Palmieri + +
+ johnp@redhat.com +
+
+
+ + Kévin + Ottens + +
+ ervin@ipsquad.net +
+
+
+ + Renato + Caldas + +
+ seventhguardian_@hotmail.com +
+
+
+ + Rodrigo + Moya + +
+ rodrigo@gnome-db.org +
+
+
+ + Waldo + Bastian + +
+ bastian@kde.org +
+
+
+
+
+ + + Introduction + + This DRAFT document defines a method for automatically starting + applications during the startup of a desktop environment and after + mounting a removable medium. + + + Some of the file locations in this specification are specified based + on the + "desktop base directory specification". + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL + NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and + "OPTIONAL" in this document are to be interpreted as + described in RFC 2119. + + + + Autostart Of Applications During Startup + + By placing an application's .desktop file + in one of the autostart directories the application will be + automatically launched during startup of the user's desktop environment. + + + Autostart Directories + + The Autostart Directories are $XDG_CONFIG_DIRS/autostart as defined + in accordance with the + + "Referencing this specification" section in the + + "desktop base directory specification". + + + If the same filename is located under multiple Autostart Directories + only the file under the most important directory should be used. + + + + Example: If $XDG_CONFIG_HOME is not set the Autostart Directory + in the user's home directory is ~/.config/autostart/ + + + + + Example: If $XDG_CONFIG_DIRS is not set the system wide Autostart + Directory is /etc/xdg/autostart/ + + + + + Example: If $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS are not set and + the two files /etc/xdg/autostart/foo.desktop and + ~/.config/autostart/foo.desktop exist then only the file + ~/.config/autostart/foo.desktop will be used because + ~/.config/autostart/ is more important than /etc/xdg/autostart/ + + + + + Application .desktop Files + + An application .desktop file must have the format as defined in + the + "Desktop Entry Specification". All keys should be + interpreted as defined with the following exceptions in order to + take into account that the .desktop files in an autostart directory + are not shown in a menu. + + + Hidden Key + + When the .desktop file has the Hidden key set to true, the .desktop + file MUST be ignored. When multiple .desktop files with the + same name exists in multiple directories then only the Hidden key + in the most important .desktop file must be considered: If it is + set to true all .desktop files with the same name + in the other directories MUST be ignored as well. + + + + OnlyShowIn and NotShowIn Keys + + The OnlyShownIn entry may contain a list of strings identifying + the desktop environments that MUST autostart this application, + all other desktop environments MUST NOT autostart this application. + + + The NotShownIn entry may contain a list of strings identifying + the desktop environments that MUST NOT autostart this + application, all other desktop environments MUST autostart this + application. + + + Only one of these keys, either OnlyShowIn or NotShowIn, may appear + in a single .desktop file. + + + + TryExec Key + + A .desktop file with a non-empty TryExec field MUST NOT be + autostarted if the value of the TryExec key does NOT match with + an installed executable program. The value of the TryExec field + may either be an absolute path or the name of an executable + without any path components. If the name of an executable is + specified without any path components then the $PATH environment + is searched to find a matching executable program. + + + + + Implementation Notes + + + If an application autostarts by having a .desktop file installed + in the system wide autostart directory, an individual user can + disable the autotomatic start of this application by placing a + .desktop file of the same name in its personal autostart directory + which contains the key Hidden=true. + + + + + + Autostart Of Applications After Mount + + When a desktop environment mounts a new medium, the medium may contain + an Autostart file that can suggest to start an application or + an Autoopen file that can suggest to open a specific file located + on the medium. + + + Autostart Files + + When a new medium is mounted the root directory of the medium should + be checked for the following Autostart files in order of precendence: + .autorun, autorun, autorun.sh + Only the first file that is present should be considered. + + + The desktop environment MAY ignore Autostart files altogether + based on policy set by the user, system administrator or vendor. + + + The desktop environment MUST prompt the user for confirmation before + automatically starting an application. + + + When an Autostart file has been detected and the user has confirmed + its execution the autostart file MUST be executed with the + current working directory (CWD) set to the root directory of the + medium. + + + + Autoopen Files + + When a new medium is mounted and a) the medium does not contain an + Autostart file or b) a policy to ignore Autostart files is in effect + then the root directory of the medium should be checked for the + following Autoopen files in order of precedence: + .autoopen, autoopen . + Only the first file that is present should be considered. + + + The desktop environment MAY ignore Autoopen files altogether + based on policy set by the user, system administrator or vendor. + + + An Autoopen file MUST contain a single relative path that points to + a non-executable file contained on the medium. + If the file contains a newline or carriage return character then the + newline or carriage return character itself and all characters that + follow MUST be ignored. + + + The relative path MUST NOT contain path components that refer to a + parent directory (../) + + + The relative path MUST NOT point to an executable file. + + + The desktop environment MUST verify that the relative path points to + a file that is actually located on the medium, taking into account any + symbolic or other links and MUST ignore any relative path that + points to a file location outside the medium itself. + + + If the relative path points to an executable file then the desktop + environment MUST NOT execute the file. + + + The desktop environment MUST prompt the user for confirmation before + opening the file. + + + When an Autoopen file has been detected and the user has confirmed + that the file indicated in the Autoopen file should be opened then + the file indicated in the Autoopen file MUST be opened in the + application normally preferred by the user for files of its kind + UNLESS the user instructed otherwise. + + + + +
+ diff --git a/autostart/configure.in b/autostart/configure.in new file mode 100644 index 0000000..7df76ac --- /dev/null +++ b/autostart/configure.in @@ -0,0 +1,61 @@ +dnl -*- mode: m4 -*- +AC_PREREQ(2.52) + +AC_INIT(autostart-spec.xml) + +AM_INIT_AUTOMAKE(autostart-spec, 0.5) + +# Honor aclocal flags +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + ## must come before we use the $USE_MAINTAINER_MODE variable later +AM_MAINTAINER_MODE + +AC_ARG_ENABLE(xml-docs, [ --enable-xml-docs build XML into HTML (requires xmlto)],enable_xml_docs=$enableval,enable_xml_docs=auto) + +### XML tools + +AC_PATH_PROG(XMLTO, xmlto, no) + +AC_MSG_CHECKING([whether to build XML documentation]) + +if test x$XMLTO = xno ; then + have_xmlto=no +else + have_xmlto=yes +fi + +if test x$enable_xml_docs = xauto ; then + if test x$have_xmlto = xno ; then + enable_xml_docs=no + else + enable_xml_docs=yes + fi +fi + +if test x$enable_xml_docs = xyes; then + if test x$have_xmlto = xno; then + AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found]) + fi +fi + +AM_CONDITIONAL(XML_DOCS_ENABLED, test x$enable_xml_docs = xyes) +AC_MSG_RESULT(yes) + +AC_OUTPUT([ +Makefile +]) + +dnl ========================================================================== +echo " + Autostart specification $VERSION + ============== + + prefix: ${prefix} + source code location: ${srcdir} + xmlto: ${XMLTO}" + +echo " + Maintainer mode: ${USE_MAINTAINER_MODE} + Building XML docs: ${enable_xml_docs} +" -- cgit v1.2.3-54-g00ecf