From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 16BC364957 for ; Mon, 20 Jul 2020 18:00:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 033EC1047C for ; Mon, 20 Jul 2020 18:00:28 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 9D1A51046C for ; Mon, 20 Jul 2020 18:00:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 51F4B4321B for ; Mon, 20 Jul 2020 18:00:26 +0200 (CEST) To: Proxmox VE development discussion , Stoiko Ivanov References: <20200720145429.18260-1-s.ivanov@proxmox.com> From: Thomas Lamprecht Message-ID: <0a383702-d731-c6f5-287d-148c685ae300@proxmox.com> Date: Mon, 20 Jul 2020 18:00:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Thunderbird/79.0 MIME-Version: 1.0 In-Reply-To: <20200720145429.18260-1-s.ivanov@proxmox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.010 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH installer] set console keymap on language selection X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 16:00:58 -0000 On 20.07.20 16:54, Stoiko Ivanov wrote: > This is an enhancement for #2804 > > Having a shell waiting on vt3, it improves user experience if it has the > same keyboard map as the X11 installer. > > This is accomplished by setting the contents of '/etc/default/keyboard' see > keyboard (5) and then running setupcon (1). Simply calling `loadkeys` would not > work, since the keymaps in debian are generated from the x11 definitions by > ckbcomp and then saved in '/etc/console-setup/'. > > Signed-off-by: Stoiko Ivanov > --- > roughly tested with a PBS-iso (can provide should someone else want to test it) > in a VM (clicking on french yielded azerty, clicking on german qwertz,...) both > worked. (just in case also tried getting rid of the setxkbmap call - setupcon > does not magically set the keyboard map of a running X session) > proxinstall | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/proxinstall b/proxinstall > index 556c509..83ac95e 100755 > --- a/proxinstall > +++ b/proxinstall > @@ -2668,8 +2668,19 @@ sub create_country_view { > if (my $kmap = $cmap->{kmaphash}->{$sel}) { > my $xkmap = $cmap->{kmap}->{$kmap}->{x11}; > my $xvar = $cmap->{kmap}->{$kmap}->{x11var}; > - syscmd ("setxkbmap $xkmap $xvar") if !$opt_testmode; > $keymap = $kmap; > + > + if (! $opt_testmode) { > + syscmd ("setxkbmap $xkmap $xvar"); > + my $kbd_config = qq{ > + XKBLAYOUT="$xkmap" > + XKBVARIANT="$xvar" > + BACKSPACE="guess" > + }; > + $kbd_config =~ s/^\t{2} {4}//; pretty fragile, a indentation change breaks this... why not s/^\s+//; > + write_config($kbd_config, '/etc/default/keyboard'); > + syscmd ("setupcon"); > + } > } > }); > >