tags:

views:

102

answers:

2

Is there a simple way for Firefox to send a simple flag value to the local machine, so a program inside the local machine can react upon the flag.

I have put so much effort in cookies, extensions and even Javascript read/write file .. all of it failed. i just wanted a way that the Firefox can give signal to local machine. That's all.

For example, I create a simple extension that monitors a certain URL. Then, when the URL is visited, Firefox will signal something or set a flag. I will code a simple script to read the flag and do other things..

I am on Linux platform.

A: 

Try using Applets to access the clients machine, this doesn't limit you to use Firefox other browsers as well.

jerjer
I thought Firefox blocks all communication coming from inside the browser.
karikari
Im trying with java applet right now. but when run in firefox, it says error:"caught security exception".why?
karikari
it seems like this is a browser configuration issue with applets, check if applets has the appropriate rights.
jerjer
+1  A: 

you can write to a file on disk, the application on your local machine can monitor for this file existence and act upon it.

I also suggest that the "other" application rename the file as soon as it find it so firefox can single again.

see here about Firefox file i/o using java script

Alon
hi Alon. yes, I have tried the code. But I got error at this line:netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");I says that I done have access. I could not find a way to solve it.
karikari
you have to configure file permissions : http://tiddlywiki.org/wiki/How_To/Firefox_Per-File_Permissions
Alon
Ok, I'm giving it another try. Before this I used this below line:netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
karikari
I have tried what you suggested. Added the permissions to prefs.js. But I got this error when running the extension:Error: Permission denied for <file://> to get property XPCComponents.classesNeed help..
karikari