[Overview] GUI inside Containers

If you want to have a GUI inside your Container there are multiple methods to achieve this.

Factors to consider include:

  • GPU acceleration (needed for demanding applications such as Games, Editing-, Rendering programs etc.)
  • Security (in terms of seperation between Host and Container)


With GPU acceleration:

  • Use the Host’s Wayland/XWayland Server: [Howto] Use the Host's Wayland and XWayland Servers inside containers
    This is also usable for X-Server users, because some Wayland compositors (e.g. weston) can run on an X-Server (in a seperate window, so you can simply continue using the X-Server) and with XWayland you also have compatibility for legacy X-Server applications inside Wayland.
    Regarding Security: More secure because of the way Wayland works.
  • Use the Host’s X-Server: Described in simos blog: Running X11 software in LXD containers – Mi blog lah!
    Regarding Security: Insecure because of the way X-Server works.
    Consider using the Wayland method above, which also works on X-Servers.

Without GPU acceleration:

More Methods:

See also:

@tomp Maybe you could put this into the Tutorials Section?
This way we could have an overview of different methods for users trying to find them.

@simos If you want to add or change something, just say it; you seem to be the expert regarding this topic.

1 Like