chiark / gitweb /
man: Add a note about what environment variables are available by default
[elogind.git] / man / systemd.exec.xml
index c0e1d862a62b350d90b5f510c1ff411daa8b1f97..ff8b812ef44087ab47278cde43bcc83e3614952a 100644 (file)
@@ -1,4 +1,3 @@
-<?xml version='1.0'?> <!--*-nxml-*-->
 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                 configuration options are configured in the [Service],
                 [Socket], [Mount], or [Swap] sections, depending on the unit
                 type.</para>
+
+                <para>Processes started by the system systemd instance
+                are executed in a clean environment in which only the
+                <varname>$PATH</varname> and <varname>$LANG</varname>
+                variables are set by default. In order to add
+                additional variables, see the
+                <varname>Environment=</varname> and
+                <varname>EnvironmentFile=</varname> options below. To
+                specify variables globally, see
+                <varname>DefaultEnvironment=</varname> in
+                <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                or the kernel option
+                <varname>systemd.setenv=</varname> in
+                <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Processes
+                started by the user systemd instances inherit all
+                environment variables from the user systemd instance,
+                and have <varname>$HOME</varname>,
+                <varname>$USER</varname>,
+                <varname>$XDG_RUNTIME_DIR</varname> defined, among
+                others. In addition, <varname>$MANAGERPID</varname>
+                contains the PID of the user systemd instance.</para>
         </refsect1>
 
         <refsect1>
                                 absolute filename or wildcard
                                 expression, optionally prefixed with
                                 <literal>-</literal>, which indicates
-                                that if the file does not exist it
-                                won't be read and no error or warning
+                                that if the file does not exist, it
+                                will not be read and no error or warning
                                 message is logged.  This option may be
                                 specified more than once in which case
                                 all specified files are read. If the
                                 the empty string is assigned to this
                                 option the specific list is reset, and
                                 all prior assignments have no
-                                effect.</para></listitem>
+                                effect.</para>
+                                <para>Paths in
+                                <varname>ReadOnlyDirectories=</varname>
+                                and
+                                <varname>InaccessibleDirectories=</varname>
+                                may be prefixed with
+                                <literal>-</literal>, in which case
+                                they will be ignored when they do not
+                                exist.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <function>sigreturn</function>,
                                 <function>exit_group</function>,
                                 <function>exit</function> system calls
-                                are implicitly whitelisted and don't
+                                are implicitly whitelisted and do not
                                 need to be listed explicitly. This
                                 option may be specified more than once
                                 in which case the filter masks are