Looking for way to create virtual gui desktop container inside container e.g docker or LXD whichever is better

  • 2
    Docker/containers are not virtualization... They are just processes running in their filesystem/network "bubble". You could have a specific app in a container that uses an X-Server on the container host but that would be complicated to setup, and there are better alternatives (Snap/Flatpak/AppImage). – xenoid Jun 30 at 9:45
  • It's not really accurate to say that containers are not virtualisation. en.wikipedia.org/wiki/OS-level_virtualisation – Cipher Menial Jul 1 at 7:05

while not really made for it something that would appear like a classic VM (as outlined by @xenoid) you can achieve "a full remote desktop in the container" via xrdp, see this reddit post for some details.

The TL;DR would be:

$ sudo apt install xrdp
$ sudo apt install xorgxrdp
$ sudo apt install xrdp-pulseaudio-installer

I think depending on the ubuntu version you might need to enable the services and then connect with the RDP client of your choice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.