Mixed X11/Wayland environment is a source of great annoyance when comes to running Firefox on Wayland along other X11 applications, like terminal, mail clients etc. Some X11 applications set
GDK_BACKEND variable to x11 which effectively breaks Wayland applications and causes Firefox to start in X11 mode. That breaks Firefox remote protocol when Firefox searches for running instances and tries to reuse it.
When Firefox instance is already running on Wayland and you launch X11 version you get infamous “Firefox is already running” dialog due to locked Firefox profile.
Firefox 74 ships new MOZ_DBUS_REMOTE env variable and it forces Firefox on X11 to use D-Bus remote protocol as well as Wayland version does. So when X11 Firefox is launched after Wayland one with the same profile, already running Wayland instance is reused to open the link instead of the “Close Firefox” greetings.
All you need is to put this line to your ~/.bashrc file and restart your shell:
export MOZ_DBUS_REMOTE = 1