One of the disadvantages of being a Debian AMD64 early-adopter is that there is no real 64-bit Flash plugin. To be clear, there's no 64-bit Flash plugin for any platform, so there's no special discrimination against Linux. Nevertheless, it is an annoyance.
I didn't care much about it until quite recently, but I'm rather keen to catch up on the exploits of geriatric1927 on YouTube, and I don't want to have to boot into Windows all the time to do it. So today I decided to see if there was anything to be done about the Flash situation.
I thought I would have to set up a chroot or devise some other means of running a 32-bit browser, but it turns out that this is unnecessary. As so often happens in the open-source world, someone else has already designed a solution: nspluginwrapper. This little package makes it possible for a 64-bit Mozilla browser to use 32-bit plugins. Sweet!
Unfortunately, as so often also happens in open source, I found documentation somewhat lacking. I figured out enough to get where I needed to be, but even HOWTOs tended to say what to do but not why. (When transporting Ubuntu directions to Debian, this is not helpful.) Therefore I am writing up my own instructions, and hopefully this information will be of use to others in the future. I'm by no means an expert, but at least I can share what I did.
Before I get started, let me explain how this software appears to work. There are two pieces, nspluginwrapper and npviewer. The former installs the plugins for use; this is the only utility the user calls directly. npviewer is presumably used by either nspluginwrapper or the browser or both, I think. In any case, it must be in the user's $PATH or else nothing will work.
For Debian, there is a package called nspluginwrapper. (It's only in unstable/contrib, so you'll have to add that to your sources.list if you haven't already. Or else you can download the file and see if you have the dependencies.) So, install the package:
$ sudo aptitude install nspluginwrapper
So far so good. That should be it, right? So let's try installing a plugin. First you'll need to download the Flash player from Adobe's website; make sure you get the tarball option (tar.gz). Follow Adobe's instructions up to unpacking the tarball, but stop there. Instead of using Adobe's installer, use nspluginwrapper to install the plugin. The command is like this:
$ nspluginwrapper -i libflashplayer.so *** NSPlugin Viewer *** ERROR: libflashplayer.so: cannot open shared object file: No such file or directory nspluginwrapper: no appropriate viewer found for libflashplayer.so
Yikes! That's no good. That's not a file-not-found error for the plugin, by the way; that means npviewer can't be found in the user's $PATH. It turns out that the npviewer executable is actually included in the nspluginwrapper package; it just isn't symlinked correctly (as of version 0.9.91.4-3; I reported this as a bug though no bugreport seems to have been opened). So we'll correct this:
$ sudo ln -s /usr/lib/nspluginwrapper/noarch/npviewer /usr/bin/npviewer
Now try again to install the plugin. I recommend installing with sudo or as root, by the way. When I tried as an unprivileged user the plugin was installed, but Iceweasel didn't detect it.
$ sudo nspluginwrapper -v -i libflashplayer.so Install plugin downloads/install_flash_player_9_linux/libflashplayer.so into /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so And create symlink to plugin in /usr/lib/mozilla/plugins: done. And create symlink to plugin in /usr/lib/firefox/plugins: done. And create symlink to plugin in /usr/lib/iceweasel/plugins: done.
Restart your browser, and you should be good to go! Enter about:config
in the location bar to display the plugins you have installed; Shockwave Flash should be front and center.
For instructions on usage of nspluginwrapper, see the nspluginwrapper website. Also see Mozilla Plugin Support on Linux (x86_64).
There, that's all I know! I hope this information is useful to someone else.