[Lxc-users] lxc container and audio

Serge Hallyn serge.hallyn at ubuntu.com
Mon Oct 28 15:42:40 UTC 2013


Quoting brian mullan (bmullan.mail at gmail.com):
> I use ubuntu 13.10 and have used lxc for the past couple years but
> never tried audio/sound from a container.
> 
> Recently I created 2 containers
> 
> 1) I installed xfce in
> $ sudo apt-get install xubuntu-desktop
> 
> 2) I installed lxde in
> $ sudo apt-get install lxde
> 
> I can access either container using vnc or x2go for a remote desktop
> 
> However, in neither do I get any sound/audio on my remote desktop.
> 
> Since this works if I use KVM I am assuming there is something not
> configured
> correctly in LXC to permit use of pulseaudio btwn the container and the
> Host based
> remote desktop client.
> 
> Can anyone point me to a solution?

vnc doesn't support audio.  kvm can send audio to your audio device,
but remote vnc viewer to kvm will not give you audio.

To have the container play audio just put the audio devices you need
in the container's /dev, and make sure the device whitelist allows
access (in /var/lib/lxc/$container/config).  (see /dev/snd I guess).
I haven't actually done it myself, I'm sure others have.  I only
responded because your believ that vnc has forwarded audio for you
before will send you down the wrong path and waste your time :)

-serge




More information about the lxc-users mailing list