[X2Go-User] x2go in LXC (linux containers) - how to enable sound

brian mullan bmullan.mail at gmail.com
Wed Nov 20 13:33:10 CET 2013


I've been doing a lot with LXC containers for the past couple years.

One potentially very interesting use of LXC is to implement x2go so each
user on a single Host PC can have their own LXC container, their own
"desktop" (lxde, xfce, mate etc), install their own applications etc all
without any changes to the Host OS or interfering with other user's and
their container based Desktop environment.

If you are not familiar with LXC ... some of you may have read about Docker
lately.   Docker is based on LXC.

There are many great benefits of LXC virtualization vs the hardware
virtualization provided by vmware, kvm, virtualbox.   Just a few are:

   - LXC is an order of magnitude faster from a performance perspective
   since there is no hardware virtualization involved
   - LXC containers can be created/cloned in seconds
   - LXC container's share the HOST OS's kernel so Host PC resource
   utilization is much less

Anyway, LXC containers are extremely easy to create.

But a default LXC container is usually used for "server" linux
applications.   But its simple to add any "desktop" environment you want to
that server then also add x2goserver, x2goserver-xsession after which that
LXC container becomes a great x2go server environment for a user.   It is
isolated from the Host OS, you can change whatever you want in it and the
Host OS is unaffected.

Anyway, the point of this note was to describe one area that took a while
to figure out.

LXC Containers as mentioned previous were primarily designed for "server"
not "desktop" use-cases.

As such "sound" was not enabled by default in new LXC containers.

note:  In LXC any Host OS resource is or is not permitted through use of a
CGROUP file for each created Container


Even using the Docker "desktop" example:
http://blog.docker.io/2013/07/docker-desktop-your-desktop-over-ssh-running-inside-of-a-docker-container/

Sound does not work by default.

After 3 weeks of researching, trying various ideas of how to enable sound I
finally got it working after some careful reading of the pulseaudio.orgwebsite.

I documented how to configure x2go and another post on configuring
PulseAudio in the LXC Container to provide Sound on my WordPress blog so to
not duplicate things you can find the information here:

http://bmullan.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x2go.org/pipermail/x2go-user/attachments/20131120/59def24d/attachment.html>


More information about the x2go-user mailing list