-
Notifications
You must be signed in to change notification settings - Fork 379
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
Pulseaudio: system-wide installation support #266
Comments
May be creating a socket in |
Thank you for reporting this! I assume user
Likely Let me think about this. If you have further ideas, please let me know! |
Yes, socket allows arbitrary access, but At least I'm gonna fork it now and make a nasty patch with:
|
Oh, just found out that it does not unload module from pulseaudio upon exit... |
IIRC there was a bug when unloading the module and pulseaudio crashed or freezed entirely. I remember that I once dropped unloading the module and just deleted the socket to make it unuseable. One idea: Maybe system-wide pulseaudio works with |
Yes it works with tcp, thats how I found it does not unload modules :) I have 12 instances of module-native-protocol-tcp. |
Hmm, system-wide setup of pulseaudio recommends disabling module loading at runtime, so the better idea is to specify system-wide socket E.g. set this up with |
Fixed, thanks for the observation. x11docker now sets the host IP to
Is there a good reason for this? What issues causes it otherwise? Some setups only work over TCP and need a module, e.g.
That might be a way for the default socket setup. Could you show me your full output of |
|
They say, it might be exploited if any local user with access to pulseaudio (being added to https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ But I'm building a home server with several applications running simultaneously which must be able to share the same audio output, so I decided to use pulseaudio this peculiar way. |
I just found out that pactl's output is system-language dependent... So grep might not work on non-english locales. E.g. https://forum.manjaro.org/t/pulseaudio-controller-fails-to-assign-select-the-output-device/112442/3 |
I think the better is to not alter default behavior and let user choose |
This is an issue with many commands. It can be solved setting the x11docker could check for |
That would be ok as a default behavior, I think |
Is done and uploaded yet. I might try out to use |
I tried to implement
So it won't work this way, because symlinks work only on host. See https://stackoverflow.com/questions/38485607/mount-host-directory-with-a-symbolic-link-inside-in-docker-container |
To check for now, you could also add |
Of course it works this way. NB: after your latest patch container hostname when |
I just checked, this is regular docker behaviour and is not related to the patch. The same happens without x11docker and setting Thank you for the pull request! It looks well integrated.
I just fear that the PR might add complexity and new issues that I could not debug myself without setting up pulseaudio the same way. |
Didn't know that, thanks.
I'm trying to mitigate the need to I just tested my container with an unknown UID and it fails to connect to pulseaudio server.
Knowing that
As I tested, there's no need for cookie in system-wide setup, pulseaudio checks if connecting user is in
Tested without |
It might work for unknown UIDs with
It might be worth to try out
Likely pulseaudio does not check itself, but the socket file has belongs to |
Right you are. I was wondering about the magic around how pulseaudio checks client access, I thought it was something in it's native protocol :) |
I've commited a change that unloads the pulseaudio module on exit. IIRC pulseaudio clients that are connected over a module cannot load modules on their own. I'll have to re-check that. |
I finally decided not to merge your PR:
Your PR was well integrated, and your investigation and report helped to improve and fix x11docker. Thank you very much! |
Pulseaudio can be run system-wide, in which case it runs as
pulse
user. This is useful for allowing different sessions/headless sessions to access the same pulseaudio daemon.x11docker asks
pactl
to create a socket for communicating with container client but this socket resides in<cwd>/.cache/x11docker/<image-name-container-id>/share
and providing<cwd>
is something like/home/someuser
it appears inaccessible for pulseaudio running aspulse
. Sopactl
fails and x11docker falls back to enable ALSA integration.I suggest making an ability to provide path for pulseaudio socket or just create it under
/tmp
.The text was updated successfully, but these errors were encountered: