{{ message }}
fix(studio): enable microphone/camera access in Linux WebKitGTK webview - #8720
Merged
shimmyshimmer merged 1 commit intoAug 17, 2026
Merged
Conversation
WebKitGTK ships two defaults that together block voice dictation on Ubuntu/Linux builds: enable-media-stream is off, and the stock permission-request handler denies every request that has no listener override, including UserMediaPermissionRequest. Neither can be fixed from outside the embedding application, so opt in from the Tauri setup hook: enable enable-media-stream on the webview settings and auto-allow only user-media permission requests, leaving every other permission kind on WebKitGTK's default deny.
Contributor
Author
Contributor
Author
|
Update from the issue: the earlier devtools-only report was a stale-build testing artifact, not a real gap. Re-tested with a clean `cargo build --release` (no extra features) — mic works end-to-end, confirmed via the permission-request → UserMediaPermissionRequest → allow flow firing and a successful transcription API call in the running app. `WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1` made no difference, ruling out the sandbox/portal theory I'd raised as a precaution. Full thread: #8678 (comment) This is now field-verified on real hardware (Arch/Garuda, GNOME/Wayland, Intel Arc B580) in addition to the CI build check. |
Member
|
@codex review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes #8678. On Linux, Unsloth Desktop cannot access the microphone for voice dictation: WebKitGTK ships two defaults that together block it, and neither can be worked around from outside the embedding application.
enable-media-streamis off by default onWebKitSettings.permission-requesthandler denies every request that has no listener override, includingUserMediaPermissionRequest.Fix
Added
setup_linux_media_permissions, called from the existing Linux setup path alongsidesetup_custom_titlebar:enable-media-streamon the main window's webview settings.permission-requestsignal and auto-allows onlyUserMediaPermissionRequest(mic/camera). Every other permission kind (notifications, geolocation, etc.) keeps WebKitGTK's default deny.webkit2gtk(the safe bindings crate, distinct from the already-presentwebkit2gtk-sys) is added as a direct Linux dependency, pinned to2.0.2— the exact version already resolved transitively viawry, soCargo.lockonly gains one dependency edge with no version changes.Testing
cargo check/cargo clippy/cargo fmt --checkall pass cleanly on a real Linux build (Debian bookworm, withlibwebkit2gtk-4.1-dev/libgtk-3-devinstalled) — the platform-gated code doesn't compile at all on macOS/Windows hosts, so this was verified in a Linux container rather than locally.Have not been able to test on real hardware with a microphone — happy to have the reporter (or anyone else) confirm the fix once a build is available, per their offer on the issue.