Re: Missing Service in Runit
Reply #3 –
I use the below script to start pipewire/wireplumber when I log in, feel free to adapt as needed (I host the script with my dotfiles which are licensed MIT No Attribution)
#!/bin/bash
# Kill any running pipewire processes
killall -q wireplumber & killall -q pipewire-pulse & killall -q pipewire
# Wait for processes to stop
while pgrep -u $UID -x wireplumber >/dev/null; do sleep 1; done
while pgrep -u $UID -x pipewire >/dev/null; do sleep 1; done
while pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
# Wait for xdg-desktop-portal to start
until pgrep -u $UID -f /usr/lib/xdg-desktop-portal >/dev/null; do sleep 1; done
# Launch pipewire
echo "---" | tee -a /tmp/{wireplumber.log,pipewire.log,pipewire-pulse.log}
/usr/bin/wireplumber 2>&1 | tee -a /tmp/wireplumber.log & disown
/usr/bin/pipewire 2>&1 | tee -a /tmp/pipewire.log & disown
/usr/bin/pipewire-pulse 2>&1 | tee -a /tmp/pipewire-pulse.log & disown
"killall" isn't exactly the POSIX way of cleaning up processes, but it works just fine. Edit: some programs do still expect pulseaudio to be on PATH, in this event I just symlink /usr/bin/true to /somewhere/on/path/pulseaudio, i.e., "ln -s /bin/true /usr/local/bin/pulseaudio"