Summary
Clicking a link in a session terminal opens it in the browser twice (two tabs) on Linux/Wayland. After a long trace it turns out the app's own openExternal is only one of the two opens — a second opener fires on the same click from outside the app's code paths, and it leaves no process / D-Bus / exec trace. Filing as a data point + to ask whether anyone can reproduce; I couldn't pin the second opener, and the app-side workaround I'm using is environment-specific.
Environment
- Ubuntu, GNOME on Wayland
- Electron 41.0.3, launched
--no-sandbox --disable-features=Vulkan
- Default browser:
google-chrome-stable
- Other apps (non-Electron) open links once; manual
xdg-open <url> and google-chrome-stable <url> from a terminal open one tab.
What the trace showed
- Exactly one
openExternal per click. Logging the open-external IPC shows one [open-external] ipc line per click. Only one xterm link provider fires (OSC 8 linkHandler or WebLinksAddon, not both), so an OSC8/WebLinks "double" is out.
- Stub the app's opener to a no-op → the link STILL opens once. Pointed the opener at a wrapper that logs and opens nothing; one tab still appeared. So a second opener exists that is not: the xterm link handlers,
setWindowOpenHandler/will-navigate, or the window.open shim (all route through the no-op'd openExternal). App opener active → 2 tabs; no-op'd → 1 tab. So: app opener + mystery opener.
- The second opener leaves no trace:
- no new process (tight
/proc poll during the click),
- no session-bus
org.freedesktop.portal.OpenURI / org.freedesktop.Application.Open / Chrome NameOwnerChanged (dbus-monitor --session),
- no
exec of chrome/xdg-open/gio (execsnoop-bpfcc).
So it hands the URL to the already-running browser over a channel that isn't a fresh process or the session bus (Chrome singleton socket / native-messaging / an extension?).
Repro
- Linux/Wayland, Chrome as default browser.
- In a session terminal, click an
http(s) link.
- Two tabs open.
Workaround I'm using (NOT proposed as a fix)
Make the terminal link handlers (linkHandler.activate + WebLinksAddon) not call openExternal for http(s) (keep file://→panel). Yields one tab because my environment already opens the link — but where nothing else opens it, this leaves terminal links not opening at all, so it isn't a general fix.
Ask
- Can anyone reproduce on Linux/Wayland + Chrome?
- Any idea what the second, traceless opener is (a GNOME/Chrome extension, native-messaging host, clipboard manager, Chromium content-layer handoff)? Happy to run more probes.
Summary
Clicking a link in a session terminal opens it in the browser twice (two tabs) on Linux/Wayland. After a long trace it turns out the app's own
openExternalis only one of the two opens — a second opener fires on the same click from outside the app's code paths, and it leaves no process / D-Bus / exec trace. Filing as a data point + to ask whether anyone can reproduce; I couldn't pin the second opener, and the app-side workaround I'm using is environment-specific.Environment
--no-sandbox --disable-features=Vulkangoogle-chrome-stablexdg-open <url>andgoogle-chrome-stable <url>from a terminal open one tab.What the trace showed
openExternalper click. Logging theopen-externalIPC shows one[open-external] ipcline per click. Only one xterm link provider fires (OSC 8linkHandlerorWebLinksAddon, not both), so an OSC8/WebLinks "double" is out.setWindowOpenHandler/will-navigate, or thewindow.openshim (all route through the no-op'dopenExternal). App opener active → 2 tabs; no-op'd → 1 tab. So: app opener + mystery opener./procpoll during the click),org.freedesktop.portal.OpenURI/org.freedesktop.Application.Open/ ChromeNameOwnerChanged(dbus-monitor --session),execofchrome/xdg-open/gio(execsnoop-bpfcc).So it hands the URL to the already-running browser over a channel that isn't a fresh process or the session bus (Chrome singleton socket / native-messaging / an extension?).
Repro
http(s)link.Workaround I'm using (NOT proposed as a fix)
Make the terminal link handlers (
linkHandler.activate+WebLinksAddon) not callopenExternalforhttp(s)(keepfile://→panel). Yields one tab because my environment already opens the link — but where nothing else opens it, this leaves terminal links not opening at all, so it isn't a general fix.Ask