Running Gui apps in LXD

Use proxy type for X0 device, the profile I am using:

lxc profile create x11app <<EOF
config:
  environment.DISPLAY: :1
description: Default LXD profile
devices:
  X1:
    bind: container
    connect: unix:@/tmp/.X11-unix/X1
    listen: unix:@/tmp/.X11-unix/X1
    type: proxy
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
EOF