RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1686913 - ibus does not work with X11 application in RHEL 7.6
Summary: ibus does not work with X11 application in RHEL 7.6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ibus
Version: 7.6
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: fujiwara
QA Contact: QE Internationalization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1704281 1714504
TreeView+ depends on / blocked
 
Reported: 2019-03-08 16:20 UTC by Dirk Hoffmann
Modified: 2020-03-31 19:38 UTC (History)
5 users (show)

Fixed In Version: ibus-1.5.17-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:38:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1017 0 None None None 2020-03-31 19:38:11 UTC

Description Dirk Hoffmann 2019-03-08 16:20:52 UTC
Description of problem:

Just to mention that but #640467 this is still an issue on RHEL7 (Scientific Linux 7.4 in my case).

I observed the particularly annoying case, where it worked "out of the box" xterm accepts composed key sequences), but after a reboot, it did not and needed a preceeding XMODIFIERS="" to do the things right. I had enabled "Japanese (Kanji)" input, but removed it completely from the settings again (because not satisfactory). So the bare enabling of this input scheme seems to set things in a weird way, which prevents xterm from recognising the Compose-key correctly. (It behaves as if the Compose key were never pressed.)

The conflictual setting of XMODIFIERS is "@im=ibus", as far as I see.

Version-Release number of selected component (if applicable):

I am not sure about the component. (I guess the l10n software should be blamed, not the xterm.) But it is the latest package available from repo today.

How reproducible:

1. Add "Japanese (Kanji)" input to existing "English (US)". 
2. Remove "Japanese" again. 
3. Try to write in "xterm" with a sequence of Compose-keys.

Actual results:

Does not work. Xterm behaves like the Compose key were not defined.

Expected results:

Recognise Compose key, then combine the two or three following keys correctly as in Compose-o-e = œ.

Comment 2 Jan Synacek 2019-03-11 08:23:35 UTC
I'm not sure which layer of the input stack is to blame, so let's start with the one on the top.

Comment 3 Ray Strode [halfline] 2019-03-11 20:24:33 UTC
gnome-desktop is a module for drawing wallpapers basically, not the right component.

gnome-session has this code:

        {•
                gchar *ibus_path;•
•
                ibus_path = g_find_program_in_path("ibus-daemon");•
•
                if (ibus_path) {•
...
                        p = g_getenv ("XMODIFIERS");•
                        if (!p || !*p)•
                                p = "@im=ibus";•
                        gsm_util_setenv ("XMODIFIERS", p);•
...
                }•
•
                g_free (ibus_path);•
        }•

So I guess what happened is ibus got installed when it wasn't previously.

How did you set up a compose key? tweak tool? xorg.conf ?

anyway presumably, ibus should behave transparently here, so moving to ibus.

Comment 4 Dirk Hoffmann 2019-03-12 13:11:06 UTC
> How did you set up a compose key? tweak tool? xorg.conf ?

I think it came directly from the Region&Language settings, with Keyboard=English(US and Euro on 5). But it may well be that it was setup a 
long time before through gnome-tweaks (which did not have that name, I think). Because I keep my (NFS) home directory over OS upgraades, the setting may have been conserved in this way.

Anyway, what I observed was rather curious, because I had several xterms running, which took into account the Compose Key, for several months. But after a recent reboot, the first xterm opened afterwards seemed to not even receive the keyhit for the Compose.

Comment 5 fujiwara 2019-03-13 06:47:42 UTC
At first, "Japanese (Kanji)" AKA ibus-kkc does not enable Compose and you need to use "English (US)".

Seems /usr/libexec/ibus-x11 failed to open IMOpenIM() in RHEL 7 because gdm's ibus-x11 open IMOpenIM().

Dirk Hoffmann:

You could see the two PIDs of ibus-x11, one is owned by gdm and another is owned by your account.

1. If you kill the PID of gdm's ibus-x11, ibus-x11 won't restart.
2. And if you kill the PID of your account's ibus-x11, it restart.
3. And you could run xterm again and enable the compose typing?

Comment 6 Dirk Hoffmann 2019-03-14 10:42:35 UTC
Thanks for your analysis, Fujiwara-san.

These are the ibus-x11 instances:

gdm      15791     1  0 Mar07 ?        00:00:11 /usr/libexec/ibus-x11 --kill-daemon
hoffmann 15970     1  0 Mar07 ?        00:00:00 /usr/libexec/ibus-x11 --kill-daemon

However, I am not sure what you want me to test here:

1. If you kill the PID of gdm's ibus-x11, ibus-x11 won't restart.
2. And if you kill the PID of your account's ibus-x11, it restart.
3. And you could run xterm again and enable the compose typing?


So I started with 2., as it is the least invasive. Indeed, after killing 15970, I have:

gdm      15791     1  0 Mar07 ?        00:00:11 /usr/libexec/ibus-x11 --kill-daemon
hoffmann 24488     1  0 11:37 ?        00:00:00 /usr/libexec/ibus-x11 --kill-daemon

And no improvement with a new "xterm".


Then I killed 15791. It did not restart. And "xterm" correctly works with accents.


I also tried to kill again 24488, which reappeared. And "xterm" continues to work correctly, even with XMODIFIERS=@im=ibus.


Is that what you wanted me to test?

So the conclusion is that there is a pending ibus-x11 from the gdm, which needs to be reaped at session start?

Comment 7 fujiwara 2019-03-15 04:09:51 UTC
(In reply to Dirk Hoffmann from comment #6)
> And no improvement with a new "xterm".

Because you didn't kill the PID of gdm in step 1.

> Then I killed 15791. It did not restart. And "xterm" correctly works with
> accents.

OK, I assume your compose key works fine with the workaround.

> So the conclusion is that there is a pending ibus-x11 from the gdm, which
> needs to be reaped at session start?

gdm's ibus-x11 always terminates and the problem does not happen in Fedora and I will backport the fix to RHEL 7 and ask you the test again.

Thank you for the report.

The problem is that input method does not work in X11 applications besides compose key due to gdm's ibus-x11.
I change the bug title.

Comment 8 fujiwara 2019-03-20 10:44:31 UTC
Seems the ibus latest patches for x11 has been applied to RHEL 7.
I looked at the double ibus-x11 in Fedora 27 but I cannot reproduce this problem.
I need to investigate why  /usr/libexec/ibus-x11 failed to open IMOpenIM() in RHEL 7.

Comment 9 Jens Petersen 2019-03-21 02:09:05 UTC
Dirk, you are still on 7.4, right?  Would be better if you could test (upgrade to) 7.6.

Comment 10 Dirk Hoffmann 2019-03-22 17:11:38 UTC
Sorry, I must have be mistaken when I wrote 7.4. I just checked, the machine is on 7.6 and certainly noone installed it since the beginning of this month. 

(The machine is third-party managed, and I am right now not in front of it for a couple of days.)

I understood that there should be patches available for me to test. However my system seems to be up to date with respect to the repo:

marmont:~[1010] sudo yum upgrade *x11*
Loaded plugins: langpacks
No packages marked for update
marmont:~[1010] sudo yum upgrade *ibus*
Loaded plugins: langpacks
No packages marked for update

Should I enable a particular repository?

Comment 11 fujiwara 2019-03-25 03:26:07 UTC
Since I can reproduce your problem, I think you have no action item at the moment.
Seems there is no difference of ibus-x11 between the latest RHEL 7 and Fedora so I guess the evaluation might take time.
Since the problem has not been reproduced in Fedora, it might be a RHEL 7 specific issue likes security but not sure at the moment.
I think the above workaround would be nice or you could set `XMODIFIERS=@im=none`.

Comment 14 Satyabrata Maitra 2019-05-08 05:59:23 UTC
Thanks much.

Test result for RHEL7.7 Alpha compose :

ibus-emoji candidate window is not appearing in gedit and other application on X11 session.
Version of the component : ibus-1.5.17-4.el7

Comment 16 fujiwara 2019-08-06 11:43:51 UTC
Now the dead line is coming for RHEL 7.8 and I accept this bug.

Currently ibus-x11 detects XIOError and assume the error as the
desktop session is closed and ibus-x11 calls Exit D-Bus method to
exit ibus-daemon. But ibus-x11 detects XError in RHEL 7.7 before
XIOError and GTK does not allow to bind XError by applications and
GTK calls gdk_x_error() with XError.

E.g. GdkX11Screen calls XGetSelectionOwner() for "_XSETTINGS_S?"
atoms during the logout but the selection owner already becomes
NULL and the NULL window causes XError with
gdk_x11_window_foreign_new_for_display().

Since ibus-x11 exits with XError before XIOError, gnome-shell
can detects the exit of ibus-daemon a little earlier and
gnome-shell restarts ibus-daemon but gnome-shell dies soon.
Then gnome-shell dies but ibus-daemon is alive, it's a problem.
Because it causes double ibus-x11 of GDM and a login user
and double XSetSelectionOwner() is not allowed for the unique
"ibus" atom and the user cannot use XIM but not GtkIMModule.

Probably we could fix the ibus process problem if we would fix
XError about the X selection owner or stop to restart ibus-daemon
in gonme-shell when the session is logging out.
Maybe using SessionManager.LogoutRemote() or
global.screen.get_display().get_xdisplay()
But I assume thereare other scenarios to causes the problem.

And I decided ibus-daemon always exits with the parent's death here
to avoid unexpected ibus restarts during the logout.

Comment 23 errata-xmlrpc 2020-03-31 19:38:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1017


Note You need to log in before you can comment on or make changes to this bug.