From: "Ludovic Courtès" <ludo@gnu.org>
To: 40456@debbugs.gnu.org
Subject: bug#40456: Invalid keyboard layouts pass through
Date: Sun, 05 Apr 2020 22:59:28 +0200 [thread overview]
Message-ID: <87zhbphcnj.fsf@inria.fr> (raw)
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")
‘ckbcomp’ would build a layout for the console just fine, only with a
warning. Xorg would switch to the default “fr” layout (which exists)
and ignore the “does-not-exist” variant.
However, GNOME Shell would reject it in ‘keyboardManager.js’ because:
[found, , , _layout, _variant] = this._xkbInfo.get_layout_info(id);
returns ‘found = false’ since ‘fr+does-not-exist’ 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
“fr” layout, as can be seen if you start ratpoison or similar.)
Long story short: it would be great if invalid keyboard layouts were
caught when the system is instantiated. It could be ‘ckbcomp’ errorring
out, or we could have additional code that browses xkeyboard-config’s
‘base.xml’ file.
Ludo’.
next reply other threads:[~2020-04-05 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 20:59 Ludovic Courtès [this message]
2021-03-04 17:01 ` bug#40456: Invalid keyboard layouts pass through Brice Waegeneire via web
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhbphcnj.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=40456@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).