From 2e72f75611a33c5193e47008693637aae5b570f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Tue, 17 Mar 2020 15:27:58 +0100 Subject: [PATCH] qvm-start-daemon: allow multiple options in keyboard layout --- qubesadmin/tools/qvm_start_daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubesadmin/tools/qvm_start_daemon.py b/qubesadmin/tools/qvm_start_daemon.py index 5ccf69a..edb4db3 100644 --- a/qubesadmin/tools/qvm_start_daemon.py +++ b/qubesadmin/tools/qvm_start_daemon.py @@ -127,7 +127,9 @@ def set_keyboard_layout(vm): xkb_rules_names = subprocess.check_output( ['xprop', '-root', '_XKB_RULES_NAMES']).decode() xkb_parsed = re.match(xkb_re, xkb_rules_names) - xkb_layout = [x.split(',')[0] for x in xkb_parsed.groups()[2:5]] + xkb_layout = [x.split(',')[0] for x in xkb_parsed.groups()[2:4]] + # We keep all options + xkb_layout.append(xkb_parsed.group(5)) keyboard_layout = '+'.join(xkb_layout) vm.features['keyboard-layout'] = keyboard_layout except subprocess.CalledProcessError as e: