From 416ee0bd22d1d62ed68eb1f2adc09657040bf0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 27 Jul 2017 19:04:36 +0200 Subject: [PATCH] tools/qvm-start-gui: add --force-stubdomain options Sometimes it's useful to access emulated VGA, without rebooting the VM in debug mode --- doc/manpages/qvm-start-gui.rst | 6 +++++- qubesadmin/tools/qvm_start_gui.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/manpages/qvm-start-gui.rst b/doc/manpages/qvm-start-gui.rst index 8a966bc..eb78794 100644 --- a/doc/manpages/qvm-start-gui.rst +++ b/doc/manpages/qvm-start-gui.rst @@ -15,7 +15,7 @@ Synopsis -------- -:command:`qvm-start-gui` [-h] [--verbose] [--quiet] [--all] [--exclude *EXCLUDE*] [--watch] [--pidfile *PIDFILE*] [--notify-monitory-layout] [*VMNAME* [*VMNAME* ...]] +:command:`qvm-start-gui` [-h] [--verbose] [--quiet] [--all] [--exclude *EXCLUDE*] [--watch] [--force-stubdomain] [--pidfile *PIDFILE*] [--notify-monitory-layout] [*VMNAME* [*VMNAME* ...]] Options ------- @@ -44,6 +44,10 @@ Options Keep watching for further domains startups, must be used with --all +.. option:: --force-stubdomain + + Start GUI to stubdomain-emulated VGA, even if gui-agent is running in the VM + .. option:: --pidfile Pidfile path to create in --watch mode diff --git a/qubesadmin/tools/qvm_start_gui.py b/qubesadmin/tools/qvm_start_gui.py index 411227f..cf2651b 100644 --- a/qubesadmin/tools/qvm_start_gui.py +++ b/qubesadmin/tools/qvm_start_gui.py @@ -347,6 +347,9 @@ parser = qubesadmin.tools.QubesArgumentParser( description='start GUI for qube(s)', vmname_nargs='*') parser.add_argument('--watch', action='store_true', help='Keep watching for further domains startups, must be used with --all') +parser.add_argument('--force-stubdomain', action='store_true', + help='Start GUI to stubdomain-emulated VGA, even if gui-agent is running ' + 'in the VM') parser.add_argument('--pidfile', action='store', default=pidfile_path, help='Pidfile path to create in --watch mode') parser.add_argument('--notify-monitor-layout', action='store_true', @@ -400,7 +403,8 @@ def main(args=None): tasks = [] for vm in args.domains: if vm.is_running(): - tasks.append(asyncio.ensure_future(launcher.start_gui(vm))) + tasks.append(asyncio.ensure_future(launcher.start_gui( + vm, force_stubdom=args.force_stubdomain))) if tasks: loop.run_until_complete(asyncio.wait(tasks)) loop.stop()