Bug 1159083 - Pass XAUTHORITY to Linux simulators. r=janx, a=sledru
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 30 Apr 2015 15:37:05 -0700
changeset 260429 60008fafaf37afc412a4035f48f2da16c5e22f04
parent 260428 4c47ac32dbbb7fec37c7f5543ce5757d9b3595ea
child 260430 9ed9a0b9146752bbbc554f64c6faf0405d8331b4
push id32
push userryanvm@gmail.com
push dateWed, 20 May 2015 00:53:26 +0000
treeherdermozilla-esr38@8e123bd0a98e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanx, sledru
bugs1159083
milestone38.0.1esrpre
Bug 1159083 - Pass XAUTHORITY to Linux simulators. r=janx, a=sledru
browser/devtools/webide/modules/simulator-process.js
--- a/browser/devtools/webide/modules/simulator-process.js
+++ b/browser/devtools/webide/modules/simulator-process.js
@@ -60,19 +60,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),