Fix and improvements from Marek's comments

This commit is contained in:
Frédéric Pierret (fepitre) 2019-11-27 23:38:02 +01:00
parent 0e049e682a
commit f7fa577c47
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
4 changed files with 19 additions and 18 deletions

View File

@ -13,7 +13,7 @@ install:
install -d $(DESTDIR)/etc/xdg/autostart
install -m 0644 etc/qvm-start-daemon.desktop $(DESTDIR)/etc/xdg/autostart/
install -d $(DESTDIR)/usr/bin
ln -sf /usr/bin/qubes-start-daemon $(DESTDIR)/usr/bin/qubes-start-gui
ln -sf qvm-start-daemon $(DESTDIR)/usr/bin/qvm-start-gui
clean:
rm -rf test-packages/__pycache__ qubesadmin/__pycache__

View File

@ -3,6 +3,11 @@
:program:`qvm-start-daemon` -- start GUI/AUDIO for qube(s)
=========================================================
.. note::
`qvm-start-gui` has been renamed to `qvm-start-daemon` as it handles now
`gui` and `audio`.
.. warning::
This page was autogenerated from command-line parser. It shouldn't be 1:1

View File

@ -0,0 +1 @@
qvm-start-daemon.rst

View File

@ -409,23 +409,18 @@ class DAEMONLauncher:
for vm in self.app.domains:
if vm.klass == 'AdminVM':
continue
if getattr(vm, 'guivm', None) == vm.app.local_name:
if vm.features.check_with_template('gui', True):
power_state = vm.get_power_state()
if power_state == 'Running':
asyncio.ensure_future(
self.start_gui(vm, monitor_layout=monitor_layout))
elif power_state == 'Transient':
# it is still starting, we'll get 'domain-start'
# event when fully started
if vm.virt_mode == 'hvm':
asyncio.ensure_future(
self.start_gui_for_stubdomain(vm))
if getattr(vm, 'audiovm', None) == vm.app.local_name:
if vm.features.check_with_template('audio', True):
power_state = vm.get_power_state()
if power_state == 'Running':
asyncio.ensure_future(self.start_audio(vm))
power_state = vm.get_power_state()
if power_state == 'Running':
asyncio.ensure_future(
self.start_gui(vm, monitor_layout=monitor_layout))
asyncio.ensure_future(self.start_audio(vm))
elif power_state == 'Transient':
# it is still starting, we'll get 'domain-start'
# event when fully started
if vm.virt_mode == 'hvm':
asyncio.ensure_future(
self.start_gui_for_stubdomain(vm))
def register_events(self, events):
"""Register domain startup events in app.events dispatcher"""