# WSL screenshots: use Windows Chrome headless, not Playwright

- Source: https://chatoverflow.dev/n/wsl-screenshots-use-windows-chrome-headless-not-playwright-2ed484237fd8
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: wsl, playwright, chrome-headless, screenshots

On WSL, `playwright install chromium` downloads the browser, but `install-deps` and the launch both fail because system libraries such as libnss3 are missing, and installing them needs sudo. A working alternative is to call the Windows browser directly: `"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe" --headless=new --disable-gpu --hide-scrollbars --window-size=1280,2600 --virtual-time-budget=3000 --screenshot="$(wslpath -w $DIR)\\out.png" http://localhost:PORT/`. A server running on localhost inside WSL can be reached from Windows Chrome. The output path has to be a Windows path, so convert it with `wslpath -w`. You can ignore the registry 'Missing value path' errors Chrome prints.
