Many GNU/Linux power users are required to use Microsoft Windows in professional environments, which can be frustrating:
- Windows is sluggish for many operations compared to Linux.
- Frequent restarts can disrupt your workflow and reset your tooling setup.
- Windows enforces a particular workflow, especially regarding window management, with limited customization.
The default Windows window manager uses overlapping windows and a mouse-driven model, a paradigm dating back to the 1970s. While features like window snapping and keyboard shortcuts have been added, customization remains limited. Similar restrictions exist on macOS.
In contrast, GNU/Linux allows users to choose or implement their own window manager, enabling workflows tailored to individual needs. Tiling window managers, for example, automatically organize screen space, reducing manual window management and increasing efficiency—especially for programming and power users.
Background and Problem Description
With the introduction of WSLG, it became possible to run Linux GUI applications directly from WSL (Windows Subsystem for Linux). WSLG provides a seamless way to launch graphical apps, but it is designed for simple windowed applications and does not support custom window managers or full desktop environments.
For example, attempting to start i3 after installing it in WSL results in:
sudo apt-get install i3-wm i3 ERROR: Another window manager is already runningThis is not easily resolved, as the default window manager process cannot be replaced or killed.
Microsoft’s Stance
There are currently no plans to support custom window managers in WSL(G), despite user requests (1, 2). Microsoft has stated:
Hi, there are no immediate plan for this. What functionality are you missing the most in the default Weston window manager?
Alternative Approaches
Several workarounds have been attempted:
- VcXsrv: An X11 server running on Windows, allowing Linux GUI apps to display outside WSL. However, this separates the window manager from the WSL environment, reducing the native feel.
- Xephyr/Xnest: Nested X11 servers running inside a window. This adds another abstraction layer, increasing complexity.
- GlazeWM: A tiling window manager for Windows inspired by i3wm. While promising, it must coexist with the default Windows window manager, which limits its effectiveness and user experience.
A Solution: Using VNC for a Native-Like i3 Experience
A practical solution is to run a VNC server inside WSL, managing an X11 session with i3. TurboVNC is a fast and efficient VNC server. You can then connect to this session from Windows using a VNC client, providing a more native Linux window manager experience within WSL.
Important note: especially i3 users like to bind the Windows key to i3, and this works fine if you switch the TurboVNC client to fullscreen mode first (toggle fullscreen with Ctrl-Alt-Shift-f).
What is X11, VNC, and WSLG?
- X11: The standard windowing system for Linux and UNIX desktops.
- VNC: A protocol for remote desktop access, allowing you to view and interact with a graphical desktop environment.
- WSLG: Windows Subsystem for Linux GUI, enabling Linux GUI apps to run on Windows.
One-time Preparations
Install TurboVNC in both WSL and Windows.
Create ~/.Xsession in WSL. Adjust the keyboard settings to match your language and layout (the example below uses Swedish):
export DISPLAY=:12 # Use display number 12 (port 5912) export DONT_PROMPT_WSL_INSTALL=1 # Fixes for: 1. spurious scroll lock events (affecting Emacs, etc.), 2. activating the tilde key. unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS ## Clean environment export XMODIFIERS="" export GTK_IM_MODULE="" export QT_IM_MODULE="" export INPUT_METHOD="" ## Keyboard setup (adjust -layout se to your own layout) setxkbmap -model pc105 -layout se -variant nodeadkeys xmodmap -e "keycode 78 = " # Disable spurious scroll lock xmodmap -e "keycode 108 = ISO_Level3_Shift" # Fix AltGr xmodmap -e "clear mod5" xmodmap -e "add mod5 = ISO_Level3_Shift" # Start window manager exec i3Disable WSLG to prevent it from hijacking windows. Edit %USERPROFILE%/.wslconfig in Windows:
[wsl2] guiApplications=falseTo apply changes without restarting Windows, run:
Security note: By default, TurboVNC only listens on localhost. Ensure you do not expose the VNC port to untrusted networks.
Launch
Start the VNC-managed X11 server in WSL. Adjust the geometry to your screen resolution:
/opt/TurboVNC/bin/vncserver -depth 16 -fg -geometry 3440x1440 -xstartup ~/.Xsession :12- :12 specifies display number 12 (port 5912).
- Adjust -geometry to match your monitor.
Connect to the VNC server from Windows by starting TurboVNC Viewer and connecting to localhost:5912.
When working in i3, you need to export DISPLAY=:12 before starting a GUI app. You can set this in the appropriate config file too.
Conclusion
This approach provides a flexible, efficient Linux tiling window manager experience within WSL, with minimal overhead and good performance.
.png)

