1<?xml version="1.0"?>
2<!--*-nxml-*-->
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6<refentry id="systemd-xdg-autostart-generator" conditional="ENABLE_XDG_AUTOSTART">
7
8  <refentryinfo>
9    <title>systemd-xdg-autostart-generator</title>
10    <productname>systemd</productname>
11  </refentryinfo>
12
13  <refmeta>
14    <refentrytitle>systemd-xdg-autostart-generator</refentrytitle>
15    <manvolnum>8</manvolnum>
16  </refmeta>
17
18  <refnamediv>
19    <refname>systemd-xdg-autostart-generator</refname>
20    <refpurpose>User unit generator for XDG autostart files</refpurpose>
21  </refnamediv>
22
23  <refsynopsisdiv>
24    <para><filename>/usr/lib/systemd/user-generators/systemd-xdg-autostart-generator</filename></para>
25  </refsynopsisdiv>
26
27  <refsect1>
28    <title>Description</title>
29
30    <para><filename>systemd-xdg-autostart-generator</filename> is a generator
31    that creates .service units for
32    <ulink url="https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html">XDG autostart</ulink>
33    files.
34    This permits desktop environments to delegate startup of these applications to
35    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
36    .</para>
37
38    <para>Units created by <filename>systemd-xdg-autostart-generator</filename>
39    can be started by the desktop environment using <literal>xdg-desktop-autostart.target</literal>.
40    See
41    <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
42    for more details.</para>
43
44    <para>XDG autostart may be conditionalized using both standardized and non-standardized keys.
45    In order to handle these, the generator may create one or more <varname>ExecCondition=</varname> entries.
46    For non-standardized keys, well-known helper binaries provided by Desktop Environments are used.
47    All external helpers <emphasis>must</emphasis> detect their corresponding desktop environment and
48    <emphasis>must</emphasis> return success when run in a different environment.
49    This is important as all <varname>ExecCondition=</varname> directives must succeed for an application to be started.</para>
50
51    <table>
52      <title>
53        Special XDG desktop file entries that are processed
54      </title>
55      <tgroup cols='2'>
56        <colspec colname='entry' />
57        <colspec colname='handling' />
58        <thead>
59          <row>
60            <entry>Entry</entry>
61            <entry>Handling</entry>
62          </row>
63        </thead>
64        <tbody>
65          <row>
66            <entry><varname>Hidden=</varname>, <varname>X-systemd-skip=</varname></entry>
67            <entry>No service will be generated if set to true</entry>
68          </row>
69          <row>
70            <entry><varname>OnlyShowIn=</varname>, <varname>NotShowIn=</varname></entry>
71            <entry><varname>ExecCondition=</varname> using <filename>systemd-xdg-autostart-condition</filename></entry>
72          </row>
73          <row>
74            <entry><varname>TryExec=</varname></entry>
75            <entry>No service will be generated if the binary does not exist or cannot be executed</entry>
76          </row>
77          <row>
78            <entry><varname>AutostartCondition=</varname> (GNOME extension)</entry>
79            <entry><varname>ExecCondition=</varname> using <filename>gnome-systemd-autostart-condition</filename></entry>
80          </row>
81          <row>
82            <entry><varname>X-GNOME-Autostart-Phase=</varname></entry>
83            <entry>No service will be generated if set to any value</entry>
84          </row>
85          <row>
86            <entry><varname>X-KDE-autostart-condition=</varname></entry>
87            <entry><varname>ExecCondition=</varname> using <filename>kde-systemd-start-condition</filename></entry>
88          </row>
89        </tbody>
90      </tgroup>
91    </table>
92
93    <para><filename>systemd-xdg-autostart-generator</filename> implements
94    <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
95  </refsect1>
96
97  <refsect1>
98    <title>See Also</title>
99    <para>
100      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
101      <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
102      <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
103    </para>
104  </refsect1>
105
106</refentry>
107