:::: MENU ::::

Fix Firefox fullscreen video bug on Gnome 3

Does this sound like a familiar scenario?: You’ve found your favourite Seinfeld clip, you’ve waited for it to buffer, you’ve clicked fullscreen mode, swiftly alt-tabbed to check your mail (the thousandth time today), switched back into Firefox, clicked fullscreen again, only to find the comedy genius’ face has vacated your screen, or frozen, glass-eyed and unanimated, as the sound plays on? Seinfeld may be impossible to dislike, but this bug certainly isn’t.

Seinfeld clip on TouTube screenshot

Seinfeld’s “The Deal” in Firefox

To put the problem another way, fullscreen video only works the first time it’s attempted, and thereafter fails to show any images at all.

After what feels like years of suffering from this bug, a newbie Fedora convert last week encouraged me to cure the itch. Here’s how to fix it, adapted from Mozilla’s guide for Ubuntu.

The fix

  1. Press the meta (aka “windows”) key then type terminal.
  2. Open the terminal app, then type or paste:

    sudo gedit /usr/share/applications/firefox.desktop

  3. Enter your password, hit enter.
  4. Scroll to the bottom of the text in the editor that should have opened (that’s Gedit), and look for the line that reads Exec=firefox %u
  5. Replace it with this:

    Exec=env LD_PRELOAD=/usr/lib/libGL.so.1 firefox %u

  6. Then save it (ctrl + s), and close gedit (file menu -> close).
  7. Now restart Firefox and the problem should be solved.

Explanation

What we do here is basically change the command that Linux uses to run Firefox. Instead of running it directly (%u means use the same window if new links are opened, instead of creating new ones), we preload a graphics library first (libGL). That graphics library handles the fullscreen switching properly.

Good luck!


6 Comments

  • Reply unione |

    thanks for the tip. but somehow i get this in journalctl and the problem persists. any idea?
    gnome-session[1656]: ERROR: ld.so: object ‘/usr/lib/libGL.so.1’ from LD_PRELOAD cannot be preloaded: ignored

    • Reply samtuke |

      Interesting. Did you check to see if the library file exists? On my system, running ls -l /usr/lib/libGL.so.1 shows that the path is actually a symlink, pointing to /usr/lib/libGL.so.1.2.0. If you’re missing the file on your system, it’s probably due to your graphics driver, in which case see here for some potential solutions.

      • Reply unione |

        actually no, i didn’t… i thought you said they were needed in case i didn’t have the library in place, which i do. anyway, i’ve read the post and it points to an ubuntu deb package and dpkg commands. how do i translate that to fedora? sorry i didn’t state before: i’m running fedora 20

      • Reply unione |

        further analysis: the post mentioned the [libgl1-mesa-glx_9.1.1-0ubuntu3_i386.deb] package. running `yum provides /usr/lib/libGL.so.1.2.0` shows me that the library came from the [mesa-libGL-9.2.3-1.20131114.fc20.i686] package. aside from version number and distro, are these the same?

So, what do you think ?