title: What environment variable is used to execute commands and .sh file in terminal
body: <p>I successfully executed commands and .bat files in command prompt using XUL by this code:</p>
  
  <pre class="lang-js prettyprint-override"><code>Components.utils.import("resource://gre/modules/FileUtils.jsm");
  
  var env = Components.classes["@mozilla.org/process/environment;1"]
                      .getService(Components.interfaces.nsIEnvironment);
  var shell = new FileUtils.File(env.get("COMSPEC"));
  
  var args = ["/c", "cd C:/ffmpeg/bin &amp; record.bat"];
  
  var process = Components.classes["@mozilla.org/process/util;1"]
                          .createInstance(Components.interfaces.nsIProcess);
  process.init(shell);
  process.runAsync(args, args.length);
  </code></pre>
  
  <p>But now I changed .bat files to .sh files to run for Ubuntu and need to run commands in terminal by using same code, so I need to change environment variable "COMSPEC" to something which works for terminal, I found that it is "TERM" but didn't work.</p>
  
  <p>Is there any other environment variable or way to do this task?</p>