[Project_owners] Access to Terminal

Jesper Staun Hansen jesper at selvet.dk
Sun Jan 27 04:44:06 PST 2008


Well, I think you missed a concept here. You dont need to start a 
terminal to start an application.
So you would just start "/usr/bin/wget" and not "/bin/bash 
/usr/bin/wget" as that would open a terminal right in the face of the 
user. You probably dont want that?
Instead just type them in. And darn, get a Linux OS if you wanna try'em 
out :)

joe ertaba wrote:
> http://developer.mozilla.org/en/docs/Code_snippets:Running_applications
>
> in windows I can put "c:\\windows\\cmd.exe" to run command prompt but 
> what about linux ? what is the terminal path :)
>
> PS: did you see _new beta edition_ of flashgot ? they only support 
> wget & terminal in new beta edition (not publish yet !)
>
>
> On Jan 27, 2008 3:41 PM, Jesper Staun Hansen <jesper at selvet.dk 
> <mailto:jesper at selvet.dk>> wrote:
>
>     that was one tricky question. Used some time to find you an
>     answer. This
>     will probably be my best guess:
>     http://developer.mozilla.org/en/docs/Code_snippets:Running_applications
>
>     The way they run it is (look in components/flashgotService.js):
>     runNative: function(args, blocking, exeFile) {
>        try {
>          if (typeof(exeFile)=="object"
>            || (exeFile = this.exeFile).exists()
>            || this.createExecutable()) {
>            const
>     proc=CC['@mozilla.org/process/util;1'].createInstance(
>     <http://mozilla.org/process/util;1%27%5D.createInstance%28>
>              CI.nsIProcess);
>            proc.init(exeFile);
>            this.log("Running " + exeFile.path + " " + args.join(" ") +
>     " --
>     " +(blocking ? "blocking" : "async") );
>            proc.run(blocking,args,args.length,{});
>            if (blocking && proc.exitValue != 0) {
>              this.log("Warning: native invocation of\n"
>                +exeFile.path
>                +"\nwith arguments <"
>                +args.join(" ")
>                +">\nreturned "+proc.exitValue);
>            }
>            return proc.exitValue;
>          } else {
>            this.log("Bad executable "+exeFile);
>          }
>        } catch(err) {
>          this.log("Error running native executable:\n" + exeFile.path +
>            " "+args.join(" ")+"\n"+err.message);
>        }
>        return 0xffffffff;
>      }
>
>
>     joe ertaba wrote:
>     > Hi,
>     >
>     > how can I access to *linux terminal* from
>     "@mozilla.org/process/util;1 <http://mozilla.org/process/util;1>
>     > <http://mozilla.org/process/util;1>"
>     >
>     > I want to send some commands to terminal from my extension, some
>     thing
>     > like run wget to get files ,...
>     >
>     > PS: recently Flashgot runs Wget in terminal window
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > 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
>   




More information about the Project_owners mailing list