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

Bug#1009996: IBus broken on GNOME on x11



Hi Gunnar,

I don't use GNOME on x11 so you should know better than me.  Please read the
following first and please give me your thought.

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

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.

> 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?

Let me first ask ask 2 key questions.  Please help me:

Q1: Does desktop starts `ibus-daemon --daemonize --xim` for GNOME on x11 ?
Q2: Do we need to set `QT_IM_MODULE=ibus` under GNOME on x11?

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.

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:

```
$ git diff
diff --git a/data/21_ibus.rc b/data/21_ibus.rc
index 85cd3a2..45751b8 100644
--- a/data/21_ibus.rc
+++ b/data/21_ibus.rc
@@ -1,9 +1,10 @@
 # start IBus
 # vim: set sts=4 expandtab:
 
-# hands off to set up IM if listed in $DESKTOP_SETUP_IBUS
-if find_match "$IM_CONFIG_CURRENT_DESKTOP" "$DESKTOP_SETUP_IBUS" ; then
-    # ibus set up is owned by desktop --> do the same as "none"
+# hands off to set up IM if listed in $DESKTOP_SETUP_IBUS and wayland
+if find_match "$IM_CONFIG_CURRENT_DESKTOP" "$DESKTOP_SETUP_IBUS" && \
+     ["$XDG_SESSION_TYPE" = 'wayland'] ; then
+    # ibus set up is owned by desktop on wayland --> do the same as "none"
     return
 fi
 
```

Extra discussion: Was the Budgie:GNOME issue related to this?  (Were Budgie:GNOME
running under x11?)

FYI: I read Ubuntu bug: https://launchpad.net/bugs/1969637 but not so carefully.  So
I may be missing something.

Regards,

Osamu


Reply to: