A Linux desktop on WSL2, rendered on your GPU and shown in a window on Windows.
Work in GNOME, Plasma or another Wayland desktop on a Windows laptop, on up to four monitors. It runs inside WSL2 and feels as fast as a local desktop.
WSL already runs Linux GUI apps through WSLg. WSLg shows single app windows, though, and has no way to show a whole desktop. It also copies every frame off the GPU into system memory, then into WSLg's shared memory, and its viewer uploads the frame back to the GPU to show it. Weaselway keeps the frames on the GPU.
Weaselway is for developers whose company gives them a Windows laptop but who want to work in Linux. It also lets you try a Linux desktop without installing a second operating system. You get GNOME's overview, Plasma's panels or a tiling compositor such as Hyprland.
Weaselway still needs WSLg turned on, which is the default. When frames cannot be shared on the GPU, they go through shared memory that WSL sets up only for WSLg.
OpenGL and Vulkan run on your GPU through Mesa, with more than 150 fixes from Weaselway. Frames stay on the GPU all the way to the viewer.
GNOME and Plasma come set up, and the install script also sets up Hyprland. Other Wayland compositors such as sway and niri also work.
Show the desktop as up to four monitors, each in its own window that you can place on any Windows monitor.
Swipe and pinch gestures with three or more fingers reach the desktop, so its own gestures work.
Sound plays on Windows, and Linux apps can use the microphone and a USB camera. Video calls work.
Copy and paste text and images between Windows and Linux apps.
Attach USB devices shared with usbipd-win. Common USB Bluetooth adapters work, for headphones and for signing in with a passkey on your phone.
The desktop shows the battery charge that Windows reports.
You need an x86_64 Windows machine with WSL2 and a GPU whose Windows driver supports WSL. The viewer runs from inside WSL, so you install nothing on Windows. Only USB devices need usbipd-win (a tool that shares USB devices with WSL) there.
Download the GNOME or Plasma image from the latest release and import it in PowerShell. Everything comes prebuilt. Existing NixOS-WSL systems can add the NixOS module instead.
wsl --install --from-file \
nixos-weaselway-gnome-<version>.wsl \
--name Weaselway
wsl -d Weaselway
The script adds weaselway to the GNOME, Plasma or Hyprland packages from Ubuntu. It compiles Mesa and the compositor on your machine, which leaves you time for a coffee.
git clone https://github.com/weaselway/weaselway
cd weaselway
./distro/install.py
The script adds weaselway to the GNOME, Plasma or Hyprland packages from Arch Linux or CachyOS. It compiles Mesa and the compositor on your machine, which leaves you time for a coffee. Arch's WSL image needs a user and a few packages first.
git clone https://github.com/weaselway/weaselway
cd weaselway
./distro/install.py
Then start the desktop and open it in a window.
ww-install-viewer-link puts a shortcut on the Windows desktop that does both in one click.
ww-start-session
ww-start-viewer
Four parts carry each frame from the Linux desktop to your Windows screen.
A normal Wayland desktop runs inside WSL. WSL has no display device of its own, so the dxgdrm kernel module adds one: a DRM device, the same kind of device that a graphics card gets in /dev/dri. The compositor (mutter, KWin or Hyprland) uses its virtual displays like real monitors, one for each viewer window. Weaselway patches all three compositors for bugs that show up on these virtual displays.
Apps draw on your GPU with OpenGL or Vulkan, through Mesa's d3d12 or dzn driver. With dxgdrm, both drivers can now export a window's buffer as a dma-buf (a handle to GPU memory that another program can open). The compositor then uses the app's buffer directly to draw your desktop, without a copy.
The viewer is FreeRDP built for Windows. When it starts, it shares GPU textures with WSL. Each time the compositor shows a new frame on a virtual display, the weaselwayd daemon draws it into one of these textures, and the viewer puts it on the screen.
If the textures cannot be shared, weaselwayd sends the frames through the shared memory that WSL sets up for WSLg. Keyboard, mouse, touchpad and audio go over the RDP connection between the viewer and WSL. The architecture overview has the details.