OLD | NEW |
---|---|
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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 def signal_handler(signum, stackframe): | 631 def signal_handler(signum, stackframe): |
632 if signum == signal.SIGUSR1: | 632 if signum == signal.SIGUSR1: |
633 logging.info("SIGUSR1 caught, reloading configuration.") | 633 logging.info("SIGUSR1 caught, reloading configuration.") |
634 reload_config() | 634 reload_config() |
635 else: | 635 else: |
636 # Exit cleanly so the atexit handler, cleanup(), gets called. | 636 # Exit cleanly so the atexit handler, cleanup(), gets called. |
637 raise SystemExit | 637 raise SystemExit |
638 | 638 |
639 | 639 |
640 def main(): | 640 def main(): |
641 DEFAULT_SIZE = "1280x1024" | 641 DEFAULT_SIZE = "1280x800" |
Wez
2012/08/13 23:41:57
Is 800px high enough for all of Gnome's panels to
Sergey Ulanov
2012/08/14 00:58:51
by default in gnome 2 there are two panels, 16 pix
| |
642 parser = optparse.OptionParser( | 642 parser = optparse.OptionParser( |
643 "Usage: %prog [options] [ -- [ X server options ] ]") | 643 "Usage: %prog [options] [ -- [ X server options ] ]") |
644 parser.add_option("-s", "--size", dest="size", action="append", | 644 parser.add_option("-s", "--size", dest="size", action="append", |
645 help="dimensions of virtual desktop (default: %s). " | 645 help="dimensions of virtual desktop (default: %s). " |
646 "This can be specified multiple times to make multiple " | 646 "This can be specified multiple times to make multiple " |
647 "screen resolutions available (if the Xvfb server " | 647 "screen resolutions available (if the Xvfb server " |
648 "supports this)" % DEFAULT_SIZE) | 648 "supports this)" % DEFAULT_SIZE) |
649 parser.add_option("-f", "--foreground", dest="foreground", default=False, | 649 parser.add_option("-f", "--foreground", dest="foreground", default=False, |
650 action="store_true", | 650 action="store_true", |
651 help="don't run as a background daemon") | 651 help="don't run as a background daemon") |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 host_config.save() | 913 host_config.save() |
914 return 0 | 914 return 0 |
915 elif os.WEXITSTATUS(status) == 5: | 915 elif os.WEXITSTATUS(status) == 5: |
916 logging.info("Host domain is blocked by policy - exiting.") | 916 logging.info("Host domain is blocked by policy - exiting.") |
917 os.remove(host.config_file) | 917 os.remove(host.config_file) |
918 return 0 | 918 return 0 |
919 | 919 |
920 if __name__ == "__main__": | 920 if __name__ == "__main__": |
921 logging.basicConfig(level=logging.DEBUG) | 921 logging.basicConfig(level=logging.DEBUG) |
922 sys.exit(main()) | 922 sys.exit(main()) |
OLD | NEW |