30 lines
702 B
Bash
30 lines
702 B
Bash
#!/bin/bash
|
|
|
|
# Setup directories for PipeWire and PulseAudio sockets
|
|
export XDG_RUNTIME_DIR=/tmp/pw-runtime
|
|
mkdir -p /tmp/pw-runtime
|
|
|
|
export PULSE_RUNTIME_PATH=/tmp/pulse
|
|
mkdir -p /tmp/pulse
|
|
|
|
# Initialize local DBus session (required by PipeWire/WirePlumber)
|
|
export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --print-address --fork)
|
|
|
|
echo "Starting PipeWire..."
|
|
pipewire &
|
|
sleep 1
|
|
|
|
echo "Starting WirePlumber session manager..."
|
|
wireplumber &
|
|
sleep 1
|
|
|
|
echo "Starting PipeWire-Pulse compatibility layer..."
|
|
pipewire-pulse &
|
|
sleep 1
|
|
|
|
# Ensure the PulseAudio socket is accessible to other containers
|
|
chmod -R 777 /tmp/pulse || true
|
|
|
|
echo "Starting PipeWire Web Remote..."
|
|
exec ./pipewire-web-remote
|