nspluginwrapper HOWTO for Debian Sid

Sun, 1 Jul 2007

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.

Being a geek

Fri, 2 Sep 2005

There’s a saying that a sysadmin is someone who will write two hundred lines of code to avoid typing twenty characters. This was not quite true of me today, but it’s close enough.

You see, my father is coming to visit this weekend, and while he’s here he wants to spend a little time writing. His requirements are simple: A word processor and a USB port for his flash drive. No sweat; I have those on my laptop, and I even know I’ve got the kernel modules and software I need (because my camera works, and as far as Linux is concerned a camera is merely a glorified flash drive).

But what if I want to use my computer at the same time? Jeff and I each have a computer, so we’re not used to sharing. Luckily we have a third computer, an old box that was intended as a development system but can be pressed into service. No trouble running X and a light window manager (Openbox is my current favorite), but OpenOffice.org is a bit of a stretch. So I spent a few minutes installing X and a couple of hours figuring out why I couldn’t open remote X apps.

I did get it working, though only if X is started via startx rather than xdm. It was a webpage that gave me the crucial information yesterday, and it mentioned at least two configuration files to change (/etc/X11/xinit/xserverrc and another for /etc/X11/xdm/Xservers), but I can’t find it again to see if there’s anything I missed.

Situations like this are why I feel I both am and am not a geek. On the one hand I administer my own Debian system, compile kernels, and custom-compile packages. Yesterday I hacked a WordPress plugin (WP-DB Backup) and one of the core WordPress files and created patch files so that my changes would be more easily re-integrated into new versions. At the same time, it can take me ages to figure out something that should be easy.

Jeff thinks I’m a geek, and he loves it. Apparently he’s not alone in thinking female geeks are very attractive.