diff --git a/man/pipewire.conf.5.xml.in b/man/pipewire.conf.5.xml.in index 14c2f582d..ee3a15130 100644 --- a/man/pipewire.conf.5.xml.in +++ b/man/pipewire.conf.5.xml.in @@ -21,8 +21,9 @@ This file is part of PipeWire. file.

The config file in the default location is used but the - environment variable PIPEWIRE_CONFIG_FILE can be used to specify - an alternative config file.

+ environment variables PIPEWIRE_CONFIG_DIR, PIPEWIRE_CONFIG_PREFIX + and PIPEWIRE_CONFIG_NAME can be used to specify an alternative config + directory, subdirectory and file respectively.

diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 1f3580519..da3b29c89 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -199,7 +199,9 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop, goto error_free; } - conf_prefix = pw_properties_get(properties, PW_KEY_CONFIG_PREFIX); + conf_prefix = getenv("PIPEWIRE_CONFIG_PREFIX"); + if (conf_prefix == NULL) + conf_prefix = pw_properties_get(properties, PW_KEY_CONFIG_PREFIX); conf_name = getenv("PIPEWIRE_CONFIG_NAME"); if (conf_name == NULL)