subuser-security / subuser

Run programs on linux with selectively restricted permissions.
http://subuser.org
GNU Lesser General Public License v3.0
890 stars 65 forks source link

Audio within subusers interferes with audio outside of subusers #242

Closed timthelion closed 7 years ago

timthelion commented 9 years ago

This is a bit strange:

If I have two subusers, they can both play audio.

If I have two non-subuser programs they can both play audio.

However, I cannot play audio from a subuser and from a non-subusered application at the same.

The probably culprit is pulse audio, which I have running on the host. Not sure how to solve this.

timthelion commented 8 years ago

I guess the only way to solve this is to "admit defeat" to pulse audio, let it take over the system as is it's political goal, and allow subusers to connect via pulse audio. This would involve adding the, "pulse-audio" permission. At least, like with the "gui" permission, this would allow more fine grained control. For example, to allow programs to produce sounds but not listen through the microphone.

timthelion commented 7 years ago

https://github.com/subuser-security/subuser/commit/f41f255a0c641963029c6e15b6a3564d10822545

This fixes the issue to a large extent, though it is still the case that if you launch a subuser which grabs alsa before pulse has launched on the host then pulse cannot be launched on the host. There doesn't seem to be any way to solve this, the same would happen if you ran an alsa program OUTSIDE OF A CONTAINER before starting pulse...