From 3e067a3ef5066e5da4b04e98819419952bb45a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 26 Apr 2017 01:11:47 +0200 Subject: [PATCH] vm: run_service(): require user session running only when need gui access User session may not be started at all (for example no qubes packages installed there), so don't block it in all the cases. Also this would prevent running 'qubes.WaitForSession' service... In practice, default value for 'gui' argument is False, so in most cases user session will be ignored. Which doesn't matter in most cases - especially for services called by qubesd. --- qubes/vm/qubesvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 23c0ece1..456cbc17 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1048,7 +1048,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): raise qubes.exc.QubesVMError( self, 'Domain {!r}: qrexec not connected'.format(self.name)) - if not self.have_session.is_set(): + if gui and not self.have_session.is_set(): raise qubes.exc.QubesVMError(self, 'don\'t have session yet') self.fire_event_pre('domain-cmd-pre-run', start_guid=gui)