tools/qvm-start-gui: add --force-stubdomain options

Sometimes it's useful to access emulated VGA, without rebooting the VM
in debug mode
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-27 19:04:36 +02:00
parent 5b0c8e84d8
commit 416ee0bd22
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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()