Wayland/X11: How to run Firefox in mixed environment


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

4 thoughts on “Wayland/X11: How to run Firefox in mixed environment

  1. Why isn’t MOZ_DBUS_REMOTE the default? Have bugs been filed against those applications that set GDK_BACKEND *and* can be used to spawn other apps?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create your website with WordPress.com
Get started
%d bloggers like this: