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.
This commit is contained in:
Marek Marczykowski 2013-08-11 04:08:54 +02:00
parent 42416504bb
commit 28b8eb0445
2 changed files with 9 additions and 0 deletions

View File

@ -1344,6 +1344,14 @@ class QubesVm(object):
if (retcode != 0) : if (retcode != 0) :
raise QubesException("Cannot start qubes-guid!") 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: if verbose:
print >> sys.stderr, "--> Waiting for qubes-session..." print >> sys.stderr, "--> Waiting for qubes-session..."

View File

@ -61,6 +61,7 @@ system_path = {
'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh', 'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh',
'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh', 'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh',
'monitor_layout_notify_cmd': '/usr/bin/qubes-monitor-layout-notify',
} }
vm_files = { vm_files = {