Setup WSL2 and make it easily accessible from Windows desktop
Project description
linwin
Automated TUI (Text User Interface) to install Ubuntu on Windows 11 via WSL2, with the distro stored on a dedicated SSD drive. Includes WSLg for seamless Linux GUI apps on Windows and xrdp for full XFCE4 desktop access via Remote Desktop.
Prerequisites
- Windows 11 (or Windows 10 build 19044+)
- Hardware virtualization enabled in BIOS/UEFI (Intel VT-x or AMD-V)
- Administrator access on Windows
Quick Start
scripts\setup_wsl.bat
This launches an interactive terminal UI that:
- Auto-detects system hardware (RAM, CPUs, drives) and proposes an optimized configuration
- Scans drives and recommends the best one for WSL storage (NVMe > SSD > HDD)
- Runs startup verification and shows any issues before setup begins
- Lets you review and adjust all settings (distro, resources, packages)
- Enables WSL and Virtual Machine Platform features
- Installs Ubuntu, exports/imports to your chosen drive
- Writes
.wslconfigwith your resource limits - Runs Linux-side setup (systemd, apt packages, snap packages, xrdp)
- Configures xrdp with XFCE4 desktop for Remote Desktop access
- Maintains a WSL keepalive process to prevent VM shutdown between sessions
- Verifies everything with a PASS/FAIL dashboard
The TUI handles admin elevation, the reboot boundary, and cross-WSL Linux setup automatically. After setup, a launcher screen lets you open apps, launch a terminal, or connect via Remote Desktop.
For quick reruns without dependency installation:
run.bat
Linux TUI
A standalone Linux TUI is also available for running inside WSL Ubuntu directly:
pip3 install textual
python3 -m linwin.linux
A headless mode is available for non-interactive automation:
python3 -m linwin.linux --headless --step enable-systemd
python3 -m linwin.linux --headless --step install-packages
Keyboard Shortcuts
| Key | Action |
|---|---|
| 1-9 | Select numbered actions on any screen |
| Escape | Quit app / Cancel current screen |
| Ctrl+Q | Quit app |
| Click | Select action links and options |
Configuration
Edit config.json before running, or use the built-in Configure Settings screen. On first launch, the TUI auto-detects your system profile and proposes sensible defaults:
| Field | Default | Description |
|---|---|---|
distroName |
Ubuntu-22.04 |
Distro to install via wsl --install |
distroImportName |
Ubuntu |
Name after export/import |
wslInstallPath |
auto-detected | Where to store the distro VHD |
wslDriveLetter |
auto-detected | Best available drive (NVMe > SSD > HDD) |
wslconfig.memory |
RAM ÷ 4 | RAM limit for WSL2 (min 4 GB) |
wslconfig.processors |
CPUs ÷ 2 | CPU cores for WSL2 (min 1) |
wslconfig.swap |
RAM ÷ 8 | Swap size (min 4 GB) |
wslconfig.defaultVhdSize |
512GB |
Max VHD size |
snaps |
(empty) | Snap packages to install (configure via editor) |
aptPackages |
nautilus, x11-apps, xfce4, xfce4-terminal, xrdp, dbus-x11 | Apt packages to install |
xrdpPort |
3390 |
Port for xrdp (avoids conflict with Windows RDP on 3389) |
Project Structure
| Path | Description |
|---|---|
run.bat |
Quick launch -- runs the TUI without dependency installation |
scripts/setup_wsl.bat |
Full setup -- installs uv, Python, dependencies, then launches the TUI |
scripts/test.bat |
Run the test suite |
linwin/windows/ |
Windows TUI package -- startup verification, auto-config, setup with live progress |
linwin/linux/ |
Linux TUI package for WSL-side setup (also supports --headless) |
linwin/shared/ |
Shared widgets, config, theme, and subprocess utilities |
tests/ |
pytest test suite (106 tests) |
config.json |
Default configuration |
Setup Phases
Startup: Auto-detects system hardware, runs verification checks, and presents a setup proposal with recommended configuration for user approval.
Phase 1 (Windows): Validates prerequisites, enables WSL and Virtual Machine Platform features, prompts for reboot if needed.
Phase 2 (Windows + Linux): Updates WSL, installs Ubuntu, exports/imports distro to target drive, writes .wslconfig, enables systemd, installs apt and snap packages, configures xrdp with XFCE4 desktop.
Verification: Checks all Windows features, distro registration, WSL version, systemd, packages, WSLg display, xrdp service, and drive mounts.
Detailed Guide
See wsl_ubuntu_gnome.md for the full manual guide with GUI comparison (WSLg vs. external X servers), troubleshooting, security notes, and decision checklist.
Launching Apps
After setup, use the launcher screen to open apps directly, or connect via Remote Desktop:
mstsc /v:127.0.0.1:3390
Individual apps can also be launched from an Ubuntu terminal:
nautilus & # File Manager
Apps appear as native Windows windows via WSLg. A background keepalive process ensures the WSL VM stays running between app launches.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linwin-0.4.0.tar.gz.
File metadata
- Download URL: linwin-0.4.0.tar.gz
- Upload date:
- Size: 919.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c8c72587c3abc26f69a00092ef305934fe99bf008c0564bc3c9181d65bca70
|
|
| MD5 |
b52f73398c57d9c22db554e31da4d253
|
|
| BLAKE2b-256 |
ee3b71bf882dcd2b92c174058bb6cf1074169e97f708d9933f15d3b7ba2b614a
|
File details
Details for the file linwin-0.4.0-py3-none-any.whl.
File metadata
- Download URL: linwin-0.4.0-py3-none-any.whl
- Upload date:
- Size: 890.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba0f5b04a8ed92ac4538215b48b7f686fe48d878fa783c9f088767c45c0cd071
|
|
| MD5 |
1f85088868de71eeb4bd2051e5cd32e7
|
|
| BLAKE2b-256 |
62cb14edecf646f98b3af64a65985189a2c003fd908af3ca07a58e3c6a097bff
|