X clients in a container

A project log for Container cheat sheet


lion-mclionheadlion mclionhead 05/23/2023 at 21:140 Comments

The goog spits out many hits for running an X11 program in a container by creating a new container from scratch.  Buried in this list was 1 hit for reconfiguring an existing container.

The general idea is to add 1 line to your /var/lib/lxc/*/config file

lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir,ro

Then restart the container.

This creates a path which redirects the X server sockets of display :0 to the X server sockets of the host display.