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 2656B64A28 for ; Mon, 20 Jul 2020 18:03:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 207441081F for ; Mon, 20 Jul 2020 18:03:03 +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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id DE9EE10810 for ; Mon, 20 Jul 2020 18:03:01 +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 A66D1431D9 for ; Mon, 20 Jul 2020 18:03:01 +0200 (CEST) Date: Mon, 20 Jul 2020 18:02:59 +0200 From: Stoiko Ivanov To: Thomas Lamprecht Cc: Proxmox VE development discussion Message-ID: <20200720180259.2bcf4459@rosa.proxmox.com> In-Reply-To: <0a383702-d731-c6f5-287d-148c685ae300@proxmox.com> References: <20200720145429.18260-1-s.ivanov@proxmox.com> <0a383702-d731-c6f5-287d-148c685ae300@proxmox.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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:03:03 -0000 On Mon, 20 Jul 2020 18:00:25 +0200 Thomas Lamprecht wrote: > 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+//; sounds much better - will send a v2 thanks! > > > + write_config($kbd_config, '/etc/default/keyboard'); > > + syscmd ("setupcon"); > > + } > > } > > }); > > > > >