Table of Contents

NSPluginWrapper Help Center

FIXME The help center is still under construction.

This page is intended to gather various documentation about nspluginwrapper.

The documentation is covered by the Creative Commons Attribution-NonCommercial-ShareAlike 2.0 license. Current authors include: <mail-me for login>.

General Notes

Features

NSPluginWrapper makes it possible to use Netscape 4 (NPAPI) plugins on platforms where they were not built for. Sample use cases include but are not limited to:

Cross-platform support matrix

nspluginwrapper supports native plugins fine but its primary use is to execute plugins that are not of the same architecture and/or operating system than the running browser.

Host Target Version Comments
Linux/x86_64 Linux/i386 0.9.90.1
Linux/ppc Linux/i386 0.9.90.1 Experimental, qemu-i386
FreeBSD/i386 Linux/i386 0.9.91 FreeBSD 6.1, FreeBSD 6.2-RC Linux run-time
NetBSD/i386 Linux/i386 0.9.91 NetBSD 3.1, COMPAT_LINUX
Solaris/x86 Solaris/SPARC 1.1.2 Transitive QuickTransit

Installation

Usage

Configuration program: nspluginwrapper

Emulated environment: QEMU

Compatibility

The following plugins work reasonnably well natively, and at a lesser extent in emulated mode:

Compilation from the sources

Release Notes

Version 1.2.0

Windowless plugins support

Windowless plugins are now supported in Firefox 3. Only Flash Player 10 and a modified DiamondX plugin were tested. There currently is no means to disable windowless plugins at run-time. Though, this can be changed at compile-time through the ALLOW_WINDOWLESS_PLUGINS macro in npw-viewer.c. Also note that, sometimes, popup menus triggered by a right-click won't show up. Likewise, you may also experience a few browser window redraw quirks while navigating through Gtk2 modal dialogs raised by the plugin.

Native plugins support

It is now possible to wrap native plugins with the -n or –native option to the nspluginwrapper configuration utility. This can be useful for safety purposes (the plugin crashes, not the browser) and for security purposes (the plugin accesses only what it is allowed to). Red Hat has been using nspluginwrapper for all architectures for a couple of releases now, along with an SELinux policy. Experienced users could also give alternatives a try, e.g. RSBAC's jail functionality.

Improved security model

The plugins system is now restarted when an error is encountered. This is not fully automatic though. i.e. if a plugin crashed, you have two options to restart it: (i) reload the page, (ii) wait for a refresh requested by the page (through some javascript or whatever triggers an NPP_New() call). You no longer have to restart the browser!

Measures were also taken to not expose extraneous open files descriptors to the plugins. i.e. if a plugin examines the set of open files at its creation, it won't notice anything.

Standalone plugins player

nspluginplayer is a new application that enables you to execute a plugin without a browser. This can be useful for Flash presentation or… simply debugging. The player does not emulate the whole NPAPI but enough is implemented to support Flash Player, Acrobat Reader. Usage is very simple: nspluginwrapper embed-args whereby embed-args are the arguments from an <embed> tag. Here are some examples to demonstrate the program.

Open Solaris support

This is the first version to officially support Open Solaris hosts (2008.xx, in particular). Transitive is also using nspluginwrapper, though an earlier build, to allow Solaris/x86 users to use the Adobe Reader plugin for Solaris/SPARC in their browsers. You can find more information on this (free) application here: QuickTransit® for Solaris™/x86 with Adobe® Reader®

Development history

You can check the following articles if you want to get further details about what happened during the 1.1.x development cycle:

Version 1.0.0

Compilation and configure options

Some –with options were moved to –enable style. In particular, –enable-biarch replaces –with-biarch and –enable-generic replaces –generic-build. Besides, the binaries are no longer stripped by default. Should you wish to strip the installed files, you should configure with the –enable-strip option.

Wrapping root plugins

Previous versions of nspluginwrapper used to incorrectly wrap root plugins system-wide. The fix introduced in this version is very minimalistic and works as follows: any plugin located under ~root will be wrapped into his private plugins directory (~root/.mozilla/plugins). If a wrapped root plugin is found in any system location during upgrade, it will be moved to the ~root private location instead.

WebKit

This release fixes support for WebKit-based browsers. In particular, this should fix WebKit bug #18883 whereby plugins were crashing on exit. However, you will also need a recent enough snapshot of WebKit (>= rev 33570, see WebKit bug #18882).

Acrobat Reader 8

A bug was introduced in version 0.9.91.5 which prevented Acrobat Reader 8 (8.1.2) from working correctly: no keyboard event was propagated to the plugin. This is now fixed.

Flash Player

Version 0.9.91.5

Improved XEMBED support

NSPluginWrapper now has improved support for plugins using the XEMBED protocol. In particular, this addresses both the DiamondX XEmbed example plugin and Flash Player 9 Update 3. Note that Konqueror NPAPI emulation layer still doesn't support the XEMBED protocol, so this only works for Mozilla-based browsers.

Fixed focus problems with Flash Player

Debian bug #435912 is about Flash Player grabbing the keys from other windows even if the Flash Player window lost the fous. The way nspluginwrapper handles input focus has now changed and thus also removing some other (rare?) crashes. However, this curently relies much on XEMBED support. And, since Konqueror doesn't implement it yet, this bug is still available there. I also suspect Flash Player is not totally innocent to this problem.

Run-time detect broken 64-bit Konqueror versions

Support for Konqueror was added in version 0.9.90.4. However, it required an additional patch to get 64-bit Konqueror on-par with NPAPI defined types. Now, nspluginwrapper will try to detect broken 64-bit versions of Konqueror at run-time and should be able to address both cases from a single binary. The heuristics are quite reasonable, please report otherwise.

Support for wrapping 64-bit plugins

Martin Stransky from Red Hat Engineering has added support for 64-bit plugins, among other things to be integrated in a future release. This means you can wrap both i386 and x86_64 plugins into an x86_64 browser. This is so that you can let a crashing plugin die alone without bringing the browser with him into the grave.

Version 0.9.91.4

Anonymous sockets on Linux systems

NSPluginWrapper now use anonymous sockets on Linux systems. This doesn't change the run-time behaviour of NSPluginWrapper. However, if you are a distributor or someone who wants to rebuild the packages himself, you have to know that Linux binaries intended to run on other OS have to be built with the –generic-build option. Otherwise, native Linux builds now use anonymous sockets by default.

Note: packages available on this website still use named sockets so that they can be reused verbatim on *BSD systems.

Version 0.9.91

Scripting support through NPRuntime

Scripting support through the npruntime API is now supported. You can disable npruntime with the NPW_DISABLE_NPRUNTIME environment variable. Please note that Konqueror does not currently support this API. So, this will only work with Mozilla-based browsers.

Flash Player 9

Flash Player 9 beta 1 (9.0.21.55) is not supported. Flash Player 9 beta 2 (9.0.21.78) will work correctly, including with sites using javascript to navigate through other pages. There is a check to prevent the use of FP9 beta 1.

Biarch build

Most of Linux/x86_64 distributions can't build biarch (i.e. 32-bit and 64-bit) packages at once. Henceforth, a subset of LSB Desktop 3.1 is now included so that the 32-bit viewer can be built effortlessly. You only have to make sure that your compiler supports generation of -m32 code.

Cross-platform improvements

NSPluginWrapper now supports FreeBSD and NetBSD hosts. Please read the Platforms Support Matrix and Distribution-specific Notes sections for further details.

Version 0.9.90.4

Konqueror support

Initial support for Konqueror browser is added in this release. However, you need an x86_64 version built with fixed NPAPI headers. The following patch was tested for kdebase 3.4.2 and above.

Flash Player 9 Beta

Flash Player 9 beta for Linux does not work correctly yet. In particular, the plugin will crash on ButtonRelease events (in an XtDispatchEventToWidget callback) when the button represents a link to another page. Independently, Valgrind reports a very high number of use of uninitialised value, conditional jump or move depends on uninitialised value and similar errors. It's not known yet whether this is caused by nspluginwrapper or not.

Distribution-specific Notes

Mandriva Linux

Installation

Compilation from the sources

Debian GNU/Linux

Installation

Fedora

Installation

FreeBSD

Installation

Compilation from the sources

NetBSD

Installation

Compilation from the sources

DragonFlyBSD

Installation

Problems... and solutions!

Flash Player

Sound support

FlashPlayer 9 now uses the ALSA sound system. As such, you will need the Linux/i386 alsa libraries on your system to get sound working. Generally, on decent-enough distributions, the FlashPlayer package has the needed dependency (e.g. libasound.so.2).