Ver código fonte

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

Sometimes it's useful to access emulated VGA, without rebooting the VM
in debug mode
Marek Marczykowski-Górecki 6 anos atrás
pai
commit
416ee0bd22
2 arquivos alterados com 10 adições e 2 exclusões
  1. 5 1
      doc/manpages/qvm-start-gui.rst
  2. 5 1
      qubesadmin/tools/qvm_start_gui.py

+ 5 - 1
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

+ 5 - 1
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()