19 lines
521 B
Bash
Executable File
19 lines
521 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# Dirty workaround until this is fixed:
|
|
# Device permissions are broken in 18.02 and 17.12.1 Docker ...
|
|
# https://github.com/docker/for-linux/issues/228#issuecomment-370545814
|
|
chgrp audio -- /dev/snd/*
|
|
|
|
# So that dbus-daemon can create /var/run/dbus/system_bus_socket
|
|
mkdir /var/run/dbus
|
|
dbus-daemon --system --fork
|
|
|
|
# Avahi-daemon is needed by the PulseAudio's module-zeroconf-publish.
|
|
# PulseAudio will talk to the Avahi via the Dbus.
|
|
sleep 1
|
|
avahi-daemon -D
|
|
|
|
sleep 1
|
|
exec su user -c "pulseaudio $@"
|