From 28b8eb04454dc74e5774e03542331db0c88fe033 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sun, 11 Aug 2013 04:08:54 +0200 Subject: [PATCH] Send monitor layout at VM startup. Gui daemon isn't aware of multihead parameters, also gui protocol doesn't support such information - currently by design it is configured via Qubes RPC service. At GUI startup send monitor layout to the VM. --- core-modules/000QubesVm.py | 8 ++++++++ core/qubes.py | 1 + 2 files changed, 9 insertions(+) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 5765886e..0bebff10 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1344,6 +1344,14 @@ class QubesVm(object): if (retcode != 0) : raise QubesException("Cannot start qubes-guid!") + if verbose: + print >> sys.stderr, "--> Sending monitor layout..." + + try: + subprocess.call([system_path["monitor_layout_notify_cmd"], self.name]) + except Exception as e: + print >>sys.stderr, "ERROR: %s" % e + if verbose: print >> sys.stderr, "--> Waiting for qubes-session..." diff --git a/core/qubes.py b/core/qubes.py index 5ef6ba09..2e21d6f7 100755 --- a/core/qubes.py +++ b/core/qubes.py @@ -61,6 +61,7 @@ system_path = { 'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh', 'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh', + 'monitor_layout_notify_cmd': '/usr/bin/qubes-monitor-layout-notify', } vm_files = {