Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "connection refused" for pa clients #3

Open
guss77 opened this issue Apr 13, 2020 · 0 comments
Open

Getting "connection refused" for pa clients #3

guss77 opened this issue Apr 13, 2020 · 0 comments

Comments

@guss77
Copy link

guss77 commented Apr 13, 2020

With a new Pulseaudio server (I'm currently running 13.99, but I understand this applies for version 12 and above), having the cookie is no longer sufficient to allow the Pulseaudio clients to connect.

I've worked around the problem with the same technique as described in the x11docker issue #71 - creating an anonymous one-use pulseaudio socket and mounting it instead of the primary socket.

My run script looks something like this:

DOCKERID=${RANDOM} # or some other value that makes sense, for example - a counter
pasocket=$(pactl load-module module-native-protocol-unix socket=$HOME/.config/pulse/docker-socket$DOCKERID auth-anonymous=1)
docker run ... -v $HOME/.config/pulse/zoiper-socket$DOCKERID:/home/user/.pulse.socket ...
# after run
pactl unload-module $pasocket
rm -f $HOME/.config/pulse/zoiper-socket$DOCKERID

[ user is the user name of the unprivileged user inside docker]

The /etc/pulse/client.conf has to be updated, but that is not enough for command line utilities such as pacat - these need to also have the PULSE_SERVER environment variable set to unix:/home/user/.pulse.socket. I solved this by tacking an export at the end of /home/user/.bashrc. I check that this works well for the GUI applications I'm running in the docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant