[lxc-users] How to run GUI apps in an LXD container (with graphics acceleration)

Simos Xenitellis simos.lists at googlemail.com
Tue May 2 20:37:41 UTC 2017

On Tue, May 2, 2017 at 5:09 PM,  <sjoerd at sjomar.eu> wrote:
> May 2, 2017 1:19 PM, "Simos Xenitellis" <simos.lists at googlemail.com> wrote:
>> Hi All!
>> I wrote the following on how to run GUI apps in an LXD container,
>> https://blog.simos.info/how-to-run-wine-graphics-accelerated-in-an-lxd-container-on-ubuntu
>> The common case is when we run already Ubuntu desktop and we want to
>> get a GUI app
>> to run in a container and the window to appear in the host's X server.
>> I made some effort to minimize the requirements and in my case, I did
>> not even have to add the "gpu" device in LXC.
>> I tried these with LXC 2.13.
>> It would be great if you could try the instructions as well, and
>> report if it works for you.
>> As a testing app, you can use "glxgears".
> Thanks for the HOW-To, but why would you want to do:
> lxc exec wine-games -- sudo --login --user ubuntu
> ubuntu at wine-games:~$ sudo apt update
> ubuntu at wine-games:~$ sudo apt install x11-apps
> ubuntu at wine-games:~$ sudo apt install mesa-utils
> ubuntu at wine-games:~$ exit
> Sounds silly to me to go from a root shell to change to an user to execute root commands via sudo?

There are different ways to present the commands, including "lxc exec
wine-games apt update", etc.
When writing a tutorial, the goal is to get rookies to complete the
tutorial, and not piss off the advanced users.
For the former, the subsequent commands (those with sudo) show
familiarity with other tutorials.
For the latter, you tell me.


More information about the lxc-users mailing list