Scroll to navigation

ELOGIND.SYNTAX(7) elogind.syntax ELOGIND.SYNTAX(7)

NAME

elogind.syntax - General syntax of elogind configuration files

INTRODUCTION

This page describes the basic principles of configuration files used by elogind(1) and related programs for:

•elogind unit files, see elogind.unit(5), elogind.service(5), elogind.socket(5), elogind.device(5), elogind.mount(5), elogind.automount(5), elogind.swap(5), elogind.target(5), elogind.path(5), elogind.timer(5), elogind.slice(5), elogind.scope(5)

•daemon config files, see elogind-system.conf(5), elogind-user.conf(5), logind.conf(5), journald.conf(5), journal-remote.conf(5), journal-upload.conf(5), elogind-sleep.conf(5), timesyncd.conf(5)

The syntax is inspired by XDG Desktop Entry Specification[1] .desktop files, which are in turn inspired by Microsoft Windows .ini files.

Each file is a plain text file divided into sections, with configuration entries in the style key=value. Empty lines and lines starting with "#" or ";" are ignored, which may be used for commenting.

Lines ending in a backslash are concatenated with the following line while reading and the backslash is replaced by a space character. This may be used to wrap long lines. The limit on line length is very large (currently 1 MB), but it is recommended to avoid such long lines and use multiple directives, variable substitution, or other mechanism as appropriate for the given file type. When a comment line or lines follow a line ending with a backslash, the comment block is ignored, so the continued line is concatenated with whatever follows the comment block.

Example 1. 

[Section A]
KeyOne=value 1
KeyTwo=value 2
# a comment
[Section B]
Setting="something" "some thing" "..."
KeyTwo=value 2 \
       value 2 continued
[Section C]
KeyThree=value 2\
# this line is ignored
; this line is ignored too
       value 2 continued

Various settings are allowed to be specified more than once, in which case the interpretation depends on the setting. Often, multiple settings form a list, and setting to an empty value "resets", which means that previous assignments are ignored. When this is allowed, it is mentioned in the description of the setting. Note that using multiple assignments to the same value makes the file incompatible with parsers for the XDG .desktop file format.

NOTES

1.
XDG Desktop Entry Specification
elogind 239.3