[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: im-config | Use im-config on Wayland without uninstalling IBus (!5)



Hi again,

I'll start with giving a concrete example of how the proposed change may lead users into setting a bad configuration. After that replies to parts of Changwoo's message follow.

On Ubuntu we make use of the im-config API to provide a simpler UI component for user settings. The options we show are the options which "im-config -l" output plus "none". The attached image shows what it looks like.

With Changwoo's MR, and if you enter an Ubuntu on Wayland session with no ~/.xinputrc file, the current value of that UI is "none". If a user wants to use some IBus input method, it's not unlikely that they will change it to "IBus", since that's the intuitively right setting, and with that unconsciously break other things on the desktop.

There is also a myriad of tutorials and answers on the web which recommend just that. These are two examples:

https://sites.google.com/site/xiangyangsite/home/technical-tips/linux-unix/common-tips/install-ibus-for-chinese-input-on-ubuntu

https://askubuntu.com/questions/59356/how-do-i-get-chinese-input-to-work/667295


On 2020-05-23 01:43, Changwoo Ryu wrote:
2020년 5월 22일 (금) 오후 7:09, Gunnar Hjalmarsson <gunnarhj@ubuntu.com>님이 작성:
GNOME on Wayland complicates it a bit. The GNOME developers prescribe
that the GTK_IM_MODULE environment variable should be unset (or set to
"wayland"), or else you can expect to run into issues. One known example
is that if you set GTK_IM_MODULE=ibus on GNOME on Wayland, the On Screen
Keyboard (OSK), which is an important accessibility feature, breaks.
This is not a bug but a result of misconfiguration according to the
GNOME devs, who have no intention to change it.

The GNOME upstream assumes it and that's what upstreams often do (and
it often annoys). The upstream just want users to use GNOME without
setting anything or even knowing "IBus" or what an IM is. A
configuration program like im-config or using non-IBus IMs is also
against that assumption. I'm saying that we are not exactly following
assumptions set by upstream. im-config should do what it does.

Yes, sadly enough the GNOME devs have made the strategic decision to integrate only IBus and ignore other IM frameworks. There is not much we can do about that, so when a user chooses to use a non-IBus engine on GNOME, they do it at their own risk.

But IBus is cherished by GNOME. And for that reason, in case of GNOME on Wayland, the IBus configuration set by im-config should better be in accordance with what the GNOME devs prescribe.

In other word, Gunnar's proposal of not-setting *_IM_MODULE means just
to use GNOME default without setting anything. It's same with setting
"none" in im-config. Then why should "none" choice be hidden in "IBus"
choice only in GNOME Wayland, ignoring some users who want to set
GTK_IM_MODULE=ibus?

Because the alternative proposed by you would cause confusion and lead users into setting a bad configuration.

The reasonable default is important but the "ibus" choice is
not exactly the default. If users have set "ibus" to get the best
default, they have been misinformed.

Nobody has claimed that "ibus" is equivalent to "default", even if the solution I argue for means that they lead to the same result in case of GNOME on Wayland.

im-config(8) clearly states that it sets the environment variables:

     The im-config hook script, /etc/X11/Xsession.d/70im-config_launch,
     exports following variables to X programs: $XMODIFIERS,
     $GTK_IM_MODULE, $QT_IM_MODULE, $QT4_IM_MODULE, and
     $CLUTTER_IM_MODULE

And when IBus is selected im-config, it clearly states it uses
ibus-gtk and ibus-gtk3. These packages contain GTK immodule files for
GTK_IM_MODULE=ibus.

  * Application platform support:
    * GNOME/GTK+: ibus-gtk and ibus-gtk3 (both)

That's true. Consequently there is a need to modify that man page. The current wording, which was formulated long before we tried to address the GNOME on Wayland environment, is a poor argument in a discussion on what's the most proper behavior today.

Users usually don't have to set anything. The default "auto" will
choose "none" for GNOME Wayland and "ibus" for else.

It's not the default we discuss here. We are agreed on which configuration im-config should set by default.

When users set "ibus" explicitly, they want IBus. And IBus should be
used as documented.

That's an invention by you to justify your MR. I'd say that users who set "ibus" do it in order to be able to use an IBus engine, and rely on im-config doing the right thing.

A few months ago a mutter bug was introduced which affects the use of
ibus-hangul on GNOME on Wayland adversely. One way for ibus-hangul users
to work around that bug is to set GTK_IM_MODULE=ibus. My understanding
is that this bug is the reason why Changwoo started to question the
current logic. He wants to be able to deal with that mutter bug via the
im-config user interface.

I didn't say that. But this important issue is one example of why some
users don't want the GNOME default.

The only example AFAIU. And the mutter bug is well identified. Why don't you make an effort to have that bug fixed instead? You shouldn't establish an unintuitive UI in order to work around a bug!

It's not just matter of specific bugs. Some users don't want GNOME
default and prefer IBus immodules even if it is buggy in some cases.

"Don't want"? Under normal conditions (the mutter/ibus-hangul issue being an exception) setting GTK_IM_MODULE=ibus on GNOME on Wayland is bad configuration. And the UI we provide should not lead users into choosing a bad configuration. It should help them do The Right Thing.

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

Attachment: ubuntu-im-framework-ui.png
Description: PNG image


Reply to: