Ok, let me aks a simple question first

I have a script: a.sh

how to run it in Linux !  *//My script works when i dbclick on it !*

1.
var file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("/home/joe/Desktop/a.sh");

var process = Components.classes["@mozilla.org/process/util;1"]
                        .createInstance(Components.interfaces.nsIProcess);
process.init(file);
var args = [];
process.run(false, args, 0);
2.
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("/home/joe/Desktop/a.sh");
file.launch();

the first code doesn't return error but does not execute script too !
the second code return this error :Component returned failure code:
0x80004005 (NS_ERROR_FAILURE)




On Jan 27, 2008 5:21 PM, Jesper Staun Hansen <[EMAIL PROTECTED]> wrote:

> 1. Do you want a terminal to open up and list the files?
> 2. Or do you want firefox to return the list of files?
>
> 1. Dont go there.
> 2. Go here
>
> why? Because there are so many different terminals.
>
> joe ertaba wrote:
> >
> >     $ which ls
> >     /bin/ls
> >
> > it works ?! why terminal not opens and shows list of files ?
> >
> >
> >
> >
> >     >
> >     >
> >     >     --
> >     >     MARCELO DE FREITAS ANDRADE
> >     >     | Computer Science Bachelor
> >     >     | Web Application Dev Specialist
> >     >     | Linux Certified Professional LPIC-1
> >     >     _______________________________________________
> >     >     Project_owners mailing list
> >     >     [email protected] <mailto:[email protected]>
> >     <mailto:[email protected] <mailto:[email protected]
> >>
> >     >     https://www.mozdev.org/mailman/listinfo/project_owners
> >     >
> >     >
> >     >
> >
> ------------------------------------------------------------------------
> >     >
> >     > _______________________________________________
> >     > Project_owners mailing list
> >     > [email protected] <mailto:[email protected]>
> >     > https://www.mozdev.org/mailman/listinfo/project_owners
> >     >
> >
> >
> >     _______________________________________________
> >     Project_owners mailing list
> >     [email protected] <mailto:[email protected]>
> >     https://www.mozdev.org/mailman/listinfo/project_owners
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Project_owners mailing list
> > [email protected]
> > https://www.mozdev.org/mailman/listinfo/project_owners
> >
>
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to