Difference between revisions of "Browser plugins"

From ArchWiki
Jump to: navigation, search
(rm gap)
(Multimedia playback: clarify)
 
(304 intermediate revisions by 85 users not shown)
Line 1: Line 1:
 +
[[Category:Web browser]]
 
[[de:Browser Plugins]]
 
[[de:Browser Plugins]]
[[es:Browser Plugins]]
+
[[es:Browser plugins]]
 
[[fr:Plugins navigateur]]
 
[[fr:Plugins navigateur]]
[[tr:Web tarayıcı eklentileri]]
+
[[ja:ブラウザプラグイン]]
[[zh-CN:Browser Plugins]]
+
[[ru:Browser plugins]]
[[Category:Web Browser]]
+
[[zh-hans:Browser plugins]]
These plugins work in [[Firefox]], [[Opera]] and WebKit derivatives. <!-- Chrome? -->
+
{{Related articles start}}
 +
{{Related|Opera}}
 +
{{Related|Firefox}}
 +
{{Related|Chromium}}
 +
{{Related articles end}}
  
==Flash Player==
+
There are two types of browser plugins, based on the plugin API they
 +
use:
 +
*Netscape plugin API (NPAPI): these plugins work in most smaller browsers ([[Firefox#Plugins|Firefox supports only the Flash Player plugin]], Chromium and Opera do '''not''' support these plugins).
 +
*Pepper plugin API (PPAPI): these plugins work in [[Chromium]] (and Chrome), [[Opera]] and [[Vivaldi]].
  
===Gnash===
+
Most plugins on this page are NPAPI-only, unless noted otherwise.
GNU Gnash is the free (libre) alternative to Adobe Flash Player. Gnash is available both as a standalone player for desktop computers and embedded devices, as well as a plugin for several browsers. You can install its package from the community repository: {{Pkg|gnash-gtk}}
 
  
===Adobe Flash Player===
+
== Flash Player ==
  
Flash Player is in the [[Official Repositories|official repositories]] for both i686 and x86_64 architectures: {{Pkg|flashplugin}}
+
=== Adobe Flash Player ===
  
====Epiphany====
+
==== Installation ====
Note that for {{Pkg|Epiphany}}, you have to wrap Adobe Flash Player in the same fashion as described for x86_64. See [[Epiphany#Flash]] for more details.
 
  
====Misc====
+
The package you will need to install depends on the browser you use.
In addition, it may be needed to install {{AUR|ttf-ms-fonts}} from the [[AUR]] in order to properly render text.
 
  
====Configuration====
+
* The NPAPI version can be [[install]]ed with the {{Pkg|flashplugin}} package.
<!-- Change this heading to Flash configuration once more than one plugin needs a similar section -->
+
* The PPAPI version can be [[install]]ed with the {{Pkg|pepper-flash}} package.
To change general plug-in preferences (privacy settings, resource usage, etc.), right click on embedded Flash content and choose preferences from the menu, or go to the [http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager.html Macromedia website]. There, a Flash animation will give access to local settings.
 
  
You can make your own settings file for Flash, just use the file {{ic|/etc/adobe/mms.cfg}}. Example config below:
+
{{Note|
  # Adobe player settings
+
* Some Flash apps may require the {{AUR|ttf-ms-fonts}} package in order to properly render text.
  AVHardwareDisable = 0
+
* The {{AUR|freshplayerplugin}} package provides an ''experimental'' adapter to use {{Pkg|pepper-flash}} with NPAPI based browsers like Firefox. It can be configured (e.g. for enabling HW-acceleration) by copying {{ic|/usr/share/freshplayerplugin/freshwrapper.conf.example}} to {{ic|~/.config/freshwrapper.conf}}.
  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
 
  
You can also refer to the [http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/files/mms.cfg mms.cfg from Gentoo], which is extensively commented.
+
==== Upgrade ====
  
====Disable "Press ESC to exit full screen mode" message====
+
If you are using [[Firefox]], please make sure to follow [[Firefox#Firefox detects the wrong version of my plugin|this instruction first]].
[http://ubuntuforums.org/showthread.php?t=1839293 This topic] at ubuntuforums.org describes a way to disable that message.
 
  
Backup "libflashplayer.so" in case something messes up.
+
==== Configuration ====
  # cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup
 
  
Make a copy to your home directory
+
To change the preferences (privacy settings, resource usage, etc.) of Flash Player, right click on any embedded Flash content (for instance [https://helpx.adobe.com/flash-player.html adobe's flash home]) and choose ''Settings'' from the menu.
  # cp /usr/lib/mozilla/plugins/libflashplayer.so ~/
 
  
Make sure wine is installed. If not, execute the following command
+
You can also use the Flash settings file {{ic|/etc/adobe/mms.cfg}}. Gentoo has an extensively commented [http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/files/mms.cfg example mms.cfg].
  # pacman -S wine
 
  
Download "Flash Fullscreen Patcher.zip" from [http://forum.videohelp.com/threads/304807-How-to-remove-annoying-Press-Esc-to-message-in-Flash-Video this page], extract and execute with wine.
+
To enable video decoding with [[hardware video acceleration]], add/uncomment the following line:
 +
EnableLinuxHWVideoDecode = 1
 +
It might also be required to add/uncomment the following line:
 +
OverrideGPUValidation = 1
  
  $ wget http://forum.videohelp.com/attachments/9255-1319291919/Flash%20Fullscreen%20Patcher.zip
+
==== Multiple monitor full-screen fix ====
  $ unzip Flash\ Fullscreen\ Patcher.zip
 
  $ wine Flash\ Fullscreen\ Patcher.exe
 
  
Patch "libflashplayer.so" in your home dir using the GUI.
+
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.
Copy the patched lib back to the plugins directory
 
  # cp ~/libflashplayer.so /usr/lib/mozilla/plugins/
 
  
==PDF viewer==
+
Unfortunately, this behavior is hard coded into the binary. In order to change this behavior it is necessary to alter the binary.
  
===Evince===
+
Fixing this issue only works for the NPAPI plugin and this issue can be fixed via 2 ways.
If you want to view PDF files in [[Firefox]] without opening a new window, follow this guide: https://wiki.archlinux.org/index.php/Firefox_Tips_and_Tweaks#Viewing_PDF.2FPS_inside_Firefox
 
  
===Adobe Reader===
+
* Using the {{AUR|flashplugin-focusfix}}.
Due to licensing restrictions, Adobe Reader cannot be distributed from any of the official Arch Linux repositories. There are versions available in the [[AUR]]. Please note that no matter how many votes it receives, Adobe Reader will never be included in the [[Official Repositories|official repositories]]. See this [https://aur.archlinux.org/packages.php?ID=16980 comment] for an explanation.
 
  
Also, there are [https://aur.archlinux.org/packages.php?O=0&K=acroread-&do_Search=Go localizations] available in many languages.
+
* [http://www.webupd8.org/2012/10/ubuntu-multi-monitor-tweaks-full-screen.html Patching manually]:
  
====32-bit====
+
:After the package has been installed, backup {{ic|libflashplayer.so}}:
32-bit AUR package: {{AUR|acroread}}
+
:{{bc|# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup}}
  
It installs the Acrobat Reader application as well as the Firefox plugin. Note that hardware-assisted rendering is unavailable under Linux (at least using a Geforce 8600GTS with driver version 185.18.14).
+
:Then, you will need to alter that file using a hex editor like {{Pkg|ghex}}. You must open it with root privileges obviously.
 +
:{{bc|# ghex /usr/lib/mozilla/plugins/libflashplayer.so}}
  
====64-bit====
+
:Using the hex editor find the string {{ic|_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.
Adobe Reader is a closed-source application, meaning that users desiring a 64-bit binary have no other choice other than to wait for official support. Workarounds to be considered:
 
  
* Follow [[Install bundled 32-bit system in Arch64|this guide]] originally posted in the forums. It involves creating a chrooted environment that could be reused for other 32-bit only applications.
+
:Upon finding {{ic|_NET_ACTIVE_WINDOW}} rewrite the line, but '''do not''' change the length of the line, for example {{ic|_NET_ACTIVE_WINDOW}} becomes {{ic|_XET_ACTIVE_WINDOW}}.
  
* Or, simply get the 32-bit binary along with the 32-bit dependencies. Install {{AUR|bin32-acroread}}. Also, consider installing the extra font packages suggested by the package. Be advised that the [[Firefox]] plugin cannot be used ''directly'' with this binary -- it will not load in the 64-bit browser. {{AUR|nspluginwrapper-flash}} is required to load the plugin. Finally, be sure to run:
+
:Save the binary, and restart any processes using the plugin (as this will crash any instance of the plugin in use.)
$ nspluginwrapper -v -a -i
 
as a '''normal user'''. This checks the plugin directory and links the plugins as needed. Everything should work as expected now.
 
  
{{Note|There seems to also be a {{Pkg|nspluginwrapper}} in the [[Official Repositories|official repositories]] which may be the new way to go.}}
+
==== Playing DRM-protected content ====
  
==Citrix==
+
See [[Flash DRM content]].
See: [[Citrix]]
+
 
 +
=== Shumway ===
 +
 
 +
[http://mozilla.github.io/shumway/ Shumway] is a [https://github.com/mozilla/shumway/issues/2420 discontinued] HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance. The plugin may be installed directly from [http://mozilla.github.io/shumway/ Mozilla's github.io site].
 +
 
 +
=== Gnash ===
 +
 
 +
[[Wikipedia:Gnash (software)|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 is a packages available: {{AUR|gnash-git}}.
 +
 
 +
=== Lightspark ===
 +
 
 +
[http://lightspark.github.com/ 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 [https://github.com/lightspark/lightspark/wiki/Site-Support popular sites].
 +
 
 +
Lightspark can be [[install]]ed with the {{AUR|lightspark-git}} package.
 +
 
 +
== PDF viewer ==
 +
 
 +
=== PDF.js ===
 +
 
 +
[https://github.com/mozilla/pdf.js PDF.js] is a PDF renderer created by Mozilla and built using HTML5 technologies.
 +
 
 +
It is included in [[Firefox]].
 +
 
 +
For [[Chromium]] and Google Chrome it is available as extension in the [https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm Chrome Web Store].
 +
 
 +
=== External PDF viewers ===
 +
 
 +
To use an external PDF viewer you need [[#MozPlugger]].
 +
 
 +
If you want to use MozPlugger with Evince, for example, you have to find the lines containing {{ic|pdf}} in the {{ic|/etc/mozpluggerrc}} file and modify the corresponding line after {{ic|GV()}} as below:
 +
repeat noisy swallow(evince) fill: evince "$file"
 +
(replace {{ic|evince}} with something else if it is not your viewer of choice).
 +
 
 +
When using Firefox, you may need to change 2 values in {{ic|about:config}}:
 +
* Change {{ic|pdfjs.disabled}}'s value to ''true'';
 +
* Change {{ic|plugin.disable_full_page_plugin_for_types}}'s value to an empty value.
 +
 
 +
Restart and it should work like a charm!
 +
 
 +
== UnionPay Online Pay ==
 +
 
 +
{{Note|This plugin is NPAPI-only and thus does '''not work''' in Chromium, Opera and Firefox.}}
 +
 
 +
[[Install]] {{AUR|upeditor}} package for the "security plugin" used by UnionPay Online Pay (银联在线支付).
 +
 
 +
== Citrix ==
 +
 
 +
See [[Citrix]].
  
 
== Java (IcedTea) ==
 
== Java (IcedTea) ==
Provided by {{Pkg|icedtea-web-java7}} from the [[Official Repositories|official repositories]], it also needs [[Java]] installed.
 
  
{{Note|If you experience any problems with the Java plug-in, you can try the [[Flash#Plugins_are_installed_but_not_working|solution]], suggested for the Firefox Flash plug-in. You can also try using non-free version, bundled with Oracle JRE.}}
+
{{Note|Both Java plugins are NPAPI-only and thus do '''not work''' in Chromium, Opera and Firefox.}}
 +
 
 +
To enable [[Java]] support in your browser, you have two options: the open-source [[Wikipedia:OpenJDK|OpenJDK]] (recommended) or Oracle's proprietary version. For details about why OpenJDK is recommended see [https://mailman.archlinux.org/pipermail/arch-general/2011-August/021671.html].
 +
 
 +
To use OpenJDK, you have to install the [http://icedtea.classpath.org/wiki/Main_Page IcedTea] browser plugin, {{Pkg|icedtea-web}}.
  
=== Weird symlink ===
+
If you want to use Oracle's JRE, install the {{AUR|jre}} package.
{{Note|The section below is likely outdated.}}
 
But if you want to, since {{Pkg|firefox}} v3.6 does not seem to look in {{ic|/usr/lib/mozilla/plugins}}, which is the default location where {{AUR|jre}} v1.6.0_22 places the Java plugin, just
 
# ln -s /opt/java/jre/lib/i386/libnpjp2.so ~/mozilla/plugins/libnpjp2.so
 
and it is safe to
 
# rm -R /usr/lib/mozilla
 
unless you use it for something else! Be careful here.
 
  
==Video Plugins==
+
== Pipelight ==
  
===Gecko Media Player===
+
See [[Pipelight]].
A good replacement of the now obsolete mplayer-plugin is [http://code.google.com/p/gecko-mediaplayer/ Gecko Media Player] packaged as {{Pkg|gecko-mediaplayer}}. More stable combined with MPlayer 1.0RC2. (No more crashes with Apple Trailers.)
 
  
===Totem Plugin===
+
== Multimedia playback ==
The {{Pkg|totem-plugin}} might be the right choice for those seeking a [[GStreamer]]-based plugin.
 
  
===Rosa Media Player Plugin===
+
Many browsers support the [[GStreamer]] framework to play multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. Check the optional dependencies of the browser package (or of the web engine, e.g. {{Pkg|webkit2gtk}} or {{Pkg|qt5-webkit}}) to see if GStreamer is supported. See [[GStreamer#Installation]] for the description of each plugin.
The {{AUR|rosa-media-player-plugin}} might be the right choice for those seeking a [[MPlayer]]-based plugin written in QT (install it through the [[AUR]]).
 
  
===VLC Plugin===
+
For media formats that are not natively supported by your browser (e.g. most browsers don't play {{ic|.mkv}} files), the following plugins are available:
{{AUR|npapi-vlc-git}} is the modern VLC Mozilla plugin based on libVLC.
 
  
==Other==
+
* {{App|Rosa Media Player Plugin|Qt-based NPAPI plugin that uses MPlayer as backend.|https://abf.rosalinux.ru/uxteam/ROSA_Media_Player|{{AUR|rosa-media-player-plugin}}}}
 +
* {{App|VLC Plugin|NPAPI plugin that uses VLC as backend.|https://code.videolan.org/videolan/npapi-vlc|{{AUR|npapi-vlc}}}}
  
===Mozplugger===
+
== Google Hangouts ==
{{Stub}}
+
{{Note|This plugin is not required when using Chromium or Firefox}}
Install {{AUR|mozplugger}} through the [[AUR]].
 
  
==Troubleshooting==
+
Hangouts plugin can be installed with the {{AUR|google-talkplugin}} package.
 +
Hangouts is a messenger by Google, that allows you to make video call between 15 people simultaneously, or share your screen with others.
  
=== Bad (choppy) sound on 64bit flashplugin ===
+
== MozPlugger ==
There is a problem with flashplugin 11 64bit and a new memcpy routine in glibc, which makes the sound choppy on mp3 streams (more info here: [http://forums.fedoraforum.org/showthread.php?t=258346]. Current workarounds are either replacing the memcopy routine like suggested in the mentioned thread or using {{AUR|flashplugin-square}} from the AUR.
 
  
===Flash blocks sound and/or delayed playback===
+
MozPlugger can be installed with the {{AUR|mozplugger}} package.
If sound is delayed within flash video and/or if Flash stops sound from any other application, then make sure you do not have {{ic|snd_pcm_oss}} module loaded:
+
 
$ lsmod | grep snd_pcm_oss
+
[http://mozplugger.mozdev.org/ 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 {{ic|/etc/mozpluggerrc}} file.
You can unload it
+
 
# rmmod snd_pcm_oss
+
For example, MozPlugger uses OpenOffice by default to open {{ic|doc}} files. To change it to use LibreOffice instead, look for the OpenOffice section:
and restart the browser to see if it helps.
+
{{hc|/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:
 +
{{hc|/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 {{ic|doc}} files.}}
 +
 
 +
As another simple example, if you want to open {{ic|cpp}} files with your favorite text editor (we will use Kate) to get syntax highlighting, just add a new section to your {{ic|mozpluggerrc}} file:
 +
{{hc|/etc/mozpluggerrc|
 +
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:
 +
{{hc|1=/etc/mozpluggerrc|2=
 +
...
 +
### 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 {{man|7|mozplugger|url=https://www.freebsd.org/cgi/man.cgi?query=mozplugger}}.
 +
 
 +
== Troubleshooting ==
 +
 
 +
=== 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.
  
===No sound in Flash===
+
For a list of available devices with their respective numbers, run:
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 video card), then your preferred device may have a different number.
+
{{hc|$ aplay -l|
For example:
 
$ aplay -l
 
 
  **** List of PLAYBACK Hardware Devices ****
 
  **** List of PLAYBACK Hardware Devices ****
 
  card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
 
  card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Line 155: Line 235:
 
   Subdevices: 1/1
 
   Subdevices: 1/1
 
   Subdevice #0: subdevice #0
 
   Subdevice #0: subdevice #0
In this case, HDMI output is "card 0" and sound card is "card 1". To make it default for ALSA, create a file named {{ic|~/.asoundrc}} with the following content:
+
}}
pcm.!default {
+
In this case, the HDMI output is {{ic|card 0}} and the sound card is {{ic|card 1}}. To make your sound card the default for ALSA, create the file {{ic|.asoundrc}} in your home directory, with the following content:
type hw
+
{{hc|~/.asoundrc|
card 1
+
pcm.!default {
}
+
    type hw
 +
    card 1
 +
}
 
   
 
   
ctl.!default {
+
ctl.!default {
type hw
+
    type hw
card 1
+
    card 1
}
+
}
 +
}}
  
===Flash performance===
+
=== Flash Player: blocking sound for other applications or delayed playback ===
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: [[cpufrequtils#Changing the ondemand governor's threshold]]
 
  
===Plugins are installed but not working===
+
If sound is delayed within Flash videos or Flash stops sound from any other application, then make sure you do not have {{ic|snd_pcm_oss}} module loaded:
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:
+
$ lsmod | grep snd_pcm_oss
echo $MOZ_PLUGIN_PATH
+
You can unload it:
If unset, then either re-login, or source {{ic|/etc/profile.d/mozilla-common.sh}} and start Firefox from the same shell:
+
  # rmmod snd_pcm_oss
  . /etc/profile.d/mozilla-common.sh && firefox
+
and restart the browser to see if it helps.
  
===Gecko Media Player will not play Apple trailers===
+
=== Flash Player: performance ===
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)
 
  
===Low webcam resolution in Flash===
+
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]]
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 chromium
 
  
===Black bars in fullscreen video playback on multiheaded desktops===
+
=== 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 fullscreen resolution, so the video fill the correct monitor but gets scaled as if the monitor had the resolution of the total display area.
+
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 [http://al.robotfuzz.com/content/workaround-fullscreen-flash-linux-multiheaded-desktops here]. Simply download the file linked and follow instructions from the README.
+
To fix this, you can use the "hack" described [http://al.robotfuzz.com/content/workaround-fullscreen-flash-linux-multiheaded-desktops here]. Simply download the source from the link given on the page, and follow the instructions in the README.
  
Note that while the author mentions using nvidia twinview, this actually applies regardless.
+
{{Note|While the author mentions using NVDIA's TwinView, the hack should work for any multi-monitor setup.}}
  
===Blue tint on videos with Flash and Nvidia===
+
=== Firefox: old Flash Player version shown after upgrade ===
  
An issue with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:
+
Solution for Firefox: delete file "pluginreg.dat" in user's profile directory.
  
* Install {{AUR|libvdpau-git-flashpatch}} from [[AUR]]
+
* Close firefox
* Patch vdpau_trace.so [http://www.nvnews.net/vbulletin/showpost.php?p=2518770&postcount=104] with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].
+
* Go to {{ic|/home/''<username>''/.mozilla/firefox/''<profile_folder>''/}}
* Right click on a video, select 'Settings...' and untick 'Enable hardware acceleration'. Reload the page for it to take affect. Note that this disables GPU acceleration.
+
* Delete file "pluginreg.dat"
* Downgrade Flash to version 11.1.102.63-1 at most
 
* Use Google Chrome with the new Pepper API.
 
* Try one of the few Flash alternatives.
 
  
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread]. To summarize: if you want all flash sites (youtube, vimeo, etc) to work properly in non-Chrome browsers, without feature regressions (such as losing hardware acceleration), without crashes/instability (enabling hardware decoding), without security concerns (multiple CVEs against older flash versions) and without breaking the vdpau tracing library from its intended purpose, the LEAST objectionable is to install {{AUR|libvdpau-git-flashpatch}}.
+
Firefox will automatically rebuild this file once it is started again. Make sure to substitute ''<username>'' and ''<profile_folder>'' with the appropriate information.
  
===Leaking overlay with Flash and Nvidia===
+
=== Firefox: plugins are installed but not working ===
  
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 [http://www.nvnews.net/vbulletin/showpost.php?p=2514210&postcount=102] and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this issue simply export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}
+
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:
 
+
$ printenv MOZ_PLUGIN_PATH
===Flash videos not working on older systems===
+
If unset, then either re-login, or source {{ic|/etc/profile.d/mozilla-common.sh}} and start Firefox from the same shell:
If you have Abobe Flash installed on an older system and you start playing a video which simply turns black with nothing happeing, it is most likely that your CPU does not support SSE2. You can simply check out this by looking at your CPU flags with this command:
+
  $ source /etc/profile.d/mozilla-common.sh && firefox
 
 
  # cat /proc/cpuinfo | grep flags
 
If sse2 is not mentioned there, then you need to install an older version of Flash (for example 10.3). Older versions possibly will have vulnerabilities. You should then consider sandboxing Firefox using sandfox (https://igurublog.wordpress.com/downloads/script-sandfox/).
 
 
 
Older versions of Flash are available here:
 
http://www.adobe.com/products/flashplayer/distribution3.html
 
 
 
You need to copy libflashplayer.so to the folder /usr/lib/mozilla/plugins/
 

Latest revision as of 12:44, 26 June 2018

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

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

Flash Player

Adobe Flash Player

Installation

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

Note:
  • Some Flash apps may require the ttf-ms-fontsAUR package in order to properly render text.
  • The freshplayerpluginAUR package provides an experimental adapter to use pepper-flash with NPAPI based browsers like Firefox. It can be configured (e.g. for enabling HW-acceleration) by copying /usr/share/freshplayerplugin/freshwrapper.conf.example to ~/.config/freshwrapper.conf.

Upgrade

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

Configuration

To change the preferences (privacy settings, resource usage, etc.) of Flash Player, right click on any embedded Flash content (for instance adobe's flash home) and choose Settings from the menu.

You can also use the Flash settings file /etc/adobe/mms.cfg. Gentoo has an extensively commented example mms.cfg.

To enable video decoding with hardware video acceleration, add/uncomment the following line:

EnableLinuxHWVideoDecode = 1

It might also be required to add/uncomment the following line:

OverrideGPUValidation = 1

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 2 ways.

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.)

Playing DRM-protected content

See Flash DRM content.

Shumway

Shumway is a discontinued HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance. The plugin may be installed directly from Mozilla's github.io site.

Gnash

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 is a packages available: gnash-gitAUR.

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

PDF viewer

PDF.js

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

It is included in Firefox.

For Chromium and Google Chrome it is available as extension in the Chrome Web Store.

External PDF viewers

To use an external PDF viewer you need #MozPlugger.

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).

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.

Restart and it should work like a charm!

UnionPay Online Pay

Note: This plugin is NPAPI-only and thus does not work in Chromium, Opera and Firefox.

Install upeditorAUR package for the "security plugin" used by UnionPay Online Pay (银联在线支付).

Citrix

See Citrix.

Java (IcedTea)

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

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

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.

Pipelight

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 of the web engine, e.g. webkit2gtk or qt5-webkit) 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 don't play .mkv files), the following plugins are available:

  • Rosa Media Player Plugin — Qt-based NPAPI plugin that uses MPlayer as backend.
https://abf.rosalinux.ru/uxteam/ROSA_Media_Player || rosa-media-player-pluginAUR
  • VLC Plugin — NPAPI plugin that uses VLC as backend.
https://code.videolan.org/videolan/npapi-vlc || npapi-vlcAUR

Google Hangouts

Note: This plugin is not required when using Chromium or Firefox

Hangouts plugin can be installed with the google-talkpluginAUR package. Hangouts is a messenger by Google, that allows you to make video call between 15 people simultaneously, or share your screen with others.

MozPlugger

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:

/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.

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"

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])
...

For a more complete list of MozPlugger options see mozplugger(7).

Troubleshooting

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:

~/.asoundrc
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: 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.

Note: While the author mentions using NVDIA's TwinView, the hack should work for any multi-monitor setup.

Firefox: old Flash Player version shown after upgrade

Solution for Firefox: delete file "pluginreg.dat" in user's profile directory.

  • Close firefox
  • Go to /home/<username>/.mozilla/firefox/<profile_folder>/
  • Delete file "pluginreg.dat"

Firefox will automatically rebuild this file once it is started again. Make sure to substitute <username> and <profile_folder> with the appropriate information.

Firefox: 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:

$ printenv MOZ_PLUGIN_PATH

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