no ibus input method is registered after fresh install

Bug #716314 reported by Nobuto Murata
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Unassigned
ibus
Unknown
Unknown
ibus (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: ibus

In a ISO test case "Installation Full Network Support & CJK Input", I cannot input Japanese without additional steps (manually register ibus-anthy as input method).
http://testcases.qa.ubuntu.com/Install/NonEnglishLanguage#Installation%20Full%20Network%20Support%20&%20CJK%20Input

This bug is reproducible in both cases with ubiquity(Desktop CD) and with d-i(Alternate CD).
And also reproducible not only in Japanese(ja) but also with Simplified Chinese(zh-hans) and Traditional Chinese(zh-hant).

This bug is regression from 10.10(Maverick). I didn't test in Natty Alpha1.

How to Reproduce:
  1. Install Ubuntu according to the test case above.
  2. ibus-anthy is installed(in Japanese case), but not registered in ibus-indicator.

WORKAROUND:
  1. Click ibus-indicator and select "Preferences".
  2. Open "Input Method" tab, select "Anthy" and "Add" button.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ibus 1.3.9-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-1.28-generic 2.6.38-rc2
Uname: Linux 2.6.38-1-generic i686
Architecture: i386
Date: Thu Feb 10 18:05:25 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110201.2)
ProcEnviron:
 LANGUAGE=ja_JP:ja:en_GB:en
 LANG=ja_JP.UTF-8
 LC_MESSAGES=ja_JP.utf8
 SHELL=/bin/bash
SourcePackage: ibus

Revision history for this message
Nobuto Murata (nobuto) wrote :
Nobuto Murata (nobuto)
description: updated
summary: - [Natty Alpha2] any ibus input method is not registered after fresh
- install
+ [Natty Alpha2] no ibus input method is registered after fresh install
Nobuto Murata (nobuto)
description: updated
Revision history for this message
Yusuke Sato (yusukes) wrote : Re: [Natty Alpha2] no ibus input method is registered after fresh install

When "/desktop/ibus/general/preload_engines" gconf setting is not available, ibus-daemon calls setlocale(LC_ALL, NULL); to query a locale setting of a user, and then determines which input method engine should be loaded based on the locale setting.
https://github.com/ibus/ibus/tree/1.3.y#L354

Until Ubuntu 10.10, the setlocale function used to return a simple value like "ja_JP.UTF-8", but on 11.04 alpha 2, the function seems to return a looong string like "LC_CTYPE=ja_JP.UTF-8;LC_NUMERIC=ja_JP.UTF-8;LC_TIME=ja_JP.UTF-8;LC_COLLATE=ja_JP.UTF-8;LC_MONETARY=ja_JP.UTF-8;LC_MESSAGES=ja_JP.utf8;LC_PAPER=ja_JP.UTF-8;LC_NAME=ja_JP.UTF-8;LC_ADDRESS=ja_JP.UTF-8;LC_TELEPHONE=ja_JP.UTF-8;LC_MEASUREMENT=ja_JP.UTF-8;LC_IDENTIFICATION=ja_JP.UTF-8" which ibus-daemon is not able to parse.

For now, changing the 'lang = g_strdup (setlocale (LC_ALL, NULL));' line in ibus-1.3.9/bus/ibusimpl.c to 'lang = g_strdup (setlocale (LC_MESSAGES, NULL));' should fix the problem.

Revision history for this message
Yusuke Sato (yusukes) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

@Yusuke Sato
Thanks for your information.

I found Segmentation fault during ibus installation. It would be related what you mentioned.
-----
Processing triggers for gconf2 ...
Segmentation fault
-----
full output:
http://paste.ubuntu.com/565475/

Just reproducible on ibus re-installation
  $ sudo apt-get install --reinstall ibus

Revision history for this message
Yusuke Sato (yusukes) wrote :

hmm... not able to reproduce the segv issue. Furthermore, as I wrote in http://code.google.com/p/ibus/issues/detail?id=1203#c1, I'm not sure if the segv in gconf2 is related to the original problem (I mean, the "no ibus input method is registered after fresh install" one.)

I'd be very much appreciated if you could check if the 1-line patch in the comment #2 can fix the original problem.

Revision history for this message
Nobuto Murata (nobuto) wrote :

> hmm... not able to reproduce the segv issue. Furthermore, as I wrote in http://code.google.com/p/ibus/issues/detail?id=1203#c1, I'm not sure if the segv in gconf2 is related to the original problem (I mean, the "no ibus input method is registered after fresh install" one.)

OK. I will file segmentation fault issue as a separate bug. Sorry for bothering.

> I'd be very much appreciated if you could check if the 1-line patch in the comment #2 can fix the original problem.

I will try that too.

Revision history for this message
Nobuto Murata (nobuto) wrote :

I filed as another bug. I will change upstream bug number.

Revision history for this message
Nobuto Murata (nobuto) wrote :

I filed segmentation fault issue as Bug #717183.

Revision history for this message
Yusuke Sato (yusukes) wrote :

Thanks!
Another workaround could be to change the value of LC_ MESSAGES? I haven't tested it though.

While all variables except LC_MESSAGES are set to "ja_JP.UTF-8", LC_MESSAGES seems to use "ja_JP.utf8". If all LC_XXX variables have the same value, setlocale(LC_ALL, NULL); might return a simple string (which is, in this case, "ja_JP.UTF-8".)

Revision history for this message
Nobuto Murata (nobuto) wrote :

> I'd be very much appreciated if you could check if the 1-line patch in the comment #2 can fix the original problem.

It seems not to fix this issue. I installed patched ibus, then installed ibus-anthy. Even after ibus daemon restarted, ibus-anthy is not shown in ibus-indicator.

Debdiff: https://launchpad.net/~nobuto/+archive/experimental-packages/+files/ibus_1.3.9-0ubuntu1_1.3.9-0ubuntu1ppa1.diff.gz
Packages: https://launchpad.net/~nobuto/+archive/experimental-packages/+packages

Revision history for this message
Yusuke Sato (yusukes) wrote :

Please run 'gconftool-2 --unset /desktop/ibus/general/preload_engines' before installing the modified ibus-daemon.
ibus-daemon does nothing if the /desktop/ibus/general/preload_engines entry already exists.

Revision history for this message
Nobuto Murata (nobuto) wrote :

>> I'd be very much appreciated if you could check if the 1-line patch in the comment #2 can fix the original problem.
>
>It seems not to fix this issue.

I tested this in LiveCD environment for easy testing. Then failed.
But in full installed environment, your fix works fine.

I found differences between LiveCD and full-installed.
  LiveCD: segmentation fault during ibus installation and the fix does not work
    `locale` output - http://paste.ubuntu.com/565941/
    LANGUAGE=ja_JP.UTF-8:ja:en_GB:en

  full-installed: no segmentation fault and the fix works fine
    `locale` output - http://paste.ubuntu.com/565944/
    LANGUAGE=ja_JP:ja_JP.UTF-8:ja:en_GB:en

Just for your information, UTF-8 vs utf8 issue is discussed in Bug #666565.

Revision history for this message
Nobuto Murata (nobuto) wrote :

I will backport the patch from upstream.

Changed in ibus (Ubuntu):
assignee: nobody → Nobuto MURATA (nobuto)
status: New → In Progress
Revision history for this message
Nobuto Murata (nobuto) wrote :

I attached debdiff.

tags: added: patch-accepted-upstream
Changed in ibus (Ubuntu):
assignee: Nobuto MURATA (nobuto) → nobody
status: In Progress → Confirmed
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

Now that locale was changed yesterday (probably by new gdm or language-selector package?), this issue is no longer reproducible on fresh-install.
But for some cases that locale values are set separately, the patch should be considered to be applied.

Revision history for this message
Nobuto Murata (nobuto) wrote :

Upstream is going to change patched lines using LC_CTYPE instead of LC_MESSAGES. I will mark as In Progress again to tweak the patch.

Changed in ibus (Ubuntu):
assignee: nobody → Nobuto MURATA (nobuto)
status: Confirmed → In Progress
tags: added: patch-needswork
removed: patch-accepted-upstream
Changed in ibus (Ubuntu):
importance: Undecided → Low
summary: - [Natty Alpha2] no ibus input method is registered after fresh install
+ no ibus input method is registered after fresh install
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

I have tweaked the patch along with upstream change.

Changed in ibus (Ubuntu):
assignee: Nobuto MURATA (nobuto) → nobody
status: In Progress → Confirmed
Nobuto Murata (nobuto)
tags: added: patch-accepted-upstream
removed: patch-needswork
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your work there

Changed in ibus (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ibus - 1.3.9-0ubuntu2

---------------
ibus (1.3.9-0ubuntu2) natty; urgency=low

  * debian/patches/06_locale_parser.patch:
    - cherry-picked from upstream
    - use LC_CTYPE instead of LC_ALL in
      bus_ibus_impl_set_default_preload_engines (LP: #716314)
 -- Nobuto MURATA <email address hidden> Sat, 19 Feb 2011 23:20:33 +0900

Changed in ibus (Ubuntu):
status: Fix Committed → Fix Released
Nobuto Murata (nobuto)
Changed in ubuntu-translations:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.