Pipelight

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Pipelight is a special browser plugin which allows one to use Windows-only plugins inside Linux browsers. The main focus of the project is on Silverlight and its features, such as watching DRM protected videos. It works by creating a bridge between a Windows application, which handles the Windows-only plugin (e.g. Silverlight), and a native Linux browser plugin. The Windows application is run using a patched version of Wine, therefore requiring Pipelight users to move to this version. Pipelight can be used in browsers that support NPAPI plugins. It does not work with Chrome/Chromium, Firefox or Opera.

Installation

Note: Pipelight requires a browser with NPAPI support. NPAPI support is not present in Chrome/Chromium, Firefox or Opera.
Warning: Pipelight project itself is discontinued, which means no security fixes will be released which can make your system vulnerable.

Pipelight can be installed with the pipelightAUR package.

If you want to use Pipelight with a non-standard version of Wine, or want to install it somewhere else, modify the following variables in the PKGBUILD:

  • _prefix
Allows setting a custom location. Default is /usr.
  • _wine
Location of Wine-Silverlight.

Managing plugins

Pipelight can be used to manage browser plugins including Silverlight, Adobe Flash Player/Shockwave Player.

Update the plugins:

# pipelight-plugin --update

To list all available plugins:

$ pipelight-plugin --help

Enable the plugin globally:

# pipelight-plugin --enable plugin

or locally:

$ pipelight-plugin --enable plugin

Plug-in(s) not visible in Mozilla Firefox

Note: Pipelight is a NPAPI-only plugin and does not work in the regular Firefox. It still works in firefox-esr52AUR, which is supported until August 2018.

If upon starting Firefox the enabled plugin does not appear under about:plugins, try running the following command before starting Mozilla Firefox:

# pipelight-plugin --create-mozilla-plugins

User agent

Since some sites refuse to stream to a Linux browser, the user agent may have to be changed.

Verification

There is a test page available here. Alternatively, detected plugins can be listed in about:plugins.

GPU Acceleration in Silverlight

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: /usr/share/pipelight/hw-accel-default returns no such file or directory (Discuss in Talk:Pipelight)

Default behavior

Silverlight applets may include an option called enableGPUAcceleration which controls whether or not hardware acceleration should be used (i.e. use the graphics card for video playback). This option is under the control of specific website's administrator, but this option can also be forced from the client's side (see below). By default, GPU acceleration is only enabled on verified systems cards and pages that require it. Herein, system verification is executed through the bash script /usr/share/pipelight/hw-accel-default that checks the graphics card vendor. Note that this script depends on the glxinfo utility, which is part of mesa-utils. Make sure this package is installed if you want to Pipelight's graphics verification method.

Force hardware acceleration

To take control of the enableGPUAcceleration option yourself and enable hardware acceleration by default, perform the following steps:

# nano /usr/share/pipelight/configs/pipelight-silverlight5.1

Change the following line:

# overwriteArg      = enableGPUAcceleration=true

to:

overwriteArg      = enableGPUAcceleration=true

Disable graphics card verification

Change:

silverlightGraphicDriverCheck = true

To:

silverlightGraphicDriverCheck = false

Troubleshooting

Silverlight plug-in error with Firefox and AppArmor

If you are running AppArmor and Firefox, you may see an error when loading Silverlight plug-in. You will need to modify or create an AppArmor profile.

Videos playing very fast and no sound / bad sound quality

Note: This solution is taken from this page at the Pipelight's LaunchPad page and edited to reflect changes in newer version of Pipelight.

One of the causes of bad sound quality or laggy playback might be the use of PulseAudio. Since Pipelight uses wine to handle the audio playback, changing the audio output module there can solve some problems. A good alternative to PulseAudio is alsa and can be enabled as follows.

First download, install and run the winetricks plugin:

$ wget -O ~/.wine-pipelight/winetricks http://winetricks.org/winetricks
$ chmod +x ~/.wine-pipelight/winetricks
$ WINEPREFIX=~/.wine-pipelight WINE=/opt/wine-compholio/bin/wine WINEARCH=win32 ~/.wine-pipelight/winetricks

Choose Select the default wineprefix > Change Wine settings > sound=alsa.

Then test whether this solves your problem (restart your browser and open a Silverlight video). If not, change the audio output device in wine to analog. Run the wine configuration utility:

WINEPREFIX=~/.wine-pipelight WINE=/opt/wine-compholio/bin/wine WINEARCH=win32 /opt/wine-compholio/bin/winecfg

Open the Audio tab and change the Output device to Out: HDA Intel - ALC1200 Analog.

Note: The actual device name may vary from system to system.

This may solve video lagging issues if PulseAudio was causing it. ALSA audio might still go through PulseAudio though, if you have pulseaudio-alsa installed. This is not a problem by itself, but you may have to restart PulseAudio as follows:

$ pulseaudio -k

GNOME 3/Firefox fullscreen issues

In GNOME 3, fullscreen Pipelight windows do not focus properly in Firefox. This can be fixed using devilspie:

First, install devilspie from the official repositories.

Create the ~/.devilspie directory:

$ mkdir ~/.devilspie

Next, create the following file:

~/.devilspie/pipelight-fullscreen-firefox.ds
(if
    (and
        (is (window_class) "Wine")
        (or
            (is (application_name) "Adobe Flash Player")
            (is (application_name) "Microsoft Silverlight")
        )
    )
    (begin
        (focus)
    )
)

Finally, we need to make devilspie start automatically. This can be accomplished by creating the following file:

~/.config/autostart/devilspie.desktop
[Desktop Entry]
Name=devilspie
Exec=devilspie
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true

Pipelight renders all Chinese characters as squares

Silverlight will only use "Microsoft Yahei" font to render Chinese characters, you need to install this font (probably from other Windows OSes) to support Chinese character rendering.

Other known issues and solutions are often listed in the Pipelight FAQ.

No sound when using PulseAudio

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: Instructions imply the existence of i686 systems, but Arch Linux no longer supports this architecture. Section should be updated to only include the packages needed on 64-bit systems. (Discuss in Talk:Pipelight)

If you are using PulseAudio, you may get no sound from Silverlight applications. To allow Wine to use PulseAudio, you have to install libpulse and pulseaudio-alsa. Use lib32-libpulse and lib32-alsa-plugins on 64-bit systems. You can configure the used audio device using WINEPREFIX="/home/username/.wine-pipelight" winecfg

Tips and tricks

Test 1080p video playback

To verify your Pipelight installation and check its performance on high definition videos, you can use this video for testing purposes.

See also