Repository navigation
fix: enable GlobalShortcutsPortalPreferredTrigger by default on Linux - #52221
Merged
Merged
Conversation
2 tasks done
Chromium gates the GlobalShortcuts portal off on GNOME behind this feature, which makes globalShortcut a silent no-op on GNOME Wayland unless apps discover and pass a Chromium feature flag. Enable it by default; GNOME still consent-gates the first bind, and a user-passed --disable-features=GlobalShortcutsPortalPreferredTrigger takes precedence.
VerteDinde
force-pushed
the
enable-global-shortcuts-portal-gnome
branch
from
July 2, 2026 02:19
f9a17d6 to
6b797e2
Compare
deepak1556
approved these changes
Jul 2, 2026
deepak1556
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks for attaching the upstream context.
deepak1556
reviewed
Jul 2, 2026
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #52228 |
claude Bot
pushed a commit
that referenced
this pull request
Aug 17, 2026
- drop CHROME_DESKTOP and systemd scope implementation details - point reverse-DNS naming guidance at the Desktop Entry spec - remove the xdg-desktop-portal dashed-name parsing bug callout - update the GNOME feature flag guidance: portal path is now enabled by default (#52221) - hold off documenting the optimistic register() behavior until the async registration API lands No-Verification-Needed: docs-only change
VerteDinde
added a commit
that referenced
this pull request
Aug 17, 2026
* docs: desktopName is the Linux portal identity; document Wayland shortcut flow desktopName sets CHROME_DESKTOP, which becomes the Wayland app_id / WM_CLASS, the systemd scope name, and the app ID xdg-desktop-portal reports to portal backends. Portals now enforce that identity (GNOME 50 denies GlobalShortcuts binds for invalid IDs), so document the reverse-DNS requirement and the Wayland portal flow for globalShortcut: consent dialog on GNOME, silent binds on KDE, persistence across relaunches, the feature flag currently needed on GNOME, and the optimistic register() return value. * docs: address review feedback - drop CHROME_DESKTOP and systemd scope implementation details - point reverse-DNS naming guidance at the Desktop Entry spec - remove the xdg-desktop-portal dashed-name parsing bug callout - update the GNOME feature flag guidance: portal path is now enabled by default (#52221) - hold off documenting the optimistic register() behavior until the async registration API lands No-Verification-Needed: docs-only change
MarshallOfSound
pushed a commit
that referenced
this pull request
Aug 17, 2026
* docs: desktopName is the Linux portal identity; document Wayland shortcut flow desktopName sets CHROME_DESKTOP, which becomes the Wayland app_id / WM_CLASS, the systemd scope name, and the app ID xdg-desktop-portal reports to portal backends. Portals now enforce that identity (GNOME 50 denies GlobalShortcuts binds for invalid IDs), so document the reverse-DNS requirement and the Wayland portal flow for globalShortcut: consent dialog on GNOME, silent binds on KDE, persistence across relaunches, the feature flag currently needed on GNOME, and the optimistic register() return value. Co-authored-by: Keeley Hammond <[email protected]> * docs: address review feedback - drop CHROME_DESKTOP and systemd scope implementation details - point reverse-DNS naming guidance at the Desktop Entry spec - remove the xdg-desktop-portal dashed-name parsing bug callout - update the GNOME feature flag guidance: portal path is now enabled by default (#52221) - hold off documenting the optimistic register() behavior until the async registration API lands No-Verification-Needed: docs-only change Co-authored-by: VerteDinde <[email protected]> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <[email protected]>
codebytere
pushed a commit
that referenced
this pull request
Aug 17, 2026
* docs: desktopName is the Linux portal identity; document Wayland shortcut flow desktopName sets CHROME_DESKTOP, which becomes the Wayland app_id / WM_CLASS, the systemd scope name, and the app ID xdg-desktop-portal reports to portal backends. Portals now enforce that identity (GNOME 50 denies GlobalShortcuts binds for invalid IDs), so document the reverse-DNS requirement and the Wayland portal flow for globalShortcut: consent dialog on GNOME, silent binds on KDE, persistence across relaunches, the feature flag currently needed on GNOME, and the optimistic register() return value. Co-authored-by: Keeley Hammond <[email protected]> * docs: address review feedback - drop CHROME_DESKTOP and systemd scope implementation details - point reverse-DNS naming guidance at the Desktop Entry spec - remove the xdg-desktop-portal dashed-name parsing bug callout - update the GNOME feature flag guidance: portal path is now enabled by default (#52221) - hold off documenting the optimistic register() behavior until the async registration API lands No-Verification-Needed: docs-only change Co-authored-by: VerteDinde <[email protected]> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <[email protected]>
HowmationFr
added a commit
to HowmationFr/voksa
that referenced
this pull request
Oct 26, 2026
- panic.ts: GNOME Wayland now binds global shortcuts through the xdg GlobalShortcuts portal (electron/electron#52221, new in 45), with a consent dialog the first time. - entitlements: better-sqlite3 is a prebuilt N-API addon now. - smoke: CI runs Node 22, the `ws` fallback is not about Node 20. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Description of Change
Enables
GlobalShortcutsPortalPreferredTriggerby default on Linux, so thatglobalShortcutworks on GNOME Wayland out of the box. Inspired by a conversation with @mitchchn.Chromium gates the GlobalShortcuts portal on GNOME behind
GlobalAcceleratorListener::GetInstanceadded in crrev.com/c/7620219). When the feature is off, everyglobalShortcut.register()call fails silently, from the app's perspective. On GNOME Wayland (the only GNOME session type on Ubuntu 26.04), that meansglobalShortcutis a no-op unless every Electron app author independently discovers a Chromium feature flag.This is a no-op outside GNOME. Verified against a local build on Linux (headless Ozone, private session bus, simulated
XDG_CURRENT_DESKTOP=GNOME):globalShortcut.register()→falseon GNOME with no flags (listener never created).register()→trueon GNOME with no flags; portal session is created.--disable-features=GlobalShortcutsPortalPreferredTrigger:register()→false(user override wins).truebefore and after (unchanged).Checklist
npm testpasses locallyRelease Notes
Notes: Fixed
globalShortcutnot working on GNOME Wayland by enabling Chromium'sGlobalShortcutsPortalPreferredTriggerfeature by default on Linux.