1

I would like to start and use Firefox with the command MOZ_X11_EGL=1 without having to type MOZ_X11_EGL=1 firefox into the terminal each and every time (I use the command in order to enable vaapi video acceleration on X11).

  • How can I edit the existing Firefox shortcut in order to add MOZ_X11_EGL=1 ?
  • How can I create a completely new shortcut with MOZ_X11_EGL=1 ?

OS: Ubuntu 20.10, using the preinstalled Firefox version that shipped with Ubuntu.

3

To edit the existing shortcut, copy the desktop file of Firefox from /usr/share/applications (firefox) to the folder .local/share/applications in the home folder. Edit the Exec= line.

If more users need to be able to use that launcher, place a copy of the .desktop file in a /usr/local/share/applications folder. That will override the copy in /usr/share/applications. You could edit the original launcher directly, but it might be overwritten by a future update.

2
  • Hi, thanks for helping out. I tried adding "MOZ_X11_EGL=1" to the "exec=" line after performing all the necessary steps beforehand, but Firefox still launches normally, without the env MOZ_X11_EGL=1. Could you tell me how exactly the exec line has to look like in order to launch firefox via MOZ_X11_EGL=1 pls? – Oranges86 Nov 13 '20 at 0:29
  • Ok, got it working now. Under "[Desktop Entry]" look for the line "Exec=firefox %u" and replace it with "Exec=env MOZ_X11_EGL=1 firefox %u" (without the quotes ofc). Save the file and launch Firefox normally via the desktop or dash shortcut and voilà - - - Firefox is now using the env MOZ_X11_EGL=1 by default. Thx @vanadium for the help! – Oranges86 Nov 13 '20 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.