Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: remoting/host/linux/linux_me2me_host.py

Issue 2566363002: Don't include TMPDIR in X server environment (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/linux/linux_me2me_host.py
diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py
index 0e1f98e2a3cc7217e570f713c2842d0f27f1ee81..c89dc75bd2139f804a1059014be514008cc179af 100755
--- a/remoting/host/linux/linux_me2me_host.py
+++ b/remoting/host/linux/linux_me2me_host.py
@@ -470,6 +470,18 @@ class Desktop:
self.ssh_auth_sockname = ("/tmp/chromoting.%s.ssh_auth_sock" %
os.environ["USER"])
+ # Returns child environment not containing TMPDIR.
+ # Certain values of TMPDIR can break the X server (crbug.com/672684), so we
+ # want to make sure it isn't set in the envirionment we use to start the
+ # server.
+ def _x_env(self):
+ if "TMPDIR" not in self.child_env:
+ return self.child_env
+ else:
+ env_copy = dict(self.child_env)
+ del env_copy["TMPDIR"]
+ return env_copy
+
def _wait_for_x(self):
# Wait for X to be active.
with open(os.devnull, "r+") as devnull:
@@ -500,7 +512,7 @@ class Desktop:
"-nolisten", "tcp",
"-noreset",
"-screen", "0", screen_option
- ] + extra_x_args, env=self.child_env)
+ ] + extra_x_args, env=self._x_env())
if not self.x_proc.pid:
raise Exception("Could not start Xvfb.")
@@ -543,7 +555,7 @@ class Desktop:
"-logfile", "/dev/null",
"-verbose", "3",
"-config", config_file.name
- ] + extra_x_args, env=self.child_env)
+ ] + extra_x_args, env=self._x_env())
if not self.x_proc.pid:
raise Exception("Could not start Xorg.")
self._wait_for_x()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698