I'm using Ubuntu 14.04.
I have Pipelight installed - this NPAPI browser plugin allows me to view Silverlight & new Flash based stuff in Firefox.
However this has an unfortunate side effect - all web-browsers that support NPAPI plugins such as WebKit also load this plugin.
Programatically, I would like to disable all browser plugins when I create the WebKit.WebView - thus to my question. How do I do this?
Investigations:
I've looked at using WebKit2 - this does work probably because WebKit2 does not have NPAPI support. However I cannot use this method because Rhythmbox by default has another native plugin which is WebKit i.e. I'm creating another Rhythmbox plugin. When I attempt to load both a WebKit.WebView and WebKit2.WebView at the same time then the process hangs.
I've looked at using WebKit.WebSettings and its enable-plugins property but it appears you cannot apply the new WebSettings instance until after the WebView has been created (thus the pipelight browser plugin is already loaded).
Again - I've tried to assign the new WebSettings instance via the constructor but no joy: x = WebKit.WebView(settings=webkit_settings)
When you have pipelight installed a simple test program (web.py) like this shows the issue:
from gi.repository import WebKit
webkit_settings = WebKit.WebSettings.new()
webkit_settings.props.enable_plugins=False
x = WebKit.WebView.new()
x.set_settings(webkit_settings)
Then running python web.py
shows an example output of
[PIPELIGHT:LIN:unknown] attached to process.
[PIPELIGHT:LIN:unknown] checking environment variable PIPELIGHT_SILVERLIGHT5_0_CONFIG.
[PIPELIGHT:LIN:unknown] searching for config file pipelight-silverlight5.0.
[PIPELIGHT:LIN:unknown] trying to load config file from '/home/foss/.config/pipelight-silverlight5.0'.
[PIPELIGHT:LIN:unknown] unrecognized configuration key 'diagnosticmode'.
[PIPELIGHT:LIN:unknown] sandbox not found or not installed!
[PIPELIGHT:LIN:silverlight5.0] using wine prefix directory /home/foss/.wine-pipelight.
I've posed this question to the Pipelight developers and they have indicated that I need to disable plugins via the WebKit engine. As you can see - I thought WebKit2 was my solution but I cannot use this as stated above.
I've seen this stackoverflow question but I'm not really after disabling specific plugins - at least I dont think so - just want to disable all external plugins
I'm writing this using Python3 but I dont think the python version is the issue here since I've run the test program using both the python and python3 interpreter and the same results are seen.