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

Side by Side 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: Removed debug print 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Virtual Me2Me implementation. This script runs and manages the processes 6 # Virtual Me2Me implementation. This script runs and manages the processes
7 # required for a Virtual Me2Me desktop, which are: X server, X desktop 7 # required for a Virtual Me2Me desktop, which are: X server, X desktop
8 # session, and Host process. 8 # session, and Host process.
9 # This script is intended to run continuously as a background daemon 9 # This script is intended to run continuously as a background daemon
10 # process, running under an ordinary (non-root) user account. 10 # process, running under an ordinary (non-root) user account.
(...skipping 16 matching lines...) Expand all
27 27
28 # By default this script will try to determine the most appropriate X session 28 # By default this script will try to determine the most appropriate X session
29 # command for the system. To use a specific session instead, set this variable 29 # command for the system. To use a specific session instead, set this variable
30 # to the executable filename, or a list containing the executable and any 30 # to the executable filename, or a list containing the executable and any
31 # arguments, for example: 31 # arguments, for example:
32 # XSESSION_COMMAND = "/usr/bin/gnome-session-fallback" 32 # XSESSION_COMMAND = "/usr/bin/gnome-session-fallback"
33 # XSESSION_COMMAND = ["/usr/bin/gnome-session", "--session=ubuntu-2d"] 33 # XSESSION_COMMAND = ["/usr/bin/gnome-session", "--session=ubuntu-2d"]
34 XSESSION_COMMAND = None 34 XSESSION_COMMAND = None
35 35
36 LOG_FILE_ENV_VAR = "CHROME_REMOTE_DESKTOP_LOG_FILE" 36 LOG_FILE_ENV_VAR = "CHROME_REMOTE_DESKTOP_LOG_FILE"
37 MAXIMUM_SIZE_ENV_VAR = "CHROME_REMOTE_DESKTOP_MAXIMUM_DESTOP_SIZE"
Wez 2012/12/14 19:07:00 typo: DESTOP
Jamie 2012/12/14 19:29:16 Done.
37 38
38 SCRIPT_PATH = sys.path[0] 39 SCRIPT_PATH = sys.path[0]
39 40
40 DEFAULT_INSTALL_PATH = "/opt/google/chrome-remote-desktop" 41 DEFAULT_INSTALL_PATH = "/opt/google/chrome-remote-desktop"
41 if SCRIPT_PATH == DEFAULT_INSTALL_PATH: 42 if SCRIPT_PATH == DEFAULT_INSTALL_PATH:
42 HOST_BINARY_NAME = "chrome-remote-desktop-host" 43 HOST_BINARY_NAME = "chrome-remote-desktop-host"
43 else: 44 else:
44 HOST_BINARY_NAME = "remoting_me2me_host" 45 HOST_BINARY_NAME = "remoting_me2me_host"
45 46
46 CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop" 47 CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 raise 742 raise
742 elif deadline > now: 743 elif deadline > now:
743 time.sleep(deadline - now) 744 time.sleep(deadline - now)
744 return (0, 0) 745 return (0, 0)
745 else: 746 else:
746 # Anything else is an unexpected error. 747 # Anything else is an unexpected error.
747 raise 748 raise
748 749
749 750
750 def main(): 751 def main():
751 DEFAULT_SIZE = "2560x1600" 752 DEFAULT_SIZE = "3840x1600"
Wez 2012/12/14 19:07:00 This is an insane default size, e.g. if the user c
Jamie 2012/12/14 19:29:16 We don't have a MAXIMUM_SIZE variable--it's comput
Wez 2012/12/14 19:30:13 SGTM :)
Jamie 2012/12/14 19:42:58 Done.
753 if os.environ.has_key(MAXIMUM_SIZE_ENV_VAR):
754 DEFAULT_SIZE = os.environ[MAXIMUM_SIZE_ENV_VAR]
752 EPILOG = """This script is not intended for use by end-users. To configure 755 EPILOG = """This script is not intended for use by end-users. To configure
753 Chrome Remote Desktop, please install the app from the Chrome 756 Chrome Remote Desktop, please install the app from the Chrome
754 Web Store: https://chrome.google.com/remotedesktop""" 757 Web Store: https://chrome.google.com/remotedesktop"""
755 parser = optparse.OptionParser( 758 parser = optparse.OptionParser(
756 usage="Usage: %prog [options] [ -- [ X server options ] ]", 759 usage="Usage: %prog [options] [ -- [ X server options ] ]",
757 epilog=EPILOG) 760 epilog=EPILOG)
758 parser.add_option("-s", "--size", dest="size", action="append", 761 parser.add_option("-s", "--size", dest="size", action="append",
759 help="Dimensions of virtual desktop (default: %s). " 762 help="Dimensions of virtual desktop (default: %s). "
760 "This can be specified multiple times to make multiple " 763 "This can be specified multiple times to make multiple "
761 "screen resolutions available (if the Xvfb server " 764 "screen resolutions available (if the Xvfb server "
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 host_config.clear_auth() 1040 host_config.clear_auth()
1038 host_config.clear_host_info() 1041 host_config.clear_host_info()
1039 host_config.save() 1042 host_config.save()
1040 return 0 1043 return 0
1041 1044
1042 1045
1043 if __name__ == "__main__": 1046 if __name__ == "__main__":
1044 logging.basicConfig(level=logging.DEBUG, 1047 logging.basicConfig(level=logging.DEBUG,
1045 format="%(asctime)s:%(levelname)s:%(message)s") 1048 format="%(asctime)s:%(levelname)s:%(message)s")
1046 sys.exit(main()) 1049 sys.exit(main())
OLDNEW
« 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