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

Unified Diff: remoting/tools/me2me_virtual_host.py

Issue 11566037: Increase default maximum desktop size and make it configurable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Support a sensible initial size and a much larger maximum size by default. Created 8 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/tools/me2me_virtual_host.py
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 57688f2404d6e8e3a5342f1a025bb8480188dc7b..cfcd635863984df7c2437d2f13cda1eb58ec0287 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -34,6 +34,7 @@ import uuid
XSESSION_COMMAND = None
LOG_FILE_ENV_VAR = "CHROME_REMOTE_DESKTOP_LOG_FILE"
+DEFAULT_SIZES_ENV_VAR = "CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES"
Wez 2012/12/14 19:49:03 nit: Consider describing the format this variable
Jamie 2012/12/14 21:13:17 Done. The usage output doesn't mention this variab
SCRIPT_PATH = sys.path[0]
@@ -748,7 +749,6 @@ def waitpid_handle_exceptions(pid, deadline):
def main():
- DEFAULT_SIZE = "2560x1600"
EPILOG = """This script is not intended for use by end-users. To configure
Chrome Remote Desktop, please install the app from the Chrome
Web Store: https://chrome.google.com/remotedesktop"""
@@ -756,10 +756,9 @@ Web Store: https://chrome.google.com/remotedesktop"""
usage="Usage: %prog [options] [ -- [ X server options ] ]",
epilog=EPILOG)
parser.add_option("-s", "--size", dest="size", action="append",
- help="Dimensions of virtual desktop (default: %s). "
- "This can be specified multiple times to make multiple "
- "screen resolutions available (if the Xvfb server "
- "supports this)" % DEFAULT_SIZE)
+ help="Dimensions of virtual desktop. This can be specified "
+ "multiple times to make multiple screen resolutions "
+ "available (if the Xvfb server supports this).")
parser.add_option("-f", "--foreground", dest="foreground", default=False,
action="store_true",
help="Don't run as a background daemon.")
@@ -831,9 +830,16 @@ Web Store: https://chrome.google.com/remotedesktop"""
print >> sys.stderr, EPILOG
return 1
- # Collate the list of sizes that XRANDR should support.
+ # Collate the list of sizes that XRANDR should support. If no sizes were
+ # specified on the command-line, provide a relatively small size to handle
Lambros 2012/12/14 19:59:05 In the non-RANDR case, we are taking the box-union
Jamie 2012/12/14 21:13:17 I don't think that the non-RANDR case is something
+ # the case where resize-to-client is disabled or not supported, and a much
+ # larger size to support clients with large or mulitple monitors. These
+ # defaults can be overridden by the user by defining a variable in .profile.
if not options.size:
- options.size = [DEFAULT_SIZE]
+ default_sizes = "1600x1200,3840x1600"
Wez 2012/12/14 19:49:03 nit: This still feels like something that should b
Lambros 2012/12/14 19:59:05 It's a strange letter-boxy default. I'd be incline
Jamie 2012/12/14 21:13:17 That increases Xvfb memory usage from 34 to 48Mb,
Jamie 2012/12/14 21:13:17 Done.
Wez 2012/12/14 21:19:20 Linux will only actually commit pages that we touc
Jamie 2012/12/14 21:23:19 Is this a vote for increasing the height or just a
+ if os.environ.has_key(DEFAULT_SIZES_ENV_VAR):
+ default_sizes = os.environ[DEFAULT_SIZES_ENV_VAR]
Wez 2012/12/14 19:49:03 Do we get enough of the user's environment for thi
Jamie 2012/12/14 21:13:17 Yes, Lambros did a test and confirmed that .profil
+ options.size = default_sizes.split(",");
sizes = []
for size in options.size:
« 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