Latin American keyboard layout on IBus for Debian Bullseye doesn't work; Spanish layout is applied instead
The following question was asked by SE user RAKK. The original source can be found here.
I am running Debian 11 Bullseye for AMD64 on an HP Pavillion Touch 14-N009LA laptop, using IBus and MATE as desktop environment, having upgraded recently from Buster. Prior to upgrading point release, I could use the Latin American keyboard layout with IBus; afterwards, I am no longer able to do so.
The Keyboard Preferences app on MATE Control Center shows the Latin American Spanish layout, and I can manually set it with setxkbmap latam
on a terminal (before IBus kicks in and replaces it), but on IBus I am only presented with the "Spanish" keyboard, which corresponds to the Spaniard Spanish keyboard that has different punctuation keys; there is no option for "Latin American" or anything similar.
Running ibus list-engine
gives me the following output, in which I can't see the Latin American Spanish layout, and no matches for latam
or anything similar:
/* irrelevant languages omitted> */
language: Spanish
xkb:es:nodeadkeys:spa - Spanish (no dead keys)
xkb:es:sundeadkeys:spa - Spanish (Sun dead keys)
xkb:es:winkeys:spa - Spanish (Windows)
xkb:es:dvorak:spa - Spanish (Dvorak)
xkb:es:deadtilde:spa - Spanish (dead tilde)
xkb:es:mac:spa - Spanish (Macintosh)
xkb:es::spa - Spanish
/* irrelevant languages omitted */
So far I could only find a guide that only seems to apply to Ubuntu, and the Arch Linux guide for IBus.
The former guide suggested that maybe I had to generate a Spanish locale for my system, which I did by uncommenting the es-MX
locales from /etc/locale.gen
and then running locale-gen
. Afterwards, I rebooted my system. It didn't work.
Any other idea on how could I use the Latin American Spanish layout on IBus for Debian Bullseye?
2 answers
(This answer updates this one.)
This issue seems to be fixed in IBus 1.5.27.
As this commit shows, the offending line xkb:latam:*:*
has been deleted from engines/denylist.txt
, which now allows for Latin American layouts to be bundled at build time.
Relevant GitHub issue: #2412.
As of 2025-02-15, this change is the latest one, so Latin American layouts are still bundled in IBus 1.5.31 and 1.5.32-beta2.
0 comment threads
I answered this question over SE, as it can be found here.
UPDATE. I've found that the latest commit in the IBus source has the blacklist already implemented, and that all Latin American layouts are blacklisted by default.
This affects the generation process, which is done with a Python script on build time, which in turn, sources the available X layouts from /usr/share/X11/xkb/rules/evdev.xml
, as this comment clearly states.
The exact commit on which this restriction was implemented is here. As for the reason why this was done, is honestly beyond me, and until this situation is properly addressed, the fix I propose below must be applied every time IBus is updated (as stated in this previous answer).
I've faced the same problem in Xubuntu 22.04, and recently used a workaround that involves editing a whitelist.
Even though it's been suggested that IBus 1.5.23 would include a blacklist, in place of the currently used whitelist, so that engines added would automatically appear as selectable layouts, it seems this feature is yet to be implemented (I have version 1.5.26 right now).
What I did to make it work is as follows:
-
Open the file
/usr/share/ibus/component/simple.xml
usingsudo
, and your editor of choice. -
Locate the
xkb:es::spa
engine. In my machine, it looks like this:<engine> <name>xkb:es::spa</name> <language>es</language> <license>GPL</license> <author>Peng Huang <shawn.p.huang@gmail.com></author> <layout>es</layout> <longname>Spanish</longname> <description>Spanish</description> <icon>ibus-keyboard</icon> <rank>50</rank> </engine>
-
Once found, copy the
<engine>
tag and paste it beside it (as a sibling, on the same level), and change the following tag values:-
name
, fromxkb:es::spa
toxkb:latam::spa
. -
layout
, fromes
tolatam
. -
longname
, to any text of your choice so that you can distinguish it from other layouts.
It should now look like this:
<!-- I added this one. vvv --> <engine> <name>xkb:latam::spa</name> <language>es</language> <license>GPL</license> <author>Aura Lesse Programmer</author> <layout>latam</layout> <longname>Spanish Latam</longname> <description>Spanish Latam</description> <icon>ibus-keyboard</icon> <rank>50</rank> </engine> <!-- I added this one. ^^^ --> <engine> <name>xkb:es::spa</name> <language>es</language> <license>GPL</license> <author>Peng Huang <shawn.p.huang@gmail.com></author> <layout>es</layout> <longname>Spanish</longname> <description>Spanish</description> <icon>ibus-keyboard</icon> <rank>50</rank> </engine>
-
-
Once the new engine is added, save the file.
-
Restart the IBus service, by issuing the command
ibus restart
. -
Once IBus restarts, type
ibus list-engine
and check that the new engine appears in the list.In my machine, I have the following configurations. The one I added is
Spanish Latam
.$ ibus list-engine | grep -A 7 Espa idioma: Español xkb:es:nodeadkeys:spa - Spanish (no dead keys) xkb:es:winkeys:spa - Spanish (Windows) xkb:es:dvorak:spa - Spanish (Dvorak) xkb:es:deadtilde:spa - Spanish (dead tilde) xkb:latam::spa - Spanish Latam xkb:es:mac:spa - Spanish (Macintosh) xkb:es::spa - Spanish
-
Using
ibus-setup
oribus engine
, set the layout to the one you previosuly created. At this point, it should work.
I hope this works for you. :)
0 comment threads