Browser plugins

From ArchWiki

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

  • Netscape plugin API (NPAPI): these plugins work in some smaller browsers (Firefox and Chromium no longer support these plugins).
  • Pepper plugin API (PPAPI): these plugins work in some smaller browsers (Chromium no longer supports these plugins).

Flash players

Adobe Flash Player

Warning: Adobe Flash Player support ended on 31 December 2020. As a result, the plugins are no longer supported in recent browsers. Additionally, the project will no longer receive any bug fixes or security updates.[1]

A standalone version can be installed with the flashplayer-standaloneAUR package, which continues to work without a time bomb. For the browsers that still support it, flashpluginAUR (NPAPI) and pepper-flashAUR (PPAPI) provide the last plugin from Adobe but patch it to remove the "kill switch" from it.

Lightspark

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 lightsparkAUR or lightspark-gitAUR package.

Ruffle

This article or section is a candidate for merging with Browser extensions.

Notes: This is confusing to readers, as this page is about plug-ins and while most of the content on our wiki regarding Flash is in this page, this should simply be a link to the proper page. (Discuss in Talk:Browser plugins)

Ruffle is a Flash Player emulator written in Rust. It runs natively as a standalone application, or on modern browsers through the use of WebAssembly. Unlike Flash Player and Lightspark, Ruffle is only available in browsers as an extension, not as a plug-in. While still being under active development, decent ActionScript 1.0/2.0 support is in place and improving; ActionScript 3.0 support is in early stages.

To run natively, Ruffle can be installed with one of the ruffle-gitAUR or ruffle-nightly-binAUR packages. As another option, if you only want to play Flash on the web, it can be installed as a Firefox extension without installing the native packages.

Java (IcedTea)

Note: Both Java plugins are NPAPI-only.

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 [2].

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.

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 of the web engine, e.g. webkit2gtk or qt5-webkitAUR) to see if GStreamer is supported. See GStreamer#Installation for the description of each plugin.

For media formats that are not natively supported by your browser (e.g. most browsers do not play .mkv files), the following plugins are available:

  • VLC Plugin — NPAPI plugin that uses VLC as backend.
https://code.videolan.org/videolan/npapi-vlc || npapi-vlcAUR

MozPlugger

Warning: MozPlugger is not maintained. The final release was in 2014.

MozPlugger is a NPAPI 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.

MozPlugger can be installed with the mozpluggerAUR package.

To modify or add applications to be used by MozPlugger just modify the /etc/mozpluggerrc file. For a more complete list of MozPlugger options see mozplugger(7).

PDF viewers

Find the lines containing pdf in the /etc/mozpluggerrc file and modify the corresponding line after GV() as below:

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

When using Firefox, 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.

Then restart Firefox to use the plugin.

Use LibreOffice instead of OpenOffice

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

/etc/mozpluggerrc
...
### 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:

/etc/mozpluggerrc
...
### 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.

Open cpp files in Kate

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:

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

Use mpv instead of MPlayer

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

/etc/mozpluggerrc
...
### 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])
...