Thanks for your reply, Osamu!
On 2022-04-22 11:49, Osamu Aoki wrote:
> This part of logic in 21_ibus.rc all started around:
> 38989f8 ("Show IBus icon on Budgie desktop", 2020-08-04) -- you
> 8b13771 ("Refactor with new find_match and document", 2020-08-07) -- me
Yep, I remember.
> Logic around here is a part which can be easily tangled as I recall.
> I now know GTK apps need `GTK_IM_MODULE=ibus` under GNOME on x11.
> That was different from what you told me when we discussed to create
> this part of code.
GTK_IM_MODULE=ibus was not needed at the time, but the mechanism which
made it work was broken in GNOME 42. So it's a regression.
>> I submitted this im-config merge request:
>>
>>
https://salsa.debian.org/input-method-team/im-config/-/merge_requests/15
>>
>> It works around the issue. Maybe we should use that on both Debian and
>> Ubuntu for now. In any case, unless some more proper solution comes
>> up very soon, I'm inclined to use it for a stable release update on
>> Ubuntu.
>
> I certainly agree that this patch seems to address stated issues for
> user of GNOME on x11. But is this the best fix?
It's a workaround, hopefully only temporary until we can do it properly
in the right package (maybe gnome-settings-daemon).
It's the urgency which motivates the workaround. Especially as regards
Ubuntu 22.04, which was released yesterday with the issue, but I suppose
we don't want a broken IBus on testing's GNOME on Xorg either.
> Let me first ask ask 2 key questions. Please help me:
>
> Q1: Does desktop starts `ibus-daemon --daemonize --xim` for GNOME on
> x11 ?
No. GNOME currently starts it like this:
/usr/bin/ibus-daemon --panel disable --xim
> Q2: Do we need to set `QT_IM_MODULE=ibus` under GNOME on x11?
No. That's already set by GNOME.
> Let me call your attention to the later part of 21_ibus.rc which sets
> following for non-GNOME in PHASE 1
>
> GTK_IM_MODULE=ibus
> QT_IM_MODULE=ibus
> CLUTTER_IM_MODULE=ibus
>
> So adding only GTK_IM_MODULE in place you proposed and still not
> running ibus-daemon and not setting other environment variables
> looked tangled way to address the issue.
Our original idea was to defer everything to GNOME. And GNOME still
starts ibus-daemon and sets XMODIFIERS and QT_IM_MODULE. So the only
thing we need to add through im-config is GTK_IM_MODULE.
> If we are to exclude "hands off list" for GNOME on x11, why not just
> do so and leave the rest of code shared. I mean if the answer to Q1
> and Q2 are yes and yes, I think it is cleaner to do the following
> patch:
But the answer to Q1 and Q2 are no and no. ;) And especially because of
the different way to start ibus-daemon (--panel disable) I think we
shouldn't go back to let im-config do things which are already done by
GNOME.
So for those reasons I think my merge request is better (even if it's a
workaround).
> Extra discussion: Was the Budgie:GNOME issue related to this? (Were
> Budgie:GNOME running under x11?)
Budgie is run under x11, and Budgie starts ibus-daemon and sets the same
variables as GNOME does. I don't know to which extent this new issue
affects Budgie. But OTOH, "GTK_IM_MODULE=ibus" won't hurt on x11.
Ack. The issue is different in Ubuntu, but the proposed workaround
applies to Ubuntu too. The Ubuntu bug includes a couple of links to
interesting upstream gnome-settings-daemon commits.
--
Cheers,
Gunnar