[Project_owners] Access to Terminal
joe ertaba
belaviyo at gmail.com
Sun Jan 27 06:07:33 PST 2008
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 <jesper at selvet.dk> 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
> > > Project_owners at mozdev.org <mailto:Project_owners at mozdev.org>
> > <mailto:Project_owners at mozdev.org <mailto:Project_owners at mozdev.org
> >>
> > > https://www.mozdev.org/mailman/listinfo/project_owners
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Project_owners mailing list
> > > Project_owners at mozdev.org <mailto:Project_owners at mozdev.org>
> > > https://www.mozdev.org/mailman/listinfo/project_owners
> > >
> >
> >
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org <mailto:Project_owners at mozdev.org>
> > https://www.mozdev.org/mailman/listinfo/project_owners
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > https://www.mozdev.org/mailman/listinfo/project_owners
> >
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mozdev.org/pipermail/project_owners/attachments/20080127/69766f81/attachment-0001.html
More information about the Project_owners
mailing list