Difference between revisions of "Browser plugins"

From ArchWiki
Jump to navigation Jump to search
(Undo revision 360005 by Jasonvw (talk) - unreadable oneliners don't belong to the wiki, automatic methods are mentioned above)
(→‎Installation: mention freshplayerplugin)
Line 55: Line 55:
{{Note|Some Flash apps may require {{AUR|ttf-ms-fonts}} from the [[AUR]] in order to properly render text.}}
{{Note|Some Flash apps may require {{AUR|ttf-ms-fonts}} from the [[AUR]] in order to properly render text.}}
{{Note|{{AUR|freshplayerplugin-git}} from the [[AUR]] provides an ''experimental'' adapter to use {{AUR|chromium-pepper-flash}} with NPAPI based browsers like Firefox.}}
==== Upgrade ====
==== Upgrade ====

Revision as of 17:04, 11 February 2015

zh-CN:Browser plugins

There are two types of browser plugins, based on the plugin API they use:

  • Netscape plugin API (NPAPI): these plugins work in Firefox and most other browsers (not in Chromium and Opera).
  • Pepper plugin API (PPAPI): these plugins work only in Chromium (and Chrome) and Opera.

Most plugins on this page are NPAPI-only, unless noted otherwise.

Flash Player


Shumway is an HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance. As of 2013-01-01, the plugin may be installed directly from Mozilla's github.io site. According to the Shumway wiki, "Integration with Firefox is a possibility if the experiment proves successful."

Shumway is also embedded in Firefox Nightly/Aurora builds.


See also Wikipedia:Gnash.

GNU Gnash is a free (libre) alternative to Adobe Flash Player. It is available both as a standalone player for desktop computers and embedded devices, as well as a browser plugin, and supports the SWF format up to version 7 (with versions 8 and 9 under development) and about 80% of ActionScript 2.0.

There are multiple packages available in the AUR: gnashAUR, gnash-kde4AUR, gnash-gitAUR.

Note: If you find that Gnash does not work properly right out of the box, then you may also need to install gstreamer0.10-ffmpeg from the official repositories.


Lightspark is another attempt to provide a free alternative to Adobe Flash aimed at supporting newer Flash formats. Lightspark has the ability to fall back on Gnash for old content, which enables users to install both and enjoy wider coverage. Although it is still very much in development, it supports some popular sites.

Lightspark can be installed with the package lightsparkAUR or lightspark-gitAUR, available in the AUR.

Adobe Flash Player


The package you will need to install depends on the browser you use.

  • The NPAPI version can be installed with the flashplugin package from the official repositories. This plugin was discontinued by Adobe and is stuck at version 11.2; although, Adobe will provide security updates for 5 years after its release (i.e. until March 2017[1][2]).
  • The PPAPI version is shipped with Google Chrome. If you are using Chromium or any other browser using the PPAPI interface, see Chromium#Flash Player plugin for more information.
Note: Some Flash apps may require ttf-ms-fontsAUR from the AUR in order to properly render text.
Note: freshplayerplugin-gitAUR from the AUR provides an experimental adapter to use chromium-pepper-flashAUR with NPAPI based browsers like Firefox.


If you are using Firefox, please make sure to follow this instruction first.


To change the preferences (privacy settings, resource usage, etc.) of Flash Player, right click on any embedded Flash content and choose Settings from the menu, or go to the Adobe website. There, a Flash animation will give you access to your local settings.

You can also use the Flash settings file /etc/adobe/mms.cfg.

Warning: Flash hardware acceleration could be still unstable. See [3]

To enable VDPAU, uncomment the following line:


A more detailed example configuration:

AVHardwareDisable = 0
FullScreenDisable = 0
LocalFileReadDisable = 1
FileDownloadDisable = 1
FileUploadDisable = 1
LocalStorageLimit = 1
ThirdPartyStorage = 1
AssetCacheSize = 10
AutoUpdateDisable = 1
LegacyDomainMatching = 0
LocalFileLegacyAction = 0
AllowUserLocalTrust = 0
# DisableSockets = 1 
OverrideGPUValidation = 1
DisableDeviceFontEnumeration = 1 #Prevent sites to identify you by snooping the installed fonts

You can also refer to the mms.cfg from Gentoo, which is extensively commented.

Disable the "Press ESC to exit full screen mode" message

There is no solution other than patching the Flash plugin. Please note only the NPAPI plugin is supported. Install flash-fullscreen-patcherAUR which provides wine as a required dependency since the patch has been initially made for Windows.

After the package has been installed, backup libflashplayer.so:

# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup 

Then, patch libflashplayer.so:

# flash-fullscreen-patcher.sh -f /usr/lib/mozilla/plugins/libflashplayer.so

If you use Firefox and want to remove the message Press ESC to exit full screen mode in HTML5 videos too, go to about:config and set full-screen-api.approval-required to false.

Multiple monitor full-screen fix

When using a multiple monitor setup, or swapping between virtual desktops, it is possible to lose focus on a fullscreen flash window. In such a case, the adobe flash-plugin will automatically exit full-screen mode. This may not be to your liking.

Unfortunately, this behavior is hard coded into the binary. In order to change this behavior it is necessary to alter the binary.

Fixing this issue only works for the NPAPI plugin and this issue can be fixed via 3 ways.

  • Using flash-fullscreen-patcherAUR which providess wine as a required dependency since the patch has been initially made for Windows.
After the package has been installed, backup libflashplayer.so:
# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup
Then, patch libflashplayer.so:
# flash-fullscreen-patcher.sh -i /usr/lib/mozilla/plugins/libflashplayer.so
After the package has been installed, backup libflashplayer.so:
# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup
Then, you will need to alter that file using a hex editor like ghex. You must open it with root privileges obviously.
# ghex /usr/lib/mozilla/plugins/libflashplayer.so
Using the hex editor find the string _NET_ACTIVE_WINDOW. In ghex the readable string is on the right hand side of the window, and the hex is on the left, you are trying to locate the readable string. It should be easy to find using a search function.
Upon finding _NET_ACTIVE_WINDOW rewrite the line, but do not change the length of the line, for example _NET_ACTIVE_WINDOW becomes _XET_ACTIVE_WINDOW.
Save the binary, and restart any processes using the plugin (as this will crash any instance of the plugin in use.)

Fullscreen fix for GNOME 3

If you have problems with Flash's fullscreen-mode (video freezes but audio keeps playing), then it is probably because the fullscreen flash window is displayed behind the browser window. This is a known upstream bug in mutter. You can easily fix this by using devilspie:

Install devilspie from the official repositories.

Create the ~/.devilspie directory:

# mkdir ~/.devilspie

Now you have to create a config file for each browser you use (see below)

Finally, add devilspie to your list of startup items by adding the following file to ~/.config/autostart

[Desktop Entry]
(is (application_name) "plugin-container")
Chrome / Chromium
(is (application_name) "exe")
Epiphany / GNOME Web
(is (application_name) "WebKitPluginProcess")

Video players workarounds

Open-with Firefox extension

  1. Install Open-with add-on.
  2. Open about:openwith, select Add...
  3. In the dialog select a video streaming capable player (e.g. /usr/bin/mpv).
  4. (Optional step) Add needed arguments to the player (e.g. you may want --force-window --ytdl for mpv)
  5. (Optional step) Choose how to display the dialogs using the left panel.
  6. Right click on links or visit pages containing videos. If the site is supported, the player will open as expected.

The same procedure can be used to associate video downloaders such as youtube-dl.

PDF viewer


PDF.js is a PDF renderer created by Mozilla and built using HTML5 technologies.

For Firefox it is available as a plugin, which is included in Firefox since version 19.

For Chromium and Google Chrome there is an experimental extension in the Chrome web store or alternatively it can be built from the source of Pdf.js.

External PDF viewers

To use an external PDF viewer you need #MozPlugger or #kpartsplugin.

If you want to use MozPlugger with Evince, for example, you have to find the lines containing pdf in the /etc/mozpluggerrc file and modify the corresponding line after GV() as below:

repeat noisy swallow(evince) fill: evince "$file"

(replace evince with something else if it is not your viewer of choice).

If this is not enough, you may need to change 2 values in about:config:

  • Change pdfjs.disabled's value to true;
  • Change plugin.disable_full_page_plugin_for_types's value to an empty value.

Restart and it should work like a charm!

Adobe Reader

Note: Adobe Reader for Linux is discontinued[4] and the outdated version that is still available cannot easily run in a 64-bit browser.

Due to licensing restrictions, Adobe Reader is only available in the AUR.

Adobe Acrobat Reader is only available as a 32-bit binary. It can be installed with the acroreadAUR package, available in the AUR. This package installs the Acrobat Reader application as well as the NPAPI plugin.

Also, there are localizations available in many languages.


There is no 64-bit version of Adobe Reader available. To use it in a 64-bit environment, you can:

  • Follow this guide originally posted in the forums. It involves creating a chrooted environment that could be reused for other 32-bit only applications.
  • Install acroreadAUR (with all its 32-bit dependencies) from AUR. Be advised that the Firefox plugin cannot be used directly with this binary -- it will not load in the 64-bit browser. To load it install the nspluginwrapper package from the official [multilib] repository and run:
$ nspluginwrapper -v -a -i

as a normal user. This checks the plugin directory and links the plugins as needed.


See Citrix.

Java (IcedTea)

Note: Both Java plugins are NPAPI-only and thus do not work in Chromium and Opera.

To enable Java support in your browser, you have two options: the open-source OpenJDK (recommended) or Oracle's proprietary version. For details about why OpenJDK is recommended see this.

To use OpenJDK, you have to install the IcedTea browser plugin, icedtea-web.

If you want to use Oracle's JRE, install the jreAUR package, available in the AUR.

See Java#OpenJDK for additional details and references.

Note: If you experience any problems with the Java plugin (e.g. it is not recognized by the browser), you can try this solution.


See Pipelight.

Multimedia playback

Many browsers support the GStreamer framework to play multimedia inside HTML5 <audio> and <video> elements. Check the optional dependencies of the browser package (or webkitgtk/webkitgtk2 if using a webkit-based browser) to see which version of GStreamer is supported: this can be either gst-* for the current version, or gstreamer0.10-* for the legacy version. See GStreamer#Installation for the description of each plugin.

Other plugins

  • Gecko Media Player — Mozilla browser plugin to handle media on websites, using MPlayer.
https://sites.google.com/site/kdekorte2/gecko-mediaplayer || gecko-mediaplayer
  • Totem Plugin — Browser plugin based on the Totem media player for Gnome which uses Gstreamer.
http://projects.gnome.org/totem/ || totem
  • Rosa Media Player Plugin — Qt-based browser plugin also based on MPlayer.
https://abf.rosalinux.ru/uxteam/ROSA_Media_Player || rosa-media-player-pluginAUR
  • VLC Plugin — NPAPI-based plugin that uses VLC technologies.
http://git.videolan.org/?p=npapi-vlc.git;a=summary || npapi-vlc-gitAUR



Hangouts plugin can be installed with the google-talkpluginAUR package. It is messanger by Google, that allows you much more than Skype, for example, it is possible to do some things together: watching youtube, making diagramms, editing documents, playing games and other. It is possible to make video call between 15 humans simultaniously.


MozPlugger can be installed with the mozpluggerAUR package.

MozPlugger is a Mozilla plugin which can show many types of multimedia inside your browser. To accomplish this, it uses external programs such as MPlayer, xine, Evince, OpenOffice, TiMidity, etc. To modify or add applications to be used by MozPlugger just modify the /etc/mozpluggerrc file.

For example, MozPlugger uses OpenOffice by default to open doc files. To change it to use LibreOffice instead, look for the OpenOffice section:

### OpenOffice
define([OO],[swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"
    swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"
    swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])

and add LibreOffice at the beginning of the list:

### LibreOffice/OpenOffice
define([OO],[swallow(VCLSalFrame) fill: libreoffice --nologo --norestore --view $1 "$file"
    swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"
    swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"
    swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])
Note: Be sure to also choose LibreOffice as your preferred application to open doc files.

As another simple example, if you want to open cpp files with your favorite text editor (we will use Kate) to get syntax highlighting, just add a new section to your mozpluggerrc file:

text/x-c++:cpp:C++ Source File
text/x-c++:hpp:C++ Header File
    repeat noisy swallow(kate) fill: kate -b "$file"

To change the default of MPlayer so that mpv is used instead, change the appropriate lines such that:

### MPlayer

#define(MP_CMD,[mplayer -really-quiet -nojoystick -nofs -zoom -vo xv,x11 -ao esd,alsa,oss,arts,null -osdlevel 0 $1 </dev/null])
define(MP_CMD,[mpv -really-quiet $1 </dev/null])

#define(MP_EMBED,[embed noisy ignore_errors: MP_CMD(-xy $width -wid $window $1)])
define(MP_EMBED,[embed noisy ignore_errors: MP_CMD(--autofit=$width -wid $window $1)])

#define(MP_NOEMBED,[noembed noisy ignore_errors maxaspect swallow(MPlayer): MP_CMD($1)])
define(MP_NOEMBED,[noembed noisy ignore_errors maxaspect swallow(mpv): MP_CMD($1)])


#define(MP_AUDIO,[mplayer -quiet -nojoystick $1 </dev/null])
define(MP_AUDIO,[mpv -really-quiet $1 </dev/null])

#define(MP_AUDIO_STREAM,[controls stream noisy ignore_errors: mplayer -quiet -nojoystick $1 "$file" </dev/null])
define(MP_AUDIO_STREAM,[controls stream noisy ignore_errors: mpv -really-quiet $1 "$file" </dev/null])

For a more complete list of MozPlugger options see this page.


The KParts plugin is a plugin that uses KDE's KPart technology to embed different file viewers in the browser, such as Okular (for PDF), Ark (for different archives), Calligra Words (for ODF), etc. It cannot use applications that are not based on the KPart technology.

The KParts plugin can be installed with the package kpartsplugin, available in the official repositories.


Flash Player: no sound

Flash Player outputs its sound only through the default ALSA device, which is number 0. If you have multiple sound devices (a very common example is having a sound card and HDMI output in the video card), then your preferred device may have a different number.

For a list of available devices with their respective numbers, run:

$ aplay -l
 **** List of PLAYBACK Hardware Devices ****
 card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 1: DX [Xonar DX], device 0: Multichannel [Multichannel]
   Subdevices: 0/1
   Subdevice #0: subdevice #0
 card 1: DX [Xonar DX], device 1: Digital [Digital]
   Subdevices: 1/1
   Subdevice #0: subdevice #0

In this case, the HDMI output is card 0 and the sound card is card 1. To make your sound card the default for ALSA, create the file .asoundrc in your home directory, with the following content:

pcm.!default {
    type hw
    card 1
ctl.!default {
    type hw
    card 1

Flash Player: blocking sound for other applications or delayed playback

If sound is delayed within Flash videos or Flash stops sound from any other application, then make sure you do not have snd_pcm_oss module loaded:

$ lsmod | grep snd_pcm_oss

You can unload it:

# rmmod snd_pcm_oss

and restart the browser to see if it helps.

Flash Player: performance

Adobe's Flash plugin has some serious performance issues, especially when CPU frequency scaling is used. There seems to be a policy not to use the whole CPU workload, so the frequency scaling governor does not clock the CPU any higher. To work around this issue, see CPU frequency scaling#Switching threshold

Flash Player: low webcam resolution

If your webcam has low resolution in Flash (the image looks very pixelated) you can try starting your browser with this:

$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so [broswer]

Flash Player: black bars in full screen playback on multi-headed setups

The Flash plugin has a known bug where the full screen mode does not really work when you have a multi-monitor setup. Apparently, it incorrectly determines the full screen resolution, so the full screen Flash Player fills the correct monitor but gets scaled as if the monitor had the resolution of the total display area.

To fix this, you can use the "hack" described here. Simply download the source from the link given on the page, and follow the instructions in the README.

Tip: The hack is available in the AUR and can be installed with the fullscreenhackAUR package.
Note: While the author mentions using NVDIA's TwinView, the hack should work for any multi-monitor setup.

Flash Player: blue tint on videos with NVIDIA

An issue with flashplugin versions and causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. Version 0.5 of libvdpau includes a workaround to fix this, see the official announcement.

Flash Player: leaking overlay with NVIDIA

This bug is due to the incorrect color key being used by the flashplugin version (see this post on the NVIDIA forums) and causes the Flash content to "leak" into other pages or solid black backgrounds. To avoid this issue simply export VDPAU_NVIDIA_NO_OVERLAY=1 within either your shell profile (e.g. ~/.bash_profile or ~/.zprofile) or ~/.xinitrc

Flash Player: videos not working on older systems

If you have Adobe Flash installed on an older system and you start playing a video which simply turns black with nothing happening, it is most likely that your CPU does not support SSE2. You can simply check this by looking at your CPU flags with this command:

$ grep sse2 /proc/cpuinfo

If no results are returned, then you need to install an older version of Flash (for example 10.3, or 11.1). Older versions possibly will have vulnerabilities. You should then consider sandboxing Firefox using sandfoxAUR, available in the AUR. See the sandfox homepage for usage information.

Older versions of Flash are available here: https://www.adobe.com/products/flashplayer/distribution3.html You need to copy libflashplayer.so to the folder /usr/lib/mozilla/plugins/

Older flashplugin packages can be downloaded from the AUR e.g. flashplugin-10AUR.

The most recent package without SSE2 is flashplugin- If you use the packaged version, you have to add IgnorePkg = flashplugin to /etc/pacman.conf.

Plugins are installed but not working

A common problem is that the plugin path is unset. This typically occurs on a new install, when the user has not re-logged in before running Firefox after the installation. Test if the path is unset:


If unset, then either re-login, or source /etc/profile.d/mozilla-common.sh and start Firefox from the same shell:

source /etc/profile.d/mozilla-common.sh && firefox

Gecko Media Player will not play Apple trailers

If Apple Trailers appear to start to play and then fail, try setting the user agent for your browser to:

QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)