microsoft / microsoft/WSL

Feature Request: Add 'wsl --desktop <distro>' command for automated RDP/GUI session

Open
#40,336 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Is your feature request related to a problem? Please describe.
Currently, setting up a full desktop environment (GNOME, XFCE, etc.) in WSL 2 requires multiple manual steps: installing a desktop environment, configuring an RDP server like xrdp, finding the IP address, and manually launching the Windows Remote Desktop Connection client. While WSLg is great for individual apps, it doesn't provide a cohesive "full OS" experience out of the box.

Describe the solution you'd like
I would like a native WSL command, such as wsl --desktop , that automates this workflow. Ideally, this command would:

  1. Initialize the specified distro.

  2. Start the necessary display services/RDP server within Linux.

  3. Automatically launch the Windows mstsc.exe (Remote Desktop) and connect it to the session.

Describe alternatives you've considered
Manual configuration: Installing xfce4 and xrdp manually (tedious for new users).

Third-party scripts: Using community-made .sh or .bat files (often break with updates).

WSLg: Works for single apps, but isn't designed for a full-screen, integrated desktop environment experience.

Additional context
Adding this would make WSL a more competitive alternative to full virtual machines (VirtualBox/VMware/Hyper-V) for developers who need a native Linux UI experience without the overhead of a traditional VM setup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing wsl command handling, WSL 2 distro initialization, WSLg, and the xrdp/mstsc.exe workflow described here. Define the supported display services and session behavior; done would be a maintainable command that initializes the distro, starts the desktop session, and launches Remote Desktop.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, desktop, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.