2012-03-30

Adobe Flash in Ubuntu - 2012 edition

Now, I don't use Ubuntu very much. I have too many bad experiences with upgrades, and I've come to loathe apt-get. Still, there are a growing number of machines in my extended family which now run Ubuntu, either because I use them occasionally myself, or because it's easier to maintain at a distance than Windows (and harder to completely break through casual web-browsing!)

What I'm finding though, is that an average daily update of an Ubuntu machine is distressingly likely to break my (non-technical) users' ability to browse the web. I use Gentoo, and so I'm used to having to do a bit of work myself for major upgrades, but Ubuntu promises more than that -- it promises to bring Linux within the grasp of the average user -- and it fails. And where if fails is usually related to the deliberate separation of packages between those which agree with hardcore Free Software ideology, and those which don't. Canonical are forced to supply some "non-free" software, just to supply an environment which can support the "non-free" internet.

Coupled with this is apt's tendency to "update" config files without user input, something which is anathema to someone used to portage. If it always worked, then that would be fine ... but nothing is that reliable.

Case-in-point is the wrestling I had to do today to get a working version of the Adobe Flash plugin onto K's laptop. Some weeks ago, websites began reporting that the installed flash version was out of date, and linking on to the Adobe site for a manual installer. I checked with apt, and it reported that adobe-flashplugin was indeed at the latest version. The library was sitting at /usr/lib/adobe-flashplugin/libflashplayer.so, and had been replaced relatively recently. Some locate-use later, I was relatively reassured that the manual installer hadn't been run at some point, and that there wasn't some other version of libflashplayer.so sitting around somewhere in a linux-version of dll-hell.

So what was happening? I ran firefox through strace, to make sure that it was loading the library, and lo and behold, it was using files in /etc/alternatives instead.

$ strace -s trace=file firefox &> log &
$ grep -i flash log 

After some man-page and googling, I found this extremely unhelpful SuperUser question, and some indications that I wasn't alone.

So now, armed with the update-alternatives command, with it's completely unhelpful -h output, I eventually got a list of the flash-related "alternatives" which the system was using.

$ update-alternatives --get-selections | grep -i flash 

That got me a list of 5 "alternatives", and one immediately caught my eye -- libgnashplayer.so. I've no idea when, but at some point the machine had been instructed to switch it's flash player from Adobe's to the GNU replacement... only it's value as a drop-in replacement is questionable at best. I've a long history with flash-on-linux (strange as it sounds, it's gotten better and better), and I'd love a working open-source implementation. But gnash just isn't there yet. In my case, the main website that K was using was Channel 4's streaming service, 4od.co.uk, which wasn't even attempting to stream video, but failing on a version-number check. More on that later.

So armed with this info, I gleefully uninstalled gnash, expecting apt- to work its magic. Nope, it turns out, it just left a broken symlink in /etc/alternatives. Ubuntu whim has renamed the package for flash any number of times, and guides were recommending:
  • flashplugin-nonfree (seems to have gone out of favour, except that flashplugin-nonfree-extrasound is still around)
  • flashplugin-installer (quite why this name, I've no idea
  • adobe-flashplugin (Probably today's nom-de-jour)

Installing flashplugin-installer ended up removing about 5 flash-related packages, and installed the same version of the flash library as adobe-flashplugin. In the end, I removed that again, and stuck with adobe-flashplugin. Quite what their naming scheme is is beyond me, but preserving both in the repository doesn't make much sense to me. Oh, and you might notice that the documentation relating to all of this is completely out of date.

Another check of update-alternatives showed only adobe libraries, and a check of 4od (thankfully) played some video. So until the next time gnash gets pulled in, and overwrites all my settings, everything's working. Fantastic. Now time to file a bug suggesting that gnash always present it's version as whatever the latest version of adobe flash happens to be.

No comments:

Post a Comment