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

Side by Side Diff: remoting/host/linux/linux_me2me_host.py

Issue 1903503006: [remoting host] Fix linux_me2me_host.py for swarming/isolate tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« 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/python 1 #!/usr/bin/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # defaults can be overridden in ~/.profile. 48 # defaults can be overridden in ~/.profile.
49 DEFAULT_SIZES = "1600x1200,3840x2560" 49 DEFAULT_SIZES = "1600x1200,3840x2560"
50 50
51 # If RANDR is not available, use a smaller default size. Only a single 51 # If RANDR is not available, use a smaller default size. Only a single
52 # resolution is supported in this case. 52 # resolution is supported in this case.
53 DEFAULT_SIZE_NO_RANDR = "1600x1200" 53 DEFAULT_SIZE_NO_RANDR = "1600x1200"
54 54
55 SCRIPT_PATH = os.path.abspath(sys.argv[0]) 55 SCRIPT_PATH = os.path.abspath(sys.argv[0])
56 SCRIPT_DIR = os.path.dirname(SCRIPT_PATH) 56 SCRIPT_DIR = os.path.dirname(SCRIPT_PATH)
57 57
58 HOST_BINARY_NAME = "chrome-remote-desktop-host" 58 IS_INSTALLED = (os.path.basename(sys.argv[0]) != 'linux_me2me_host.py')
59
60 if IS_INSTALLED:
61 HOST_BINARY_NAME = "chrome-remote-desktop-host"
62 else:
63 # Swarming/isolate tests still use the built executable filename.
64 HOST_BINARY_NAME = "remoting_me2me_host"
65
59 CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop" 66 CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop"
60 67
61 HOME_DIR = os.environ["HOME"] 68 HOME_DIR = os.environ["HOME"]
62 CONFIG_DIR = os.path.join(HOME_DIR, ".config/chrome-remote-desktop") 69 CONFIG_DIR = os.path.join(HOME_DIR, ".config/chrome-remote-desktop")
63 SESSION_FILE_PATH = os.path.join(HOME_DIR, ".chrome-remote-desktop-session") 70 SESSION_FILE_PATH = os.path.join(HOME_DIR, ".chrome-remote-desktop-session")
64 SYSTEM_SESSION_FILE_PATH = "/etc/chrome-remote-desktop-session" 71 SYSTEM_SESSION_FILE_PATH = "/etc/chrome-remote-desktop-session"
65 72
66 X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock" 73 X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock"
67 FIRST_X_DISPLAY_NUMBER = 20 74 FIRST_X_DISPLAY_NUMBER = 20
68 75
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 else: 1378 else:
1372 logging.info("Host exited with status %s." % os.WEXITSTATUS(status)) 1379 logging.info("Host exited with status %s." % os.WEXITSTATUS(status))
1373 elif os.WIFSIGNALED(status): 1380 elif os.WIFSIGNALED(status):
1374 logging.info("Host terminated by signal %s." % os.WTERMSIG(status)) 1381 logging.info("Host terminated by signal %s." % os.WTERMSIG(status))
1375 1382
1376 1383
1377 if __name__ == "__main__": 1384 if __name__ == "__main__":
1378 logging.basicConfig(level=logging.DEBUG, 1385 logging.basicConfig(level=logging.DEBUG,
1379 format="%(asctime)s:%(levelname)s:%(message)s") 1386 format="%(asctime)s:%(levelname)s:%(message)s")
1380 sys.exit(main()) 1387 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