[systemd-devel] Pulseaudio & systemd-nspawn

Poncho poncho at spahan.ch
Mon Nov 9 03:16:57 PST 2015


On 09.11.2015 11:29, Kai Hendry wrote:
> On Mon, 2 Nov 2015, at 09:46 PM, Felipe Sateler wrote:
>> Maybe the better option is to load the tcp pulseaudio module, allow 
>> connections from the container ip, and inject PULSE_SERVER envvar into 
>> the container.
> 
> Using tcp will not work since I'm using OpenVPN which seems to usurp all
> network traffic.
> 
> Any other ideas?
> 
> Many thanks,
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 

This works for me:

--bind=/run/user/1000/pulse:/run/user/host/pulse

/run/user/1000 gets mounted as tmpfs in the container as soon as you
login with the id 1000 user, therefore bind mount it to /run/user/host

then, use systemd-run with
--setenv=PULSE_SERVER=unix:/run/user/host/pulse/native


More information about the systemd-devel mailing list