Access my Firefox plugin under root - javascript

i recently build a Firefox plugin that scans fingerprint using FireBreath framework. the problem is when i run the test on the plugin in normal mode, the plugin run perfectly but doesn't allow me to use my usb scanner as i need root access . Now , when i start Firefox as root, i can't find the plugin among the plugins list on Firefox . i finally tried to copy my plugin file "plg.so" to /usr/lib64/mozilla/plugins/ . that added my plugin to the list on Firefox but when i try to access it , Firefox get freeze . thanks for your help.

The different plugin install locations are document here.
If you install them per-user (~/.mozilla/plugins), you need to install them for every user you want to use them as (i.e. also install them for root), although you can also install them globally as you found out.
For the freezing, it's impossible to tell what the problem is without more information.
I recommend to file a bug with a stack trace (either crash report id if you can get it to crash while frozen or manually using the alternative methods).

Related

Brackets Freezing On Load Due To Git-Integration Plugin

Brackets is my main code editor and recently I installed the git-integration plugin on it. Now when I try to open Brackets, it freezes up as the new plugin tries to load in.
At the bottom of the screen I can see it picking up a bunch of android files, even though I have yet to work on an Android project on this computer.
I have not changed any settings in the plugin and now it has gotten to a point where I can't even open extension manager.
You can try:
simply uninstall everything (including Brackets itself), resintall Brackets/then Git Plugins (as in issue 12897)
try deleting the Brackets cache folder (issue 1323)
check the developer tools log (issue 1323)

How to detect desktop idle time from an Electron app?

I need my Electron app to respond to the user becoming idle (no mouse or keyboard inputs to any program on the OS) for a certain amount of time.
How can I trigger a function based on such idle time data?
You can always detect idle times on Linux by using XScreenServer, GetLastInputInfo on Windows and CGEventSourceSecondsSinceLastEventType on Mac
I've published desktop-idle using these API's, you can check the source code https://github.com/bithavoc/node-desktop-idle
UPDATE:
Electron 3 users can use the power monitor API to achieve the same goal: https://electronjs.org/docs/api/power-monitor
Some people have written node libraries that hook into the native platform code for OSX, Windows, and Linux to accomplish this.
I ended up using this library to accomplish the same thing in my electron app:
https://github.com/paulcbetts/node-system-idle-time
It's published on npm as #paulcbetts/system-idle-time
I tested it on OSX and it seemed to work fine there.
I did originally get a "module version mismatch expected 50 got 46" error, but running this command cleared it up:
npm rebuild --runtime=electron --target=1.4.3 --disturl=https://atom.io/download/atom-shell --abi=49
Replace target with whatever version of electron you're using.
Since electron uses node, you should checkout RobotJS. These things are platform specific so it does need some other dependancies but you can monitor mouse/keyboard and see if it's changed, or control it (hence the name).
Look at Electron Power monitor API's and use
powerMonitor.getSystemIdleTime()

Cordova cordova.plugins is undefined on win8 but not on iOS

I'm using the plugin fileopener2 and to use it, I must call cordova.plugins.fileopener2.open(...);
When I run this on iOS, everything works perfectly. However, when I run the app on win8, I get an error telling me that cordova.plugins is undefined. Also, I double checked that, after 'ondeviceready' is fired, I console.log the value of cordova.plugins and it indeed returns an undefined value. Can anyone point me as to how I can fix this issue?
For Cordova Windows8 applications (or all applications built with Visual Studio), if your plugin is a custom one (I would assume it's not part of the org.apache...), you have to manually add it. Go to the config file in your www through visual studio. You will see three tabs: Core/Custom/Installed. Go to Custom, go to your cordova project, then in the plugins, find your custom plugin and add the folder of the plugin and voila, it will work!
If you are running into a problem with the plugin not working for a specific platform but working correctly for other platforms, first verify the plugin supports that platform. If the platform is supported, you should contact the plugin author which can generally by done by filing an issue at their GitHub site.
Ex: https://github.com/pwlin/cordova-plugin-file-opener2/issues
Projects created using Visual Studio 2015 are standard Cordova CLI projects. They author may not have Visual Studio, but should be able to reproduce your problem using the command line if you provide them the Cordova version you used (4.3.0 is the default as of VS 2015 RC) and good repro code.

how to add jde components plugin in an eclipse

I need to add jde component plugin in an blackberry eclipse.I have already used the following link in my eclipse:
http://www.blackberry.com/go/eclipseUpdate/3.5/java
But am getting the error as:
'installing software' has encountered a problem.An error occurred while collecting items to be installed.
Please tell me the solution.
That happened with me so many times that I stopped using that update site. Instead, try downloading the component package directly from:
http://us.blackberry.com/developers/javaappdev/javadevenv.jsp
The answer may be simple: Perhaps Windows installs it's updates (and only one installation process can be run at one time), or some other installations or processes may interrupting you.
Try just restart you system and retry your installation.

NPAPI plugin problems in Windows 7

I have a NPAPI plugin which I have written and been using for some time with Firefox 3.x with no problems.
The object is defined as follows -
<object class="someClass" id="pluginobj" type="application/x-plugintype"></object>
I then call methods on it using the following format -
if( document.getElementById("pluginobj") != null )
{
document.getElementById("pluginobj").someMethod(someParams));
}
This is how I understand it should be done and has always worked fine. However, I recently installed this same plugin on a Windows 7 machine (with the same version of Firefox) and it now fails to find the functions defined in the plugin, so I get the following error -
Error: document.getElementById("pluginobj").someMethod is not a function
Nothing has changed at all within the plugin, this errors occurs for any method that is called, not a particular one, and it still works fine on Windows XP machines with no problems.
Very confused! Could anyone help? Thanks.
Note: I've also tried logging inside my plugin and it appears it's not even getting in to the NP_Initialize and NP_GetEntryPoints methods.
I have seen some suggestions around that it could be to with dependencies and libraries being linked to the plugin, but i'm not sure what could be missing on win 7?
Dependency Walker is showing a error saying that the "side-by-side configuration information is incorrect"?
Are you linking to other DLL files from your npapi plugin? Windows 7 works differently in how it finds DLL files, though I don't know the details. The times I've seen this with plugins in the past the problem was that on windows 7 one of the dll files couldn't be found. You could try copying dependency dll files to your system32 directory (not permanently, just to see if that's the issue). I would expect that there it would be able to find it.
If that's the issue, I unfortunately am not certain how to fix it, but it might help.
Another possibility based on the side-by-side configuration issue thing is that your visual studio project is creating a manifest that is telling windows that it requires a specific version of one of the DLLs that isn't there on windows 7. See: http://buffered.io/2008/05/17/resolving-side-by-side-configuration-issues/
I think I've resolved that issue in plugins before by disabling the manifest. I'm not sure; I've never had this issue with the way that FireBreath generates npapi plugin dlls, so I haven't needed to worry about it in the last year. You might consider looking at FireBreath, which works on both IE and Firefox (activex and npapi) and has a very good community for tracking down issues like this.

Categories

Resources