Invalid keyboard layouts pass through

  • Open
  • quality assurance status badge
Details
2 participants
  • Brice Waegeneire via web
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important

Debbugs page

L
L
Ludovic Courtès wrote on 5 Apr 2020 13:59
(address . bug-guix@gnu.org)
87zhbphcnj.fsf@inria.fr
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’.
L
L
Ludovic Courtès wrote on 19 Sep 2020 01:41
control message for bug #40456
(address . control@debbugs.gnu.org)
87imcatay8.fsf@gnu.org
severity 40456 important
quit
B
B
Brice Waegeneire via web wrote on 4 Mar 2021 09:01
Invalid keyboard layouts pass through
(address . 40456@debbugs.gnu.org)
7f9bd995bd40.8988a01ba6275e8@guile.gnu.org
We could listen from the WARNING: string on stderr of ckbcomp, or that dirty pipeline return 1 with an incorrect variant « setxkbmap -print fr foo | xkbcomp - -C »
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 40456@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40456
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch