Run Playwright on Fedora Linux with all 3 browser engines (Chromium, Firefox, WebKit) — fully working, headless and headed.
Playwright officially supports Debian/Ubuntu only. On Fedora, npx playwright install-deps fails and WebKit crashes due to ABI incompatibilities. This project fixes that.
# One-liner install (wrappers only)
curl -fsSL https://raw.githubusercontent.com/CybLow/playwright-fedora/main/install.sh | bash
# Restart your shell, then run full setup
pw setup
# Verify
pw checkOr manually:
git clone https://github.com/CybLow/playwright-fedora.git
cd playwright-fedora
bash setup.sh # Full setup (system deps + compat libs + browsers + verify)
bash setup.sh --install # Install pw wrapper to your shellNative Fedora support has been submitted upstream: microsoft/playwright#39661. Once merged, npx playwright install-deps and npx playwright install will work natively on Fedora without this project.
Until then, this project provides a standalone solution.
- Installs system dependencies via
dnf(Chromium, Firefox, WebKit runtime libs including mesa-libGLES, mesa-libEGL, libavif, libatomic, gstreamer, etc.) - Downloads Ubuntu 24.04's
libjpeg-turbo8package — Fedora's version exportsLIBJPEG_6.2symbols but Playwright's WebKit needsLIBJPEG_8.0 - Downloads ICU 74 compat libraries from Ubuntu 24.04 — Fedora ships ICU 75-77+ which are not ABI-compatible with Playwright's WebKit (built on Ubuntu 24.04)
- Creates libjxl soversion symlinks — Fedora has
libjxl.so.0.11, Playwright expectslibjxl.so.0.8 - Patches WebKit MiniBrowser wrappers to load compat libraries (the wrappers overwrite
LD_LIBRARY_PATH, ignoring the parent env) - Installs shell wrappers (
pwcommand for fish/bash/zsh)
The compat libraries are installed to ~/.local/lib/playwright-compat/ and do not affect system libraries. No compiler toolchain (cmake, gcc, nasm) is required.
pw test # Run Playwright tests
pw test --browser chromium # Specific browser
pw codegen https://example.com # Code generator
pw screenshot https://example.com /tmp/shot.png
pw pdf https://example.com /tmp/page.pdf
pw ui # Playwright UI mode
pw install # Install/update browsers (auto-patches WebKit)
pw check # Verify all browsers work
pw <anything> # Passes through to npx playwrightImportant: Always use
pw installinstead ofnpx playwright installto ensure WebKit wrappers are automatically patched after browser downloads.
Works with any Node.js package manager:
# npm (default)
npm install -g playwright @playwright/test
# bun
bun install -g playwright @playwright/test
# pnpm
pnpm add -g playwright @playwright/testAfter installing Playwright, always run pw install (not npx playwright install) to auto-patch WebKit.
Playwright ships pre-built browser binaries compiled on Ubuntu 24.04. On Fedora, several libraries are either missing or ABI-incompatible:
WebKit links against libjpeg.so.8 with LIBJPEG_8.0 ELF version symbols (Ubuntu builds libjpeg-turbo with -DWITH_JPEG8=1). Fedora's libjpeg-turbo exports LIBJPEG_6.2 symbols. The soname matches but the version symbol check fails:
/lib64/libjpeg.so.8: version `LIBJPEG_8.0' not found
Fix: Download Ubuntu 24.04's libjpeg-turbo8 package (which provides libjpeg.so.8 with LIBJPEG_8.0 symbols) into ~/.local/lib/playwright-compat/lib64/.
Playwright's WebKit links against ICU 74 (libicudata.so.74, libicui18n.so.74, libicuuc.so.74). Fedora 43 ships ICU 77, which is not ABI-compatible (ICU changes symbol names across major versions like ucnv_open_74).
Fix: Download Ubuntu 24.04's libicu74 package and extract the libraries into ~/.local/lib/playwright-compat/icu/.
Fedora has libjxl.so.0.11, but Playwright expects libjxl.so.0.8.
Fix: Create a symlink from the system library to the expected soname.
Playwright's WebKit MiniBrowser shell wrappers overwrite LD_LIBRARY_PATH entirely with their own lib directories, ignoring any parent environment:
export LD_LIBRARY_PATH="${MYDIR}/lib:${MYDIR}/sys/lib"Fix: Patch these wrappers to prepend the compat lib paths:
export LD_LIBRARY_PATH="${HOME}/.local/lib/playwright-compat/lib64:${HOME}/.local/lib/playwright-compat/icu:${MYDIR}/lib:${MYDIR}/sys/lib"All compat libraries are scoped to the Playwright process tree only — other applications continue using the system libraries.
| Variable | Purpose |
|---|---|
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS |
Set to 1 by pw wrapper to skip Playwright's Ubuntu-only dependency checker |
PLAYWRIGHT_COMPAT_DIR |
Override compat lib location (default: ~/.local/lib/playwright-compat) |
PLAYWRIGHT_BROWSERS_PATH |
Override browser cache location (default: ~/.cache/ms-playwright) |
| Version | Status |
|---|---|
| Fedora 43 | Tested in CI |
| Fedora 42 | Tested in CI |
| Fedora 41 | Tested in CI |
| Fedora 40 | Should work (EOL) |
| Fedora 39 | Should work (EOL) |
docker build -t playwright-fedora .
docker run --rm --shm-size=1g playwright-fedoraThe --shm-size=1g flag is required — Chromium crashes with Docker's default 64MB shared memory.
Use ARG FEDORA_VERSION to test specific versions:
docker build --build-arg FEDORA_VERSION=42 -t playwright-fedora:42 .61 browser API tests across Chromium, Firefox, and WebKit:
- Launch headless / headed
- Navigation, title, content
- JavaScript evaluation
- DOM manipulation (fill, click, type)
- Screenshots (PNG buffer, full page, viewport)
- PDF generation (Chromium)
- Multiple pages / tabs
- Context isolation (cookies)
- Network interception (route + fulfill)
- Dynamic content (waitForSelector)
- Locator API (getByRole, getByText)
- Viewport / device emulation
- Geolocation emulation
- Video recording
- File download handling
- Console message capture
- Request/response events
- Local storage
- iframe handling
- Keyboard input
- Trace recording (Chromium)
- HAR recording (Chromium)
9 CLI tests:
npx playwright --version- Screenshot (chromium, firefox, webkit)
- Screenshot with viewport / full-page
- PDF generation
- Cache clearing
- Install dry-run
MIT