https://discuss.linuxcontainers.org/t/gui-in-virtual-machines-vms/9223
To access the Graphical console of a Virtual machine, follow the instructions below:
On Linux: Note: Package names might be different on certain distributions.
Install virt-viewer (remote-viewer) or spice-gtk-client (spicy) on your client system. Login with:
lxc console --type=VGA
install:
sudo apt install virt-viewer
lxc launch images:ubuntu/22.04/desktop ubuntu --vm -c limits.cpu=4 -c limits.memory=4GiB --console=vga
lxc start ubuntu --console=vga