Add setup_pulse.sh
This commit is contained in:
parent
be0aa4b85a
commit
c4e05bf218
1 changed files with 17 additions and 0 deletions
17
setup_pulse.sh
Normal file
17
setup_pulse.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# !!
|
||||||
|
sudo rm -rf /tmp/pulseaudio.socket && true
|
||||||
|
sudo rm -rf /tmp/pulseaudio.client.conf && true
|
||||||
|
|
||||||
|
pactl load-module module-native-protocol-unix socket=/tmp/pulseaudio.socket
|
||||||
|
|
||||||
|
cat <<EOT >> /tmp/pulseaudio.client.conf
|
||||||
|
default-server = unix:/tmp/pulseaudio.socket
|
||||||
|
# Prevent a server running in the container
|
||||||
|
autospawn = no
|
||||||
|
daemon-binary = /bin/true
|
||||||
|
# Prevent the use of shared memory
|
||||||
|
enable-shm = false
|
||||||
|
EOT
|
Reference in a new issue