From code, 1 Month ago, written in Bash.
This paste will go to its last resting place in 9 Months.
Embed
  1. #!/bin/sh
  2.  
  3. # PipeWire launcher script for XDG compliant desktops on OpenRC.
  4. #
  5. # systemd users are very _STRONGLY_ advised to use the much
  6. # more reliable and predictable user units instead.
  7.  
  8. # WARNING: This script assumes being run inside XDG compliant session,
  9. # which means D-Bus session instance is expected to be correctly set up
  10. # prior to this script starting. If that is not true, things may break!
  11.  
  12. # Best to reap any existing daemons and only then try to start a new set.
  13. pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
  14. pkill -u "${USER}" -x pipewire-pulse 1>/dev/null 2>&1
  15. # The core daemon which by itself does probably nothing.
  16.  
  17. # The so called pipewire-pulse daemon used for PulseAudio compatibility.
  18. # Commenting this out will stop the PA proxying daemon from starting,
  19. # however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
  20. # clients will still have access to audio and may end up clashing with
  21. # non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
  22. PIPEWIRE_RUNTIME_DIR=${XDG_RUNTIME_DIR} /usr/bin/pipewire &
  23.  
  24. # Hack for bug #822498
  25. sleep 1
  26.  
  27. # Finally a session manager is required for PipeWire to do anything.
  28. exec /usr/bin/wireplumber -c /usr/share/wireplumber/wireplumber.conf
captcha