Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Latin American keyboard layout on IBus for Debian Bullseye doesn't work; Spanish layout is applied instead

+0
−0

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?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

+0
−0

(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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+0
−0

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:

  1. Open the file /usr/share/ibus/component/simple.xml using sudo, and your editor of choice.

  2. 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 &lt;shawn.p.huang@gmail.com&gt;</author>
        <layout>es</layout>
        <longname>Spanish</longname>
        <description>Spanish</description>
        <icon>ibus-keyboard</icon>
        <rank>50</rank>
    </engine>
    
  3. 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, from xkb:es::spa to xkb:latam::spa.
    • layout, from es to latam.
    • 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 &lt;shawn.p.huang@gmail.com&gt;</author>
        <layout>es</layout>
        <longname>Spanish</longname>
        <description>Spanish</description>
        <icon>ibus-keyboard</icon>
        <rank>50</rank>
    </engine>
    
  4. Once the new engine is added, save the file.

  5. Restart the IBus service, by issuing the command ibus restart.

  6. 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
    
  7. Using ibus-setup or ibus engine, set the layout to the one you previosuly created. At this point, it should work.

I hope this works for you. :)

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »