From 27bc60aeab83a91d4eae3be14f6eff4f67552d02 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 17 Apr 2023 10:32:51 +0200 Subject: [PATCH] pipewire.conf: add condition for exec and modules Add a condition to load the session manager and pipewire-pulse. This makes it possible to disable the exec based on a context.properties override. Add a condition to load the access module. This makes it possible to disable the default access behaviour and override with a custom one. Fixes #3160 --- src/daemon/pipewire.conf.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index b8ba514f6..697bf094d 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -47,6 +47,9 @@ context.properties = { # keys checked below to disable module loading module.x11.bell = true + # enables autoloading of access module, when disabled an alternative + # access module needs to be loaded. + module.access = true } context.spa-libs = { @@ -152,6 +155,7 @@ context.modules = [ # access.force permission. #access.force = flatpak } + condition = [ { module.access = true } ] } # Makes a factory for wrapping nodes in an adapter with a @@ -290,12 +294,14 @@ context.exec = [ # but it is better to start it as a systemd service. # Run the session manager with -h for options. # - @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" } + @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" + @sm_comment@ condition = [ { exec.session-manager = null } { exec.session-manager = true } ] } # # You can optionally start the pulseaudio-server here as well # but it is better to start it as a systemd service. # It can be interesting to start another daemon here that listens # on another address with the -a option (eg. -a tcp:4713). # - @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" } + @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" + @pulse_comment@ condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] } ]