hvm: always use qrexec for clipboard operations
This is temporary solution until Windows GUI agent will handle MSG_CLIPBOARD_* commands. Also fix code style - wrap long lines
This commit is contained in:
parent
e9f08aefd7
commit
4ce3acd64d
@ -1437,12 +1437,17 @@ class QubesVm(object):
|
|||||||
p = self.run('QUBESRPC qubes.WaitForSession none', user="root", passio_popen=True, gui=False, wait=True)
|
p = self.run('QUBESRPC qubes.WaitForSession none', user="root", passio_popen=True, gui=False, wait=True)
|
||||||
p.communicate(input=self.default_user)
|
p.communicate(input=self.default_user)
|
||||||
|
|
||||||
def start_guid(self, verbose = True, notify_function = None):
|
def start_guid(self, verbose = True, notify_function = None, extra_guid_args=[]):
|
||||||
if verbose:
|
if verbose:
|
||||||
print >> sys.stderr, "--> Starting Qubes GUId..."
|
print >> sys.stderr, "--> Starting Qubes GUId..."
|
||||||
xid = self.get_xid()
|
xid = self.get_xid()
|
||||||
|
|
||||||
guid_cmd = [system_path["qubes_guid_path"], "-d", str(xid), "-c", self.label.color, "-i", self.label.icon_path, "-l", str(self.label.index)]
|
guid_cmd = [system_path["qubes_guid_path"],
|
||||||
|
"-d", str(xid),
|
||||||
|
"-c", self.label.color,
|
||||||
|
"-i", self.label.icon_path,
|
||||||
|
"-l", str(self.label.index)]
|
||||||
|
guid_cmd += extra_guid_args
|
||||||
if self.debug:
|
if self.debug:
|
||||||
guid_cmd += ['-v', '-v']
|
guid_cmd += ['-v', '-v']
|
||||||
retcode = subprocess.call (guid_cmd)
|
retcode = subprocess.call (guid_cmd)
|
||||||
|
@ -325,15 +325,19 @@ class QubesHVm(QubesVm):
|
|||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def start_guid(self, verbose = True, notify_function = None):
|
def start_guid(self, verbose = True, notify_function = None, **kwargs):
|
||||||
# If user force the guiagent, start_guid will mimic a standard QubesVM
|
# If user force the guiagent, start_guid will mimic a standard QubesVM
|
||||||
if self.guiagent_installed:
|
if self.guiagent_installed:
|
||||||
super(QubesHVm, self).start_guid(verbose, notify_function)
|
super(QubesHVm, self).start_guid(verbose, notify_function, extra_guid_args=["-Q"], **kwargs)
|
||||||
else:
|
else:
|
||||||
if verbose:
|
if verbose:
|
||||||
print >> sys.stderr, "--> Starting Qubes GUId..."
|
print >> sys.stderr, "--> Starting Qubes GUId..."
|
||||||
|
|
||||||
retcode = subprocess.call ([system_path["qubes_guid_path"], "-d", str(self.stubdom_xid), "-c", self.label.color, "-i", self.label.icon_path, "-l", str(self.label.index)])
|
retcode = subprocess.call ([system_path["qubes_guid_path"],
|
||||||
|
"-d", str(self.stubdom_xid),
|
||||||
|
"-c", self.label.color,
|
||||||
|
"-i", self.label.icon_path,
|
||||||
|
"-l", str(self.label.index)])
|
||||||
if (retcode != 0) :
|
if (retcode != 0) :
|
||||||
raise QubesException("Cannot start qubes-guid!")
|
raise QubesException("Cannot start qubes-guid!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user