473,508 Members | 3,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mozilla Javascript

Hi,
I am looking for a way to start a trusted Linux application (a C executable)
on my local machine, upon clicking a link. Basically the equivalent of
the ActiveXObject in IE. Thank you.
Will
Jul 23 '05 #1
3 2286
On Wed, 09 Jun 2004 10:45:20 -0700, Will wrote:
Hi,
I am looking for a way to start a trusted Linux application (a C
executable) on my local machine, upon clicking a link. Basically the
equivalent of the ActiveXObject in IE. Thank you. Will


Why you won't find that in Mozilla:

http://www.computerworld.com.au/inde...16298&eid=-255

--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

Jul 23 '05 #2


Will wrote:

I am looking for a way to start a trusted Linux application (a C executable)
on my local machine, upon clicking a link. Basically the equivalent of
the ActiveXObject in IE.


Well if a link in a HTML document loaded from a HTTP server could simply
start local applications browsers would have big security holes.
Mozilla has some XPCOM mechanism to start a process, see
http://groups.google.com/groups?q=ns...lla.org&rnum=2
but unless you run your pages from chrome or sign your script you
shouldn't be able to use that mechanism.
If your HTML page with the script is loaded from file: URL you can
request the privilege to use XPConnect (XPCOM via JavaScript), here is
an example tried successfully on Windows to run notepad.exe:

netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var process =
Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var file =
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile );
file.initWithPath("C:\\Windows\\notepad.exe");
process.init(file);
process.run(false, [""], 1);

thus I guess if you pass the right LINUX path to an executable to
initWithPath that example should work as well. Please report back to the
JavaScript group if it does

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #3
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
Will wrote:

I am looking for a way to start a trusted Linux application (a C executable)
on my local machine, upon clicking a link. Basically the equivalent of
the ActiveXObject in IE.


Well if a link in a HTML document loaded from a HTTP server could simply
start local applications browsers would have big security holes.
Mozilla has some XPCOM mechanism to start a process, see
http://groups.google.com/groups?q=ns...lla.org&rnum=2
but unless you run your pages from chrome or sign your script you
shouldn't be able to use that mechanism.
If your HTML page with the script is loaded from file: URL you can
request the privilege to use XPConnect (XPCOM via JavaScript), here is
an example tried successfully on Windows to run notepad.exe:

netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var process =
Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var file =
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile );
file.initWithPath("C:\\Windows\\notepad.exe");
process.init(file);
process.run(false, [""], 1);

thus I guess if you pass the right LINUX path to an executable to
initWithPath that example should work as well. Please report back to the
JavaScript group if it does


This works if the HTML file is invoked as file:. Thank you.
Will
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
7248
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
2
5392
by: For Example: John Smith | last post by:
Hello! Javascript beginner here, looking for some help. I discovered this problem tonight while playing with my site using Mozilla. I don't have Netscape on this computer but I assume this...
10
3561
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
2
482
by: wylbur37 | last post by:
I normally use Mozilla 1.4 on Windows XP Pro. As I was developing some test webpages, I discovered that the SRC parameter doesn't seem to work when a path is used with the filename. In one...
3
1990
by: kaith | last post by:
The following code used to popup a window when I used netscape 4.79. Now I switched to mozilla 1.4 and the window doesn't popup. function newWindow(newContent) { winContent...
3
2076
by: kj | last post by:
This problem is driving me nuts. The code at the end of this post below works fine with IE, but fails with Mozilla. You can see it in action at http://tinyurl.com/2jvo3 With Mozilla 1.4 and...
9
5552
by: fochie | last post by:
Greetings, I'm having a problem when I try to GET a file from my server via xmlhttp when using Mozilla. With IE I can get any type of file fine, get/display headers fine, etc. With Mozilla,...
6
4769
by: Erik Steffl | last post by:
I am trying to create a simple custom web spider using mozilla and javascript, the basic functionality is to open a website and then manipulate it using DOM (possibly opening links etc.). it...
3
1511
by: James | last post by:
I've been looking at the Mozilla source (1.8b1) and I thought that there I might find definitions of the various client-side JavaScript objects (e.g. history, navigator). Has anyone managed to...
20
2597
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.