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

Unified Diff: remoting/tools/me2me_virtual_host.py

Issue 11782006: Set Virtual Me2Me desktop's initial DPI to 96 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use --dpi Created 7 years, 12 months 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/tools/me2me_virtual_host.py
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index eda56485241f35cd9d8ddc310a0f40da2423b34e..7b3c774bed44d7b9a394ea5308dc0ae72a03dd42 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -329,22 +329,22 @@ class Desktop:
label = "%dx%d" % (width, height)
args = ["xrandr", "--newmode", label, "0", str(width), "0", "0", "0",
str(height), "0", "0", "0"]
- proc = subprocess.Popen(args, env=self.child_env, stdout=devnull,
- stderr=devnull)
- proc.wait()
+ subprocess.call(args, env=self.child_env, stdout=devnull, stderr=devnull)
args = ["xrandr", "--addmode", "screen", label]
- proc = subprocess.Popen(args, env=self.child_env, stdout=devnull,
- stderr=devnull)
- proc.wait()
+ subprocess.call(args, env=self.child_env, stdout=devnull, stderr=devnull)
# Set the initial mode to the first size specified, otherwise the X server
# would default to (max_width, max_height), which might not even be in the
# list.
label = "%dx%d" % self.sizes[0]
args = ["xrandr", "-s", label]
- proc = subprocess.Popen(args, env=self.child_env, stdout=devnull,
- stderr=devnull)
- proc.wait()
+ subprocess.call(args, env=self.child_env, stdout=devnull, stderr=devnull)
+
+ # Set the physical size of the display so that the initial mode is running
+ # at approximately 96 DPI, since some desktops require the DPI to be set to
+ # something realistic.
+ args = ["xrandr", "--dpi", "96"]
+ subprocess.call(args, env=self.child_env, stdout=devnull, stderr=devnull)
devnull.close()
« 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