From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#40456: Invalid keyboard layouts pass through Date: Sun, 05 Apr 2020 22:59:28 +0200 Message-ID: <87zhbphcnj.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52191) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLCNA-0002of-8f for bug-guix@gnu.org; Sun, 05 Apr 2020 17:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLCN9-0004DI-B9 for bug-guix@gnu.org; Sun, 05 Apr 2020 17:00:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLCN9-0004D6-8Q for bug-guix@gnu.org; Sun, 05 Apr 2020 17:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jLCN9-0000JP-73 for bug-guix@gnu.org; Sun, 05 Apr 2020 17:00:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:52158) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLCMe-0002mQ-2Z for bug-guix@gnu.org; Sun, 05 Apr 2020 16:59:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jLCMd-0003z3-Vt for bug-guix@gnu.org; Sun, 05 Apr 2020 16:59:32 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39632 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jLCMd-00047T-9T for bug-guix@gnu.org; Sun, 05 Apr 2020 16:59:31 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 40456@debbugs.gnu.org Hello, After a painful debugging session where I was blaming GDM for not using the right keyboard layout, I found that I had specified an invalid keyboard layout variant, as in: (keyboard-layout "fr" "does-not-exist") =E2=80=98ckbcomp=E2=80=99 would build a layout for the console just fine, o= nly with a warning. Xorg would switch to the default =E2=80=9Cfr=E2=80=9D layout (whi= ch exists) and ignore the =E2=80=9Cdoes-not-exist=E2=80=9D variant. However, GNOME Shell would reject it in =E2=80=98keyboardManager.js=E2=80= =99 because: [found, , , _layout, _variant] =3D this._xkbInfo.get_layout_info(id); returns =E2=80=98found =3D false=E2=80=99 since =E2=80=98fr+does-not-exist= =E2=80=99 is not found, and thus goes on to use the US layout: if (found) return { layout: _layout, variant: _variant }; else return { layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT }; (This is just for GNOME Shell because again, Xorg itself installs the =E2=80=9Cfr=E2=80=9D layout, as can be seen if you start ratpoison or simil= ar.) Long story short: it would be great if invalid keyboard layouts were caught when the system is instantiated. It could be =E2=80=98ckbcomp=E2=80= =99 errorring out, or we could have additional code that browses xkeyboard-config=E2=80= =99s =E2=80=98base.xml=E2=80=99 file. Ludo=E2=80=99.