dom0: qvm-run --nogui support for HVM

Translate it to "nogui:" command prefix.
This commit is contained in:
Marek Marczykowski 2012-06-15 17:40:03 +02:00
parent 4dfad5f1ae
commit 92844a161a

View File

@ -2406,6 +2406,8 @@ class QubesHVm(QubesVm):
def run(self, command, **kwargs): def run(self, command, **kwargs):
if self.qrexec_installed: if self.qrexec_installed:
if 'gui' in kwargs and kwargs['gui']==False:
command = "nogui:" + command
super(QubesHVm, self).run(command, **kwargs) super(QubesHVm, self).run(command, **kwargs)
else: else:
raise QubesException("Needs qrexec agent installed in VM to use this function. See also qvm-prefs.") raise QubesException("Needs qrexec agent installed in VM to use this function. See also qvm-prefs.")