From 5eefb9aae5e9e88b200ff7fcc445120c5ee2998b Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Tue, 8 Sep 2026 16:12:24 +0000
Subject: Improve user service management
- Separate /etc/s6.conf from /etc/s6-user.conf
- Have --system|--user handled at the s6 level, not the s6-frontend level
- Also have --help rewritten at the s6 level because it's cleaner
- On --user, process the config file with sed to import XDG variables
- Do not use s6f_user_get_confdirs() anymore (can remove it if we
decide to stick with this design), --user now only changes the
conf file, and only command-line options such as --scandir can override
what is described in the conf file.
- Document the current behaviour.
---
doc/s6.conf.html | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
(limited to 'doc/s6.conf.html')
diff --git a/doc/s6.conf.html b/doc/s6.conf.html
index 8120603..9c15615 100644
--- a/doc/s6.conf.html
+++ b/doc/s6.conf.html
@@ -37,6 +37,15 @@ are located).
what the full path to the foobar service directory is.
+ Location
+
+
+The global /etc/s6.conf path for the configuration variable can be
+overridden by the admin at build time via the --conffile configure
+option, and by the user at s6 run time via the
+S6_CONF environment variable.
+
+
Description
@@ -107,5 +116,43 @@ The default is root and that is fine, but distributions
may want to set it to an unprivileged user.
+
User services
+
+
+ If s6 is invoked with the --user flag,
+the /etc/s6-user.conf file is used instead, with the same
+syntax and the same variables, but additionally, the following
+environment variables, if present, are substituted:
+
+
+
+ - XDG_RUNTIME_DIR
+ - XDG_DATA_HOME
+ - XDG_CONFIG_HOME
+ - XDG_STATE_HOME
+ - XDG_CACHE_HOME
+
+
+
+ That means that a global /etc/s6-user.conf file can for instance declare
+
+
+
+ scandir=${XDG_RUNTIME_DIR}/service
+
+
+
+and the correct location for the scandir will be obtained, for every user.
+
+
+ Location
+
+
+The global /etc/s6-user.conf path for the configuration variable can be
+overridden by the admin at build time via the --userconffile configure
+option, and by the user at s6 run time via the
+S6_USER_CONF environment variable.
+
+