Skip to content

Conversation

@Seismix
Copy link

@Seismix Seismix commented Jan 27, 2026

Overview

This PR adds support for launching browsers in WSL environments with GUI capabilities (e.g. WSLg).

Changes:

  • Updated WSL runner logic to detect GUI availability and use native browser launching when available
  • Added browser installation checks with helpful error messages when browsers are not found
  • Added tests for WSL scenarios:
    • X11 and Wayland environments
    • WSL without GUI (shows manual install warning)
    • Non-WSL environments (no behavior change)
    • Missing browser installations (helpful error messages)

Manual Testing

Prerequisites:

  • WSL2 with GUI support (WSLg on Windows 11, or X11/Wayland server with DISPLAY/WAYLAND_DISPLAY set)
  • Firefox or Chrome installed in WSL

Test steps:

  1. Follow the setup instructions in CONTRIBUTING.md
  2. Start the demo extension: cd packages/wxt-demo && pnpm dev:firefox (or pnpm dev for Chrome)
  3. Verify browser opens automatically with extension loaded

Expected results:

  • Browser should open automatically in WSL with GUI
  • Extension should load correctly
  • No "Cannot open browser" warnings

Related Issue

This PR closes #1931

@netlify
Copy link

netlify bot commented Jan 27, 2026

Deploy Preview for creative-fairy-df92c4 failed.

Name Link
🔨 Latest commit 038015e
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6978ac2ccd9f800008fd4c8c

The lockfile accidentally bumped tsdown from 0.18.1 to 0.18.4, which
doesn't properly transpile the `using` keyword, causing build failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WSL runner should check DISPLAY env var before refusing to open browser (WSLg support)

1 participant