diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build index 10227629d..a96409f2b 100644 --- a/src/daemon/systemd/user/meson.build +++ b/src/daemon/systemd/user/meson.build @@ -11,6 +11,12 @@ systemd_config = configuration_data() systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire') systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse') +pw_service_reqs = '' +if get_option('dbus').enabled() + pw_service_reqs += 'dbus.service ' +endif +systemd_config.set('PW_SERVICE_REQS', pw_service_reqs) + configure_file(input : 'pipewire.service.in', output : 'pipewire.service', configuration : systemd_config, diff --git a/src/daemon/systemd/user/pipewire.service.in b/src/daemon/systemd/user/pipewire.service.in index 4236c6bd4..f0c8d9cd5 100644 --- a/src/daemon/systemd/user/pipewire.service.in +++ b/src/daemon/systemd/user/pipewire.service.in @@ -13,7 +13,7 @@ Description=PipeWire Multimedia Service # # After=pipewire.socket is not needed, as it is already implicit in the # socket-service relationship, see systemd.socket(5). -Requires=pipewire.socket +Requires=pipewire.socket @PW_SERVICE_REQS@ ConditionUser=!root [Service]