Skip to content

Commit

Permalink
qvm-start-gui: handle GuiVM
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Oct 18, 2019
1 parent 1d3a214 commit a8db3d4
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 67 deletions.
14 changes: 9 additions & 5 deletions qubesadmin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ def __init__(self):

def list_vmclass(self):
"""Call Qubesd in order to obtain the vm classes list"""
vmclass = self.qubesd_call('dom0', 'admin.vmclass.List')\
vmclass = self.qubesd_call('dom0', 'admin.vmclass.List') \
.decode().splitlines()
return sorted(vmclass)

def list_deviceclass(self):
"""Call Qubesd in order to obtain the device classes list"""
deviceclasses = self.qubesd_call('dom0', 'admin.deviceclass.List')\
deviceclasses = self.qubesd_call('dom0', 'admin.deviceclass.List') \
.decode().splitlines()
return sorted(deviceclasses)

Expand Down Expand Up @@ -226,6 +226,10 @@ def remove_pool(self, name):
""" Remove a storage pool """
self.qubesd_call('dom0', 'admin.pool.Remove', name, None)

@staticmethod
def get_local_name():
return os.uname()[1]

def get_label(self, label):
"""Get label as identified by index or name
Expand Down Expand Up @@ -715,8 +719,8 @@ def run_service(self, dest, service, filter_esc=False, user=None,
kwargs.setdefault('stderr', subprocess.PIPE)
proc = subprocess.Popen(
[qubesadmin.config.QREXEC_CLIENT_VM] +
qrexec_opts +
[dest or '', service] +
(shlex.split(localcmd) if localcmd else []),
qrexec_opts +
[dest or '', service] +
(shlex.split(localcmd) if localcmd else []),
**kwargs)
return proc
Loading

0 comments on commit a8db3d4

Please sign in to comment.