<div dir="ltr"><div>Hi,</div><div><br></div><div>Thanks for the response.</div><div><br></div><div>But how do I get the pulseaudio daemon running in
userspace that is listening to unix socket /run/user/1000/pulse/native ?</div><div>I don't want to start this daemon manually but as a systemd service.</div><div><br></div><div>kr<br>jan</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op zo 13 dec. 2020 om 14:40 schreef GMAIL <<a href="mailto:temptempor@gmail.com">temptempor@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi, <br>
</p>
<p>This can be achieved fairly "simply" (as long as you know what to
look for).</p>
<p>You need to pass the pulse socket into the container and tell
pulse clients inside the container its precise path.</p>
<p>So on Docker CLI, for a typical Pulse daemon running in
userspace, it would be something like:</p>
<table width="1666" height="27" cellspacing="2" cellpadding="2" border="0">
<tbody>
<tr>
<td valign="top" bgcolor="#000000"><b><font size="+1" color="#ffffff"><code>-v
/run/user/1000/pulse:/run/user/1000/pulse </code></font></b><br>
</td>
</tr>
</tbody>
</table>
<p>Inside the container, once you've installed Pulseaudio, you need
to modify its client configuration:</p>
<p><font color="#0027ff"><u>/etc/pulse/client.conf</u></font></p>
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tbody>
<tr>
<td valign="top" bgcolor="#000000">
<pre><b><font size="+1" color="#ffffff">default-server = /run/user/1000/pulse/native</font></b>
</pre>
</td>
</tr>
</tbody>
</table>
<p>With this your Pulseaudio applications should be able to play
sounds through the host PulseAudio server (of course, you'd need
to adapt the runtime paths to your environment).</p>
<p>Bear in mind, there seems to be some inconsistencies in the way
various Pulse utilities interface with the daemon. In this setup
for example, <font face="Droid Sans">"pacmd</font>" won't work,
whilst <font face="Droid Sans">"pactl</font>" works fine once the
client configuration is fixed. <br>
</p>
<p>You could test this in a manual way first and then automate
things a bit with a Dockerfile and what not.</p>
<p>Best regards.<br>
</p>
<div>On 12/12/2020 16:19, Jan Van den
Audenaerde wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I have spend several days without success figuring out how
I can use pulseaudio in a container setup on an embedded
device.</div>
<div><br>
</div>
<div><i>I am running CentOs 8 on a headless device (intel-nuc)
which is also running docker.<br>
I would like to run pulseaudio server on the host (CentOs 8)
and my docker containers should be able to use pulseaudio
client to communicate with the pulseaudio server via
pulseaudio unix socket.<br>
Moreover it should be possible that different docker
containers can access the microphone and speaker at the same
time.</i><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>The main problem I am facing I have reported in following
forum post: </div>
<div><br>
</div>
<div>
<ul>
<li><a href="https://forums.centos.org/viewtopic.php?f=54&t=76643" target="_blank">https://forums.centos.org/viewtopic.php?f=54&t=76643</a></li>
</ul>
<div><br>
</div>
<div>Any help would be much appreciated.</div>
</div>
<div>I also think that pulseaudio has the good requirements for
use in a container setup if I only can make it work.</div>
<div>Jan.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
pulseaudio-discuss mailing list
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div></div>