You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Electron propagates GDK_BACKEND=x11 to subprocesses, breaking shell.openExternal with Firefox on Wayland #28436
“Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.”
I bisected this to v12.0.0-beta.20...v12.0.0-beta.21 (9faf235...5dbb635).
The difference between v12.0.0-beta.20’s working invocation of xdg-open and v12.0.0-beta.21’s failing invocation is that the latter has GDK_BACKEND=x11 in the environment. I confirmed that this is responsible for the failure with manual invocations of
xdg-open https://electronjs.org/ # works
env GDK_BACKEND=x11 xdg-open https://electronjs.org/ # fails
I don’t know if Electron or Chromium need to set GDK_BACKEND=x11 for their own purposes, but it definitely should not be propagated to subprocesses such as xdg-open.
Reacted by Adam Harvey, Valentin Hăloiu, Andrii Oriekhov, Vincent Chernin, Malte Ott, Trysten, J-P Nurmi, Magnus Boman, Kristen McWilliam, nfp0 and 5 more
we should remove GDK_BACKEND from the launch options environment
But couldn't that potentially cause problems for users who have explicitly set GDK_BACKEND in their environment, but which was then overwritten by Chromium as mentioned above?
I think ideally Electron should only unset/revert theGDK_BACKEND set by chromium while still keeping the user's original GDK_BACKEND (if set). Maybe something similar to this code block regarding LC_ALL in electron_browser_main_parts.cc.
Full disclosure: I'm not familiar enough with Electron so maybe I'm totally off here in which case feel free to ignore this.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
Activity
Revert GDK_BACKEND to work around Electron shell.openExternal bug.
codebytere commentedon Mar 30, 2021
Looks like this was added by https://chromium-review.googlesource.com/c/chromium/src/+/2586184
cc @ckerr maybe you have thoughts?
deepak1556 commentedon Apr 26, 2021
Since we inherit the parent process environment for the process launch operation https://github.com/electron/electron/blob/master/shell/common/platform_util_linux.cc#L116 , we should remove
GDK_BACKENDfrom the launch options environment, that can affect external app behaviors.vially commentedon Apr 26, 2021
But couldn't that potentially cause problems for users who have explicitly set
GDK_BACKENDin their environment, but which was then overwritten by Chromium as mentioned above?I think ideally Electron should only unset/revert the
GDK_BACKENDset by chromium while still keeping the user's originalGDK_BACKEND(if set). Maybe something similar to this code block regardingLC_ALLin electron_browser_main_parts.cc.Full disclosure: I'm not familiar enough with Electron so maybe I'm totally off here in which case feel free to ignore this.
deepak1556 commentedon Apr 26, 2021
Yup that is correct, I did mean removing the environment set by chromium in the parent process.
jplatte commentedon May 11, 2021
Just ran into this with VSCodium 1.56. Is there a workaround until this is properly fixed?
EDIT: Workaround: Add
/usr/local/bin/xdg-open(assuming/usr/local/binis in yourPATH) withand make it executable (this is assuming you don't sometimes need that value, of course).
fabiscafe commentedon May 11, 2021
@jplatte at least for Firefox itself there is this workaround:
https://wiki.archlinux.org/title/Firefox#Applications_on_Wayland_can_not_launch_Firefox
jplatte commentedon May 11, 2021
Actually I was getting crashes, not the "not responding" error message. But as noted above, I already put in another workaround.
ferdi: 5.6.0-beta.5 -> 5.6.0-beta.6, improve XWayland support
62 remaining items
electron-issue-triage commentedon Mar 13, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
andersk commentedon Mar 13, 2026
bump
damianremington274-blip commentedon Mar 13, 2026
electron-issue-triage commentedon Jun 17, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
andersk commentedon Jun 17, 2026
bump
electron-issue-triage commentedon Sep 17, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
andersk commentedon Sep 17, 2026
bump