Bug 1159083 - Pass XAUTHORITY to Linux simulators. r=janx
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 30 Apr 2015 15:37:05 -0700
changeset 273235 81455ec95c0a8ddf623872e24f075c9886e841b5
parent 273234 74ce17691f86f1e93bd4b54fccf35dca8076ec29
child 273236 bb8f2d873bc825cb657e89c383e74a12e279e94a
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [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),