Default im-config configuration

im-config does two things:

  1. It launches an input method framework (e.g. IBus or Fcitx)

  2. It sets a few environment variables which are needed for the input method engines to work.

In standard Ubuntu, which uses GNOME and where IBus is integrated, im-config does not matter much by default. GNOME launches IBus and configures a couple of variables anyway. The presence of im-config is useful though for users who want to use some other IM framework but IBus.

In the Ubuntu flavors the im-config default configuration is of greater importance. For a few cycles now it has worked this way:

  • In MATE, Kylin and Unity im-config has been configured to launch and configure an IM framework by default, i.e. provided that such a thing has been installed, of course.

  • In the other flavors im-config has been configured to launch and configure an IM framework by default only in the case of a CJKV locale.

The reason for the latter is that users who donā€™t need an input method reported more or less subtle issues which were only present when e.g. IBus or Fcitx was running and configured.

However, this choice leads to confusion for some input method users. Take a Kubuntu user, for instance, who installs the system in English. Then they install some IBus input method, which also pulls IBus itself if not already installed. But ā€œit still does not workā€, and the reason is that - due to the current default configuration - they also need to explicitly select ā€œibusā€ via im-config.

The latest example I saw is this Ask Ubuntu question:

https://askubuntu.com/questions/1256521/ibus-does-not-start-automatically-on-kubuntu

My belief is that it would be better to change the default im-config configuration for other flavors but MATE, Kylin and Unity so it launches and configures an IM framework by default irrespective of the system locale.

To the extent the subtle issues I mentioned for non-IM users are still there, one way for a flavor to handle it is to not include any IM framework on the ISO. Thatā€™s not an option for Lubuntu, though, since it uses Fcitx for managing all input sources, i.e. also XKB keyboard layouts.

I would appreciate feedback on my suggestion from the leaders of the affected flavors.

Ping: @acheron, @tsimonq2, @fossfreedom, @eeickmeyer

(also pinged Sean Davis on IRC)

To the extent the subtle issues I mentioned for non-IM users are still there, one way for a flavoUr to handle it is to not include any IM framework on the ISO.

Not possible for Kubuntu at the moment, as the emoji picker in plasma requires all the /usr/share/ibus/dicts/ in ā€˜ibus-dataā€™, and ibus-data ā€˜Recommendsā€™ ibus, so that gets pulled in.

I was pondering setting ā€˜run_im noneā€™ in the users .xinputrc, as in Groovy the ibus GTK tray icon starts, as starting that is not acceptable. This did not happen in Focal with the ibus/im-config in that release.

Ok, so ibus is installed by default in Kubuntu. Didnā€™t know that.

Thatā€™s odd. im-config ought to default to ā€œnoneā€ in Kubuntu also in groovy (unless you have a CJKV locale). Can it be that KDE starts ibus-daemon by default in groovy just as GNOME does?

But your message is a bit sadā€¦ The Ask Ubuntu question I posted above was submitted by a Kubuntu user.

The change making it start by default came with the im-config changes that landed in Groovy. I tested that by reverting to the earlier packages, and the autostart went away. KDE/Plasma did not change in that regard.

Maybe setting ā€˜run_im cjkvā€™ makes more sense then.

That sounds worrying, and was certainly not intended. Will take a closer look.

@acheron: I figured out what the problem is. Itā€™s my fault.

In im-config 0.44.1-1ubuntu1 I made some preparations aiming to eliminate the Ubuntu/Debian delta, i.e. in the hope that we will soon be able to use the very same source code in Ubuntu as in Debian. Specifically I edited /etc/default/im-config and changed this line:

if [ -n "$desktop" ]; then

to

if [ -n "$desktop" ] || ! dpkg-vendor --is ubuntu; then

However, the dpkg-vendor command is provided by the dpkg-dev package, which is not installed by default, so the code fails with the result that the default mode is always set to ā€œautoā€.

One way to fix it would be to add dpkg-dev to the runtime dependencies in im-config. However, that would pull a bunch of other packages with 29 MB archive space and 131 MB disk spaceā€¦

@seb128, are you able to provide some advice here? Is there any smarter way to distinguish Ubuntu (with flavors) from other Debian based distros at runtime?

@Gunnar, the depends would be better idea, a rather standard way to do that is to use e.g

lsb_release -i -s` = ā€œUbuntuā€

Thanks @seb128! Changing that line to:

if [ -n "$desktop" -o "$(lsb_release -is)" != 'Ubuntu' ]; then

seems to do it. Tried it successfully on Kubuntu groovy.

(I have already polluted the Debian repo with this bug, so Iā€™d better start fixing it thereā€¦)

Just catching up. I am embarrassed to say that I looked at that line, but I did not remember that dpkg-dev would not be installed by default! Thanks for the analysis, and looking forward to a fix.

@acheron: The groovy issue has been fixed in im-config 0.44.1-1ubuntu3.

But now back to my original idea, i.e. making im-config launch and configure an IM framework by default.

How about changing the ibus Recommends in ibus-data to a Suggests? Your case shows that ibus-data may well be used without ibus (which Depends on ibus-data, btw.) AFAICT that would open for the suggested improvement for Kubuntu input method users.

Demoting to suggests would be ideal from my point of view. I HAVE been meaning to file a bug on this for a while, but what with one thing and another, have not quite got to doing it.

1 Like

https://bugs.debian.org/964558

@acheron: Now, when the ibus recommend has been dropped from ibus-data, is it ok if I make that change to im-config for Kubuntu as proposed in the beginning of this topic?

When release upgrading, the user is prompted to remove ibus as obsolete if they didnā€™t make use of it previously, so few non-IM users ought to be bothered.

@tsimonq2, @wxl: Your input as regards Lubuntu would be valuable.

@gunnarhj That seems fine to me. If it is to be done, sooner than later is better for testing. :slight_smile:

1 Like

I have changed it so im-config always launches and configures an IM framework (if any) on Kubuntu and Xubuntu. (The latter does not ship any IM framework on the ISO.)

Lubuntu ships Fcitx on the ISO, so keeping the ā€œcjkvā€ behavior there for now.

I just installed KDE Plasma 5 from Ubuntu and I canā€™t type any accent character by using any Jetbrains ide like Webstorm.

Log:
** (ibus-ui-emojier:38887): WARNING **: 11:50:09.208: AT-SPI: Could not obtain desktop path or name

  • (zenity:48032): WARNING **: 11:50:09.201: atk-bridge: GetRegisteredEvents returned message with unknown signature

~ lsb_release -a 1 err
No LSB modules are available.
Distributor ID: Pop
Description: Pop!_OS 21.04
Release: 21.04
Codename: hirsute

Why was it released so wrong?

Whatā€™s wrong?

Looks like you posted this in the wrong place.

  • This is not a support forum, so off topic here.

  • Off topic also at Ask Ubuntu, since Pop!_OS is not an official Ubuntu flavor.

  • You may want to try https://unix.stackexchange.com or some support resource specific to Pop!_OS or KDE.