Bug 1159083 - Pass XAUTHORITY to Linux simulators. r=janx
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 30 Apr 2015 15:37:05 -0700
changeset 271710 81455ec95c0a8ddf623872e24f075c9886e841b5
parent 271709 74ce17691f86f1e93bd4b54fccf35dca8076ec29
child 271711 bb8f2d873bc825cb657e89c383e74a12e279e94a
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanx
bugs1159083
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1159083 - Pass XAUTHORITY to Linux simulators. r=janx
browser/devtools/webide/modules/simulator-process.js
--- a/browser/devtools/webide/modules/simulator-process.js
+++ b/browser/devtools/webide/modules/simulator-process.js
@@ -66,19 +66,21 @@ SimulatorProcess.prototype = {
     });
 
     this.on("stdout", (e, data) => this.log(e, data.trim()));
     this.on("stderr", (e, data) => this.log(e, data.trim()));
 
     let environment;
     if (OS.indexOf("linux") > -1) {
       environment = ["TMPDIR=" + Services.dirsvc.get("TmpD", Ci.nsIFile).path];
-      if ("DISPLAY" in Environment) {
-        environment.push("DISPLAY=" + Environment.DISPLAY);
-      }
+      ["DISPLAY", "XAUTHORITY"].forEach(key => {
+        if (key in Environment) {
+          environment.push(key + "=" + Environment[key]);
+        }
+      });
     }
 
     // Spawn a B2G instance.
     this.process = Subprocess.call({
       command: b2g,
       arguments: this.args,
       environment: environment,
       stdout: data => this.emit("stdout", data),