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.

Comments

Richard Spelling says:

Followed your instructions, very helpful, thanks.

Had to put full (relative) path in to get it to install.

debian4:/home/rlspell/Desktop/install_flash_player_9_linux# nspluginwrapper -v -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
debian4:/home/rlspell/Desktop/install_flash_player_9_linux# nspluginwrapper -v -i ./libflashplayer.so
Install plugin ./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.
debian4:/home/rlspell/Desktop/install_flash_player_9_linux#

Pierre says:

Thank you very much.
I had to use the same trick as Richard about the "full (relative) path"
Now, flash is installed !

Pierre says:

Oh, actually, I think ndiswrapper doesn't understand relative pathes at all.
I've created a special directory to store libflashplayer.so (/usr/lib/mozilla/plugins32/ , idea taken from http://doc.ubuntu-fr.org/nspluginwrapper) and then :
nspluginwrapper -v -i /usr/lib/mozilla/plugins32/libflashplayer.so

Now, flash is installed and work.

Rob Andrews says:

Hi, I'm the Debian nspluginwrapper author.

To report a bug, use the commandline tool 'reportbug', and the bug will be raised in the Debian BTS where it will receive my (relatively!) swift attention.

I'm interested in the npviewer problem you have mentioned. This issue hasn't been raised by anyone else, nor has it affected me, and as you can imagine I crash test the plugin quite a lot. If you are willing to provide a little more debug output for me, I can try and get to the root of the problem. E-mail me if this is okay and I will send you a list of instructions to try and track the problem down.

Kind regards,
rob.

Rob Andrews says:

Oh, furthermore - each package goes into testing after 10 days of being in unstable, so it should be in testing/contrib as well as unstable/contrib!

Adam Trickett says:

I've just installed nspluginwrapper on Lenny. I installed the RealPlayer and Flash plugins to both Iceape and Iceweasel. Both systems report that they have both plugins installed, but only Iceape is able run flash files.

I see that flashplugin-nonfree is now in Lenny proper for AMD so maybe I'll try that to see if it fixes something.

Sheldon Ross says:

Don't know if anyone would still be looking at this, but this is the only reference I can find. I can't get nspluginwrapper to install the veetleplugin. (http://www.veetle.com)

When I try it, I get the no appropriate viewer found error.

"nspluginwrapper -i ./libveetle-player-plugin.so
nspluginwrapper: no appropriate viewer found for ./libveetle-player-plugin.so"

Anyone thoughts?

Maximiliano says:

I've done all about this tutorial, but when I open youtube flash is not there.
The libraries are in their place, added with nspluginwrapper -v -i ./lib..
If some one have any idea, thank's.

Maximiliano says:

This was my solution,

Add to /etc/apt/sources.list

deb http://www.backports.org/debian etch-backports main contrib non-free

Run
#apt-get update
#apt-get -t etch-backports install flashplugin-nonfree

Post a comment











XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

OpenID: If you use OpenID, your comment will be approved automatically and will not be held for moderation.