Mstsc launched with docker, and it can't be killed

When I launched docker desktop in windows, the mstsc started with docker at the same time.
When I killed the mstsc in taskmanager, it wound be launch again.
When I exit the docker, the mstsc also exit at the same time.

The behavior you observe is not caused by Docker Desktop itself.
It is caused by the gui application support in WSL2 itself on Windows 11 (this feature does not exist on Windows 10). See GitHub - microsoft/wslg: Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios for details. When a WSL2 distro is started a hidden rdp connection is established between the distro and the rd client, which gets shown as soon as you start a x-application.

To disable this behavior (=the gui support), create or edit the file %USERPROFILE%\.wslconfig and add guiApplications=false underneath the [wsl2] block like this:

Then execute wsl --shutdown to apply the new settings.

It works, thanks you very much. :coffee: