Recently I noticed
xdg-open started failing opening links in Firefox. Giving me the following error:
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
It happened while I had Firefox running and responding to everything else. I’m running the latest stable Firefox (74 as I’m writing this) on Wayland. Wayland brings a lot of good things, but also a lot of interoperability problems, so I suspected it had something to do with it. Thanks to Martin Stransky I found out that the solution is to set the
MOZ_DBUS_REMOTE environment variable prior to launching Firefox. If you are using a
desktop file to launch Firefox, you can set the variable in the
Exec line like this:
Exec=env MOZ_DBUS_REMOTE=1 MOZ_ENABLE_WAYLAND=1 /home/guyru/.local/firefox/firefox %u
You will need to restart Firefox before the fix will take affect.