chiark / gitweb /
fs-util: introduce fchmod_and_chown()
[elogind.git] / man / elogind.syntax.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
9
10 <refentry id="elogind.syntax">
11
12   <refentryinfo>
13     <title>elogind.syntax</title>
14     <productname>elogind</productname>
15
16     <authorgroup>
17       <author>
18         <contrib>A. U. Thor</contrib>
19         <firstname>Zbigniew</firstname>
20         <surname>Jędrzejewski-Szmek</surname>
21         <email>zbyszek@in.waw.pl</email>
22       </author>
23     </authorgroup>
24   </refentryinfo>
25
26   <refmeta>
27     <refentrytitle>elogind.syntax</refentrytitle>
28     <manvolnum>7</manvolnum>
29   </refmeta>
30
31   <refnamediv>
32     <refname>elogind.syntax</refname>
33     <refpurpose>General syntax of elogind configuration files</refpurpose>
34   </refnamediv>
35
36   <refsect1>
37     <title>Introduction</title>
38
39     <para>This page describes the basic principles of configuration files used by
40     <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>1</manvolnum></citerefentry>
41     and related programs for:
42     <itemizedlist>
43       <listitem><para>elogind unit files, see
44       <citerefentry><refentrytitle>elogind.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
45       <citerefentry><refentrytitle>elogind.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
46       <citerefentry><refentrytitle>elogind.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
47       <citerefentry><refentrytitle>elogind.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
48       <citerefentry><refentrytitle>elogind.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
49       <citerefentry><refentrytitle>elogind.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
50       <citerefentry><refentrytitle>elogind.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
51       <citerefentry><refentrytitle>elogind.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
52       <citerefentry><refentrytitle>elogind.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
53       <citerefentry><refentrytitle>elogind.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
54       <citerefentry><refentrytitle>elogind.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
55       <citerefentry><refentrytitle>elogind.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem>
56
57       <listitem><para>daemon config files, see
58       <citerefentry><refentrytitle>elogind-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
59       <citerefentry><refentrytitle>elogind-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
60       <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
61       <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
62       <citerefentry><refentrytitle>journal-remote.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
63       <citerefentry><refentrytitle>journal-upload.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
64       <citerefentry><refentrytitle>elogind-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
65       <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
66       </para></listitem>
67     </itemizedlist>
68     </para>
69
70     <para>The syntax is inspired by
71     <ulink url="http://standards.freedesktop.org/desktop-entry-spec/latest/">XDG Desktop Entry Specification</ulink>
72     <filename>.desktop</filename> files, which are in turn inspired by Microsoft Windows
73     <filename>.ini</filename> files.
74     </para>
75
76     <para>Each file is a plain text file divided into sections, with configuration entries in the
77     style <replaceable>key</replaceable>=<replaceable>value</replaceable>.
78     Empty lines and lines starting with <literal>#</literal> or <literal>;</literal> are
79     ignored, which may be used for commenting.</para>
80
81     <para>Lines ending in a backslash are concatenated with the following line while reading and the
82     backslash is replaced by a space character. This may be used to wrap long lines. The limit on
83     line length is very large (currently 1 MB), but it is recommended to avoid such long lines and
84     use multiple directives, variable substitution, or other mechanism as appropriate for the given
85     file type.</para>
86
87     <example><programlisting>[Section A]
88 KeyOne=value 1
89 KeyTwo=value 2
90
91 # a comment
92
93 [Section B]
94 Setting="something" "some thing" "…"
95 KeyTwo=value 2 \
96        value 2 continued
97 </programlisting></example>
98
99     <para>Various settings are allowed to be specified more than once, in which case the
100     interpretation depends on the setting. Often, multiple settings form a list, and setting to an
101     empty value "resets", which means that previous assignments are ignored. When this is allowed,
102     it is mentioned in the description of the setting. Note that using multiple assignments to the
103     same value makes the file incompatible with parsers for the XDG <filename>.desktop</filename>
104     file format.</para>
105   </refsect1>
106
107 </refentry>