From 3891913d1bd3aa71f81ad3e8214d12a08d311e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 4 Dec 2013 03:02:39 +0100 Subject: [PATCH] hvm: fetch and recreate appmenus when VM reports tools presence (#56 pro) --- qubes-rpc/qubes-notify-tools | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qubes-rpc/qubes-notify-tools b/qubes-rpc/qubes-notify-tools index 47a4b0c2..2869dc92 100755 --- a/qubes-rpc/qubes-notify-tools +++ b/qubes-rpc/qubes-notify-tools @@ -3,6 +3,7 @@ import os import re import sys +import subprocess from qubes.qubes import QubesVmCollection,QubesException,QubesHVm from qubes.qubes import xs @@ -73,6 +74,12 @@ def main(): source_vm.default_user = user qvm_collection.save() + + retcode = subprocess.call(['qvm-sync-appmenus', '--force-rpc']) + if retcode == 0 and hasattr(source_vm, 'appmenus_recreate'): + # TODO: call the same for child VMs? This isn't done for Linux VMs, + # so probably should be ignored for Windows also + source_vm.appmenus_recreate() except Exception as e: print >> sys.stderr, e.message exit(1)