Skip to content
WSLHow-To Published Updated 4 min readViews unavailable

How to Run Linux GUI Applications on Windows with WSLg

Installing and running a graphical Linux application directly on the Windows desktop through WSLg, with no separate X server setup or remote desktop session.

WSLg makes running a Linux graphical application as simple as running any command-line tool inside WSL — this walks through actually doing it.

Step 1: confirm WSLg is available on your system

echo $DISPLAY
echo $WAYLAND_DISPLAY

Both should return a value on a current WSL2 installation with WSLg enabled — if empty, run wsl --update and ensure you’re on Windows 11 or a sufficiently recent Windows 10 build with WSLg support.

Step 2: install a GUI application inside your distro

sudo apt update
sudo apt install gimp

Any GUI application installable through your distro’s normal package manager works — no special “WSL-compatible” version is needed.

Step 3: launch it directly from the WSL terminal

gimp

The application’s window appears directly on your Windows desktop, just like a native Windows application — no separate remote desktop client or X server configuration required.

Step 4: interact with it exactly like a native window

The window can be resized, moved, minimized, and alt-tabbed to individually, integrated into the normal Windows desktop experience rather than appearing inside some separate contained “Linux desktop” window.

Step 5: test audio if the application uses it

sudo apt install vlc
vlc

Audio from Linux GUI applications routes through WSLg’s bundled PulseAudio server out to your normal Windows audio output — playing a test file confirms this path is working correctly.

Step 6: run a GPU-accelerated graphical application

sudo apt install glxgears
glxgears

This confirms whether GPU-accelerated rendering specifically (as opposed to basic 2D windowing) is working — useful as a quick test before relying on WSLg for a more demanding graphical or GPU-compute-adjacent application.

Step 7: copy and paste between Windows and Linux GUI applications

Clipboard sharing between Windows applications and WSLg-hosted Linux GUI applications works by default — copying text or images in one environment and pasting into the other should work without any additional configuration.

Step 8: troubleshoot if a specific application doesn’t render correctly

If a specific application shows a blank window, crashes on launch, or displays incorrectly while other GUI applications work fine, this blog’s dedicated WSLg troubleshooting guide walks through isolating the specific cause systematically.

Why this capability changes what “just use WSL” can mean

Before WSLg, needing a Linux GUI application meant reaching for a separate VM or dual-boot setup — being able to run it directly alongside native Windows applications, sharing clipboard and audio seamlessly, meaningfully expands WSL’s practical usefulness beyond command-line and server-style development work into genuinely full-featured Linux desktop application use.

What’s actually running behind the scenes when you launch an app

Under the hood, launching a GUI application triggers WSLGd to start Weston (the Wayland reference compositor, extended with Xwayland for non-Wayland-native applications) and a PulseAudio server inside the distribution, then establish an RDP connection to the Windows side using Windows’s own built-in mstsc.exe client running silently. None of this setup requires any action from you — it happens automatically the first time a GUI application is launched in a session — but knowing it’s there explains why the first GUI app launch in a session can take a moment longer than subsequent ones, since that initial connection setup only happens once per session.

Confirming WSLg is present versus needing to update

echo $WAYLAND_DISPLAY

An empty result on a system that should support WSLg usually means either an outdated WSL version or a Windows version that predates WSLg support — wsl --update combined with confirming you’re on Windows 11 or a sufficiently current Windows 10 build resolves the large majority of “GUI apps just don’t work at all” reports, distinct from the narrower, specific rendering issues covered separately in this blog’s dedicated WSLg troubleshooting guide.

Running multiple GUI applications simultaneously

There’s no special step needed to run several GUI applications at once — each launches as its own independent window through the same already-established RDP connection, behaving exactly as multiple native Windows applications would, including independent minimizing, resizing, closing, and being individually alt-tabbed to without any of them being grouped together artificially.

Running GUI applications from a non-default distro

If you run multiple distros, WSLg’s components run independently per distro — launching a GUI application from a second, non-default distro works exactly the same way, with its own separate compositor and audio server instance rather than sharing a single one across every installed distro simultaneously.

Keep this WSLg-versus-WSL-platform distinction in mind whenever “GUI apps don’t work” is the actual report, since the two update paths and troubleshooting steps genuinely differ.

Related:

Sources:

Comments