I trying to figure out the way to install an X server inside of LXD container, so an X server will not mix up with the host system’s files and be isolated from it. I want to start the LXD container with the X server in it whenever I need to run a desktop or a graphical program on the same machine physically, as the host (i.e.: not from the remote workstation), while the rest of the time keep it as a plain Ubuntu Server.
I have Ubuntu 18.04 server with a deb version of LXD v3.0.0.
Please tell me, if you know of the way to accomplish it, or at least, point me to the resource, where I can find such information or tutorial. If I need to use a newer version of LXD for it, I don’t mind and I will use the snap version if needed, or maybe, you know of a way to do it with another isolation technology, such as docker, snap package or whatever else?
While trying to figure it out, I’ve stumbled upon:
What “bunch of bind-mounts to have raw access to the host tty devices, dri kernel interface and any GPU endpoint” is he talking about and how they are done?