core/hvm: handle verbose option for guid

This commit is contained in:
Marek Marczykowski-Górecki 2015-02-09 05:39:44 +01:00
parent 5d9fa977e2
commit 2def43517a
2 changed files with 18 additions and 12 deletions

View File

@ -1537,7 +1537,7 @@ class QubesVm(object):
p.communicate(input=self.default_user)
def start_guid(self, verbose = True, notify_function = None,
extra_guid_args=[], before_qrexec=False):
extra_guid_args=None, before_qrexec=False):
if verbose:
print >> sys.stderr, "--> Starting Qubes GUId..."
@ -1546,7 +1546,8 @@ class QubesVm(object):
"-c", self.label.color,
"-i", self.label.icon_path,
"-l", str(self.label.index)]
guid_cmd += extra_guid_args
if extra_guid_args is not None:
guid_cmd += extra_guid_args
if self.debug:
guid_cmd += ['-v', '-v']
elif not verbose:

View File

@ -380,15 +380,20 @@ class QubesHVm(QubesVm):
else:
raise
def start_stubdom_guid(self):
cmdline = [system_path["qubes_guid_path"],
"-d", str(self.stubdom_xid),
"-t", str(self.xid),
"-N", self.name,
"-c", self.label.color,
"-i", self.label.icon_path,
"-l", str(self.label.index)]
retcode = subprocess.call (cmdline)
def start_stubdom_guid(self, verbose=True):
guid_cmd = [system_path["qubes_guid_path"],
"-d", str(self.stubdom_xid),
"-t", str(self.xid),
"-N", self.name,
"-c", self.label.color,
"-i", self.label.icon_path,
"-l", str(self.label.index)]
if self.debug:
guid_cmd += ['-v', '-v']
elif not verbose:
guid_cmd += ['-q']
retcode = subprocess.call (guid_cmd)
if (retcode != 0) :
raise QubesException("Cannot start qubes-guid!")
@ -407,7 +412,7 @@ class QubesHVm(QubesVm):
elif before_qrexec and (not self.guiagent_installed or self.debug):
if verbose:
print >> sys.stderr, "--> Starting Qubes GUId (full screen)..."
self.start_stubdom_guid()
self.start_stubdom_guid(verbose=verbose)
def start_qrexec_daemon(self, **kwargs):
if not self.qrexec_installed: