Firefox on Wayland, can't do mouse click
Hi, I am running Firefox on Fedora 41, my display manager is wayland by default. While using Firefox, sometime, I
can’t do mouse click
on Firefox. This post will help you save 5 minutes.
First of all, the key point here is environment variable MOZ_ENABLE_WAYLAND=1
. We need it before running firefox.
You can test by running this command. If it works, you can read futher, else, stop wasting your time reading my post.
$ export MOZ_ENABLE_WAYLAND=1
$ firefox
I assume that you have play with your firefox smoothly. Now, we will edit .desktop
file. So what is it?
it’s a application shortcut for GNOME. You can find it /usr/share/applications
.
$ ll /usr/share/applications | grep firefox
-rw-r--r--. 1 root root 9.4K Jun 12 11:16 org.mozilla.firefox.desktop
Now, edit /usr/share/applications/org.mozilla.firefox.desktop
, add env MOZ_ENABLE_WAYLAND=1
on Exec=
line.
Remember that there are many places need to update.
Example:
# Before
Exec=firefox %u
# After
Exec=env MOZ_ENABLE_WAYLAND=1 firefox %u
Done, and good luck!
References:
- Enabling Wayland on Linux, https://www.reddit.com/r/firefox/comments/c8itj2/enabling_wayland_on_linux/