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

Side by Side Diff: remoting/tools/me2me_virtual_host.py

Issue 10826109: [Chromoting] Fix command line flags for virtual Me2Me. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 self.session_proc = subprocess.Popen(XSESSION_COMMAND, 376 self.session_proc = subprocess.Popen(XSESSION_COMMAND,
377 stdin=open(os.devnull, "r"), 377 stdin=open(os.devnull, "r"),
378 cwd=HOME_DIR, 378 cwd=HOME_DIR,
379 env=self.child_env) 379 env=self.child_env)
380 if not self.session_proc.pid: 380 if not self.session_proc.pid:
381 raise Exception("Could not start X session") 381 raise Exception("Could not start X session")
382 382
383 def launch_host(self, host): 383 def launch_host(self, host):
384 # Start remoting host 384 # Start remoting host
385 args = [locate_executable(REMOTING_COMMAND), 385 args = [locate_executable(REMOTING_COMMAND),
386 "--host_config=%s" % (host.config_file)] 386 "--host-config=%s" % (host.config_file)]
387 if host.auth.config_file != host.config_file: 387 if host.auth.config_file != host.config_file:
388 args.append("--auth_config=%s" % (host.auth.config_file)) 388 args.append("--auth-config=%s" % (host.auth.config_file))
389 self.host_proc = subprocess.Popen(args, env=self.child_env) 389 self.host_proc = subprocess.Popen(args, env=self.child_env)
390 logging.info(args) 390 logging.info(args)
391 if not self.host_proc.pid: 391 if not self.host_proc.pid:
392 raise Exception("Could not start remoting host") 392 raise Exception("Could not start remoting host")
393 393
394 394
395 class PidFile: 395 class PidFile:
396 """Class to allow creating and deleting a file which holds the PID of the 396 """Class to allow creating and deleting a file which holds the PID of the
397 running process. This is used to detect if a process is already running, and 397 running process. This is used to detect if a process is already running, and
398 inform the user of the PID. On process termination, the PID file is 398 inform the user of the PID. On process termination, the PID file is
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 logging.info("OAuth credentials are invalid - exiting.") 871 logging.info("OAuth credentials are invalid - exiting.")
872 try: 872 try:
873 os.remove(auth.config_file) 873 os.remove(auth.config_file)
874 except: 874 except:
875 pass 875 pass
876 return 0 876 return 0
877 877
878 if __name__ == "__main__": 878 if __name__ == "__main__":
879 logging.basicConfig(level=logging.DEBUG) 879 logging.basicConfig(level=logging.DEBUG)
880 sys.exit(main()) 880 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