Libibus, don’t mess up my keyboard

November 29th, 2022

Even if you’re not running the actual IBus daemon to handle your keyboard mapping, there is another way IBus can still mess up your customized layout. Personally I use a script which loads my own customizations using xkbcomp, but after starting either Teams or Zoom the layout is immediately fouled up. On MATE I could still quickly reset it back, but since Cinnamon seems to handle the keyboard differently, the old script doesn’t work any longer. Setting the layout manually to Finnish using Cinnamon settings and then running xkbcomp works, but is unnecessarily clumsy.

As far as I’ve understood, the culprit is libibus, which is used by both Teams and Zoom to read the keyboard. Initializing the library seems to proactively overwrite the current keymap, causing unnecessary headaches. Simply removing libibus isn’t possible, as it’s needed, so let’s start googling for a possible solution. A promising clue lead to dconf:

dconf dump /desktop/ibus/ > ibus.dconf

Not much there, but let’s add to [general] the following:

use-system-keyboard-layout=true

And then save the settings (hopefully permanently):

dconf load /desktop/ibus/ < ibus.dconf

So far so good. After starting the aforementioned troublemakers/programs, the keyboard layout still seems to be fine i.e. my own modifications are not overwritten. Should have done this years ago! It remains to be seen if dconf settings are retained between system restarts, but if not, I’ll just add the above magic to the script. I’ll edit this post if there’s any trouble in the future.

Filed under: linux,softat

Kommentin kirjoitus

You must be logged in to post a comment.

RSS feed for comments on this post.


Kommenttien virta

Aiheet