Closed Bug 1508803 Opened 3 years ago Closed 5 months ago
[Wayland] Links in external applications don't open in the existing browser
If I run Nightly with the command "./nightly/firefox-bin", and then click a link in an external application, the link opens correctly in the running instance of Firefox. If I run Nightly with Wayland enabled with the command "env GDK_BACKEND=wayland ./nightly/firefox-bin", then clicking a link in an external application shows me the profile selection window, as if I had just launched Firefox. I'm running Nightly build 20181120100045.
Fwiw, in my case (clicking on a link in Thunderbird) it even ran the updater (because there was a staged Nightly update in my running session) and only afterwards complained that the browser is already running.
You can run the second firefox command (i.e. your other apps that will launch links in Firefox) with GDK_BACKEND=wayland as well. But yeah, this should be fixed, Firefox really should try looking for an existing instance via D-Bus first even without explicit GDK_BACKEND. Or at least try D-Bus after not finding anything via X11.
The builds running under Wayland and X11 are separated - it allows you to use X11 firefox for regular work and Wayland version for debug/testing. Fedora ships firefox-wayland package which provides desktop file and launcher for Firefox on Wayland which can be registered as a default launcher for html links and so on. I don't think we should enable mixing X11/DBus remote - we had that on Fedora before and it brings a lot of confusions as it depends on which version (X11/Wayland) is recently running.
Anyway, the launchers can be extracted from this rpm file: https://kojipkgs.fedoraproject.org//packages/firefox/63.0.3/3.fc28/x86_64/firefox-wayland-63.0.3-3.fc28.x86_64.rpm
(In reply to Martin Stránský [:stransky] from comment #3) > I don't think we should enable mixing X11/DBus remote I agree. > launcher for Firefox on Wayland which can be registered as a default launcher for html links Yes, a custom launcher with GDK_BACKEND=wayland override can be created in ~/.local/share/applications/ and registered using "xdg-settings set default-web-browser custom-launcher.desktop". It would cause the other desktop applications to open the links using the correct version of Firefox. However, even after creating such a launcher and registering it, Firefox would _not_ detect that it is in fact the default browser and it would offer the user to set it as the default browser. If the user agrees, Firefox would create a new launcher with a name similar to "userapp-Nightly-8YETTZ.desktop" and register it. That launcher, however, would use the Firefox executable _directly_, i.e. without the GDK_BACKEND=wayland override. That would result in launching the non-Wayland version of Firefox by other desktop applications by default, which would then cause the behavior mentioned in this issue. I think that one of the ways to resolve this would be to update the process of setting the default browser, so that the created launcher would contain the GDK_BACKEND=wayland override if the Firefox process that creates it also runs on Wayland.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1522780
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago → 5 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.