Skip to content

Implement Linux WebKitGTK host - #1

Merged
dominicletz merged 4 commits into
masterfrom
cursor/linux-webkitgtk-port-3698
Aug 2, 2026
Merged

Implement Linux WebKitGTK host#1
dominicletz merged 4 commits into
masterfrom
cursor/linux-webkitgtk-port-3698

Conversation

@dominicletz

@dominicletz dominicletz commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the Linux native host for desktop_webview using GTK 4 + WebKitGTK 6, following docs/porting.md and matching the macOS JSON-RPC protocol surface.

Changes

  • native/linux/ — C++ host: argv/--edw-*, ini, TCP listen + listening <port>, length-prefixed JSON-RPC, windows/webview, close veto, menus, tray RPC, libnotify notifications, hybrid permissions, test RPC
  • scripts/build_linux.sh — CMake release build → priv/native/linux/DesktopWebView
  • CI / release — Ubuntu E2E under dbus-run-session + Xvfb with soft-GL WebKit env; draft release artifact DesktopWebView-linux-x86_64
  • E2E — platform-aware asserts; fixture HTML loaded via data: URLs
  • mise.toml — Erlang 26 + Elixir 1.18.4-otp-26
  • WebKit hardening — software rendering defaults; sandbox disabled under --edw-test-rpc; cwd/resources allowlisted before web processes start

Verification

  • CI green: Elixir unit, macOS E2E, Linux E2E
  • Local: dbus-run-session -- xvfb-run -a mix test → 10/10

Notes

  • menu.set_apple is a successful no-op on Linux
  • Tray RPC is in-memory (AppIndicator is GTK 3); visual SNI still TBD
  • OS reopen / open-file desktop integration remains partial
Open in Web Open in Cursor 

cursoragent and others added 4 commits August 2, 2026 05:26
Adds a C++ native host under native/linux with JSON-RPC parity to the macOS
reference, build/CI/release wiring, mise toolchain pin, and platform-aware E2E.

Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Allowlist cwd/resources in the default WebKit context before any web
process starts, force software rendering defaults, drain host stdout from
the launcher, and run Linux CI under dbus-run-session + soft-GL env.

Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Disable the WebKit process sandbox when --edw-test-rpc is set, and load
fixture HTML via data: URLs so E2E does not depend on bubblewrap file maps.

Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
@dominicletz
dominicletz marked this pull request as ready for review August 2, 2026 05:52
@dominicletz
dominicletz merged commit e0d6426 into master Aug 2, 2026
3 checks passed
@dominicletz
dominicletz deleted the cursor/linux-webkitgtk-port-3698 branch August 2, 2026 05:52
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.

2 participants