[Oneiric] ibus does not register as IM_MODULE in GTK, GTK_IM_MODULE is always "xim"

Bug #823202 reported by Fumihito YOSHIDA on 2011-08-09
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ibus (Ubuntu)
Undecided
Unassigned

Bug Description

In oneiric(GTK3) environments, environment variable "GTK_IM_MODULE" always set as "xim", not "ibus".

[How to reproduce]
    0) install ibus, and/or clean install with any language that need IM subsystem(such as Japanese, Chinese, Korean, Frence..etc.).
    1) log-in Oneiric.
    2) variable GTK_IM_MODULE set as ibus.
       You will see in terminal:
       $ export | grep GTK_IM_MODULE

[expect results]
    When we have /usr/lib/gtk-*.0/*/immodules/im-ibus.so(In Unity environment, that provide as default), using ibus (GTK_IM_MODULE=ibus)

[actual results]
    always use xim (GTK_IM_MODULE=xim)

[side effects by this problem]
    Some IM system needs "candidate" window, that layout by {xim, ibus} modules.
    For historical/technical reason, XIM does not provide enough support about coordinating candidate window, as a result, candidate window show in inconsequence place.
      Good case(GTK_IM_MODULE=ibus) : https://launchpadlibrarian.net/76880967/01_ibus_valid.png
      Bad case (GTK_IM_MODULE=xim) : https://launchpadlibrarian.net/76881006/02_xim_invalid.png

    That breaks Desktop UX for.

[analysis]

That problem caused by /etc/X11/xinit/xinput.d/ibus .
This scripts has bad glob coding as follows:

-------------------------------------------------------
$ cat /etc/X11/xinit/xinput.d/ibus
(..snip..)
if [ -e /usr/lib/gtk-*.0/*/immodules/im-ibus.so ]; then
    GTK_IM_MODULE=ibus
else
    GTK_IM_MODULE=xim
fi
(..snip..)

-------------------------------------------------------

In GTK2/GTK3 dual-stack environments, this glob pattern matches two files(see below). test(1) does not support multiple operand, that will fail with error message "[: 7: /usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so: unexpected operator", and set GTK_IM_MODULE=xim.

-------------------------------------------------------
$ ls /usr/lib/gtk-*.0/*/immodules/im-ibus.so
/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so
/usr/lib/gtk-3.0/3.0.0/immodules/im-ibus.so
-------------------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ibus 1.3.9-2ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-8.10-generic-pae 3.0.1
Uname: Linux 3.0.0-8-generic-pae i686
Architecture: i386
Date: Tue Aug 9 18:56:13 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 LANGUAGE=ja:en
 PATH=(custom, user)
 LANG=ja_JP.UTF-8
 LC_MESSAGES=ja_JP.UTF-8
 SHELL=/bin/zsh
SourcePackage: ibus
UpgradeStatus: Upgraded to oneiric on 2011-08-09 (0 days ago)

Related branches

Fumihito YOSHIDA (hito) wrote :
Fumihito YOSHIDA (hito) wrote :
Fumihito YOSHIDA (hito) wrote :
description: updated

Here is the debdiff for fix this issue.

Changed in ibus (Ubuntu):
status: New → Confirmed
Fumihito YOSHIDA (hito) wrote :

It looks rational. The patch works fine for my test environment. Thank you!

tags: added: patch
Fumihito YOSHIDA (hito) on 2011-08-10
summary: - [Oneiric] ibus does not register as default IM, GTK_IM_MODULE is always
- "xim"
+ [Oneiric] ibus does not register as IM_MODUL in GTK, GTK_IM_MODULE is
+ always "xim"
summary: - [Oneiric] ibus does not register as IM_MODUL in GTK, GTK_IM_MODULE is
+ [Oneiric] ibus does not register as IM_MODULE in GTK, GTK_IM_MODULE is
always "xim"
Steve Langasek (vorlon) wrote :

I've adjusted the patch slightly; your patch would leave GTK_IM_MODULE unset if ibus-gtk3 is installed and ibus-gtk is not, but we want to set it to xim in this case.

Thanks for helping to get this fixed!

Changed in ibus (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ibus - 1.3.99.20110419-1ubuntu3

---------------
ibus (1.3.99.20110419-1ubuntu3) oneiric; urgency=low

  * debian/xinput/ibus: check for GTK2+ and GTK3+ IMModules separately,
    otherwise the file globbing fails us. Thanks to Ikuya Awashiro
    <email address hidden> for the initial patch. LP: #823202.

  [ Ikuya Awashiro ]
  * debian/patches/05_appindicator.patch: fix crash issue. LP: #828833.
 -- Steve Langasek <email address hidden> Sat, 20 Aug 2011 11:07:06 -0700

Changed in ibus (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers