I have lxd containers running locally successfully but can not start X11 applications back to the host. I have tried following @simos great blog post Running X11 software in LXD containers – Mi blog lah! but it generates errors during container creation. Any help or guidance is appreciated.
Following Blog Error 1
The error occurs during creation due to NVIDO container tools. Initial brief search didn’t find much context.
$ lxc launch images:mint/vanessa --profile default --profile x11 mbrowse -s pool1
Error: Load go-lxc struct: The NVIDIA container tools couldn't be found
Try `lxc info --show-log local:mbrowse` for more info
$ lxc launch ubuntu:18.04 --profile default --profile x11 mycontainer -s pool1
Comment Nvidia in Profile Config: Error 2
Under the argument that I don’t need GPU acceleration I thought why not try without the GPU labelled explicitly in the config. This second error returns more results in forum but I haven’t figured out yet how they might help. For instance I already have nvidia-smi installed.
$ lxc profile edit x11
commented lines starting nvidia.* and mygpu config tree
$ lxc launch images:mint/vanessa --profile default --profile x11 mbrowse -s pool1
Creating mbrowse
Starting mbrowse
Error: Error occurred when starting proxy device: Error: Failed to receive fd from listener process: Failed to receive file descriptor via abstract unix socket
Try `lxc info --show-log local:mbrowse` for more info
$ lxc info --show-log local:mbrowse
Name: mbrowse
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2022/10/20 08:25 CDT
Last Used: 2022/10/20 08:25 CDT
Log:
lxc mbrowse 20221020132530.205 WARN cgfsng - cgroups/cgfsng.c:fchowmodat:1251 - No such file or directory - Failed to fchownat(40, memory.oom.group, 1000000000, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW )
context
I have previously gotten lxc privileged container to run X11 applications.
Does your “use case” require that the X11 has to run on the Host?
I install desktops (ubuntu, Lubuntu, Lubuntu, Mate, Cinnamon, etc) and XRDP in LXD containers along with xRDP but not the xRDP in the repositories but I use c-energy’s great XRDP install script which can build from latest source both xRDP & Pulseaudio & xRDP & install them.
@bmullan interesting proposal. I think I’d be interested in the scripts but I’d still like to solve the X11 problem from a 1) curiosity, 2) this should work, and 3) simplicity perspective.
if xRDP with full desktop in a container then…
more packages to regularly update
container image is bigger which raises the question of why you’d still use a container vs just use virtualbox images that you group launch and xRDP to
the Ubuntu environment focus makes me wonder if xRDP has snap dependencies
does alt+tab work or get confused as it sometimes does with windows RDP? i.e. am I alt+tabbing in the host or the guest?
Curious if anyone know if nvidia container tools is necessary to get X11 to work. Also curious if anyone can comment on the following error for X11 access.
Error: Error occurred when starting proxy device: Error: Failed to receive fd from listener process: Failed to receive file descriptor via abstract unix socket
Try `lxc info --show-log local:mbrowse` for more info