Fixing fullscreen flash video playback in GNOME 3

Tags: howtos, linux

Published on
« Previous post: Prove, don’t claim — Next post: Visualizing a security disaster, part I »

After making the switch to Ubuntu 13.10 (Saucy Salamander), my friend’s laptop was unable to play flash videos in fullscreen mode with Chromium. Taking a closer look at the problem, it seemed as if the window manager was unable to focus the fullscreen window correctly. Usually, only the first video would play in fullscreen mode.

Scouring the usual places for some answers, we only found the usual “helpful” suggestions, i.e. reinstalling the system, replacing the laptop with a better model, sacrificing a goat to the Gods of Canonical

Luckily, I remembered similar problems a while back, back in the days of yore, when Metacity was still the window manager of (then) GNOME 2: Use the excellent Devil’s Pie to match the flash window and force the window manager to focus it. This resulted in the following configuration, which should be placed as fullscreen_flash.ds in ~/.devilspie:

(if
  (is (application_name) "exe")
    (begin
    (focus)
  )
)

While the syntax looks pretty insane, Devil’s Pie does an admirable job and forces the window manager to behave correctly. Note that if you are using Mozilla Firefox, you should look for plugin-flashcontainer or something similar. xwininfo and related tools are very helpful in this regard.

To end on a more critical note: While it is certainly nice that Linux gives us the tools to deal with its deficiencies (see also the XKCD comic about command line fu), I sometimes feel that GNOME has been steadily going downhill for some years now. At work, every Ubuntu upgrade broke something different in GNOME, finally driving me straight into the arms of KDE (for now). Configurations have become inconsistent and very complex, while the user interface nowadays seems extremely constrained. And for a setup with multiple displays, the “new” desktop environments (I am looking at you, GNOME 3 and Unity) seem very clunky to me. At home, I long ago ditched GNOME for the awesome window manager on my laptop (mostly due to screen space considerations). My friend is also more or less determined to make the switch (possibly to XFCE). Although she generally likes the look and feel of GNOME 3, her foremost wish is a stable and consistent system–and at least at the moment, GNOME 3 is neither.