Skip to content

systemd: Add systemd-user-unit-dir override

Jarkko Sakkinen requested to merge jarkko/pipewire:master into master

Add a new build option 'system-user-unit=dir', which can be used to override the pkg-config default value.

By doing this, it becomes more practical to make a local unprivileged build of the latest PipeWire:

$ meson --prefix=~/.local build
$ meson configure build -Dpipewire-alsa=false
$ meson configure build -Dsystemd-user-unit-dir=~/.config/systemd/user
$ meson configure build -Dudevrulesdir="`mktemp -d`"
$ ninja -C build install

For a local build enabling ALSA plugins is not plausible.

JACK needs a simple addition to the ~/.profile:

export LD_LIBRARY_PATH=$HOME/.local/lib/x86_64-linux-gnu/pipewire-0.3/jack

Finally, the genuine PulseAudio must be masked and local services enabled:

systemctl --user enable pipewire.socket
systemctl --user enable pipewire-pulse.socket
systemctl --user mask pulseaudio.service

A sanity check [*] shows that nothing has leaked out of the home directory (even though at least on my Debian 10 system PolKit still asks for authorization during the meson build).

Not perfect, but lowers a barrier to run the development version a lot, as that does not anymore to trash your system.

[*] find / -name "*pipewire*" \! -path "/home/*" \! -path "/var/lib/flatpak/*" 2> /dev/null

Edited by Jarkko Sakkinen

Merge request reports