From f7e55361e4e0510c139110d3aa2fa8014fb6ee7a Mon Sep 17 00:00:00 2001 From: Muqtadir Date: Sun, 6 Nov 2022 17:37:18 +0530 Subject: [PATCH] detect if in virtual env and prompt to install open-vm-tools (#41) * test option for virtualization * add placeholder text and title * make use of hypervisor to identify if in vm * update recipe.json based on @kra-mo suggestion Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> * Update recipe.json Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> --- recipe.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/recipe.json b/recipe.json index f3c334f..cc2e0c2 100644 --- a/recipe.json +++ b/recipe.json @@ -118,6 +118,31 @@ } ] }, + "vm": { + "template": "yes-no", + "display-conditions": [ + "grep 'hypervisor' /proc/cpuinfo" + ], + "icon": "application-x-appliance-symbolic", + "title": "Open VM Tools", + "description": "Choose whether to install Open VM Tools for the virtual machine.", + "buttons": { + "yes": "Yes, install", + "no": "Skip", + "info": { + "type": "text", + "title": "About Open VM Tools", + "text": "Open VM Tools can be used in GNOME Boxes." + } + }, + "final": [ + { + "if": "vm", + "type": "command", + "commands": ["sudo apx --sys install -y open-vm-tools"] + } + ] + }, "extra": { "template": "preferences", "icon": "vanilla-puzzle-piece-symbolic",