no need ssh now, can start instance with api.
Change Start('the path to your compositor', 'cmd of your container manager only support "lxc" for LXD and "incus" for Incus', 'name of the container', 'username in container', 'startcmd of desktop like sway|labwc|startx|mate-session...')() in if _name_ == '_main_' to fit you.
Change /path/to/ctde.py to the real path of ctde.py.
https://discuss.linuxcontainers.org/t/autostart-container-desktop-environment/ https://discuss.linuxcontainers.org/t/an-update-about-nest-x11/ https://discuss.linuxcontainers.org/t/its-possible-to-run-containerlized-x11-without-nesting-or-vnc-or-rdp-but-i-need-help-with-input/