Cannot enable IM inside Qt5 apps including webapp-container

Bug #1309885 reported by Nobuto Murata
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Unassigned
im-config (Debian)
Fix Released
Unknown
im-config (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

debdiff for utopic:
  https://launchpadlibrarian.net/173673054/im-config_utopic_v2.debdiff
SRU debdiff for trusty:
  https://launchpadlibrarian.net/173673094/im-config_trusty-sru_v2.debdiff

[Impact]

 * Cannot input languages which need IM(ibus, fcitx) in Qt5 apps, e.g. webapp-container, webbrowser-app, friends-app, etc.

[Test Case]
 1. prepare ibus or fcitx environment with CJK(Chinese, Japanese, Korean) language, for example.
 2. install and launch webbrowser-app
 3. confirm that you cannot enable IM inside webbrowser-app
 4. update im-config packages to -proposed one
 5. logout from desktop session and re-login
 6. confirm that now you can enable IM and input CJK language with ibus or fcitx.

[Regression Potential]

 * This patch sets QT_IM_MODULE which might affect Qt4 app behaviour, both Qt5 and Qt4 app tests are preferred to make sure there is no regression for both sides. I used webbrowser-app(Qt5) and skype(Qt4) before attaching the patch.

[Other Info]
related discussion is debian bug report.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732396

-- original description --

WORKAROUND:
launch webapp-container with QT_IM_MODULE variable like the line below.

$ env QT_IM_MODULE=ibus webapp-container --app-id=Gmailmailgooglecom --webapp=XXXXXX --enable-back-forward --store-session-cookies

webapp-container looks like QT5 application, im-config needs to care about QT_IM_MODULE in addition to other *_IM_MODULE variables?

ProblemType: BugDistroRelease: Ubuntu 14.04
Package: im-config 0.24-1ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Apr 19 17:23:15 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-10-15 (185 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20131014)
PackageArchitecture: allSourcePackage: im-config
UpgradeStatus: No upgrade log present (probably fresh install)

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

An upstream debian bug is talking about setting QT_IM_MODULE for fcitx, but the idea is the same for fixing IM in QT5.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732396

Nobuto Murata (nobuto)
summary: - Cannot enable ibus inside webapp-container
+ Cannot enable IM inside Qt5 apps including webapp-container
Changed in im-config (Debian):
status: Unknown → New
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Nobuto,

To prepare for the SRU, you may want to edit the description to fit this SRU Bug Template:

https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Nobuto Murata (nobuto)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in im-config (Ubuntu):
status: New → Confirmed
Nobuto Murata (nobuto)
description: updated
Revision history for this message
Nobuto Murata (nobuto) wrote :

Now that Debian released a fix for this bug, let me tweak Ubuntu patch along with Debian.

Changed in im-config (Ubuntu):
assignee: nobody → Nobuto MURATA (nobuto)
status: Confirmed → In Progress
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :
description: updated
Changed in im-config (Ubuntu):
assignee: Nobuto MURATA (nobuto) → nobody
status: In Progress → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Uploaded to utopic and sitting in the pre-release freeze queue now.

Changed in im-config (Ubuntu):
status: Confirmed → Fix Committed
Changed in im-config (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.24-1ubuntu5

---------------
im-config (0.24-1ubuntu5) utopic; urgency=medium

  * debian/patches/02_support-qt5.patch:
    To support Qt5, set QT_IM_MODULE(LP: #1309885)
 -- Nobuto MURATA <email address hidden> Fri, 25 Apr 2014 02:55:58 +0900

Changed in im-config (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in im-config (Ubuntu Trusty):
status: New → Confirmed
Changed in im-config (Ubuntu):
importance: Undecided → High
Changed in im-config (Ubuntu Trusty):
importance: Undecided → High
Aron Xu (happyaron)
Changed in im-config (Ubuntu Trusty):
status: Confirmed → Triaged
Revision history for this message
Aron Xu (happyaron) wrote :

Uploaded to trusty-proposed and waiting for approval, thanks!

Changed in im-config (Ubuntu Trusty):
status: Triaged → In Progress
David Planella (dpm)
tags: added: touch-cn
Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

The fix in fresh im-config 0.24-1ubuntu4.1 didn't help - still couldn't switch to russian language in Qt Creator 3.0.1-0ubuntu4 on Trusty.

I could see the QT_IM_MODULE in the file /etc/X11/Xsession.d/70im-config_launch, but I guess it also should be used in /usr/share/im-config/data/79_xim.rc

Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

Nope, unfortunately this didn't help either...

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Aurel: Can you please post the output of the command:

env | grep IM_

Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

Sure:

CLUTTER_IM_MODULE=xim
QT_IM_MODULE=ibus
IM_CONFIG_PHASE=1
QT4_IM_MODULE=xim
GTK_IM_MODULE=ibus

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, thanks. Just wanted to make sure that ibus is the default framework and that QT_IM_MODULE is set.

Question: Is IBus really needed to input Russian?

Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

Good question - I have disabled ibus:

CLUTTER_IM_MODULE=xim
QT_IM_MODULE=xim
IM_CONFIG_PHASE=1
QT4_IM_MODULE=xim
GTK_IM_MODULE=xim

But the result is the same - can't switch to russian in Qt Creator, though the language indicator is switching.

In other environments, including Skype - everythin's OK.

Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

Had to revert to ibus - there is an old strange bug with xim - the "t" latin letter not displaying in Unity dash or HUD :)

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Right, I think ibus should be enabled anyway to avoid surprises.

But doesn't this indicate that your problem with Qt Creator is a separate bug, and not related to this bug?

Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

There already is another bug - https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/1301937 - but with no reaction.

Just that I've seen yesterday's update of im-config and there was mention of the current bug, I thought it's title "Cannot enable IM inside Qt5 apps" to perfectly describe my problem too :)

Aron Xu (happyaron)
Changed in im-config (Ubuntu Trusty):
status: In Progress → Triaged
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Looks like the person who approved the upload to trusty-proposed forgot to add a tag and ask for confirmation that it works as expected. So I just added the tag...

tags: added: verification-needed
Revision history for this message
Kazuhiro Takimoto (rohizuka) wrote :

Hello
Just now I tested im-config from trusty-proposed.
I confirmed that can enable input fcitx by Starting the webbrowser-app.
thank you it works.

env | grep IM_
CLUTTER_IM_MODULE=xim
QT_IM_MODULE=fcitx
IM_CONFIG_PHASE=1
QT4_IM_MODULE=fcitx
GTK_IM_MODULE=fcitx

Tested package version:
$ apt-cache policy im-config
im-config:
  Installed: 0.24-1ubuntu4.1
  Candidate: 0.24-1ubuntu4.1
  Version table:
 *** 0.24-1ubuntu4.1 0
        500 http://ubuntutym.u-toyama.ac.jp/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     0.24-1ubuntu4 0
        500 http://ubuntutym.u-toyama.ac.jp/ubuntu/ trusty/main i386 Packages

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks, Kazuhiro.

tags: added: verification-done
removed: verification-needed
Aron Xu (happyaron)
Changed in im-config (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Nobuto Murata (nobuto) wrote :

Something wrong in SRU process. Bug member field of im-config in the status page below is empty.
http://people.canonical.com/~ubuntu-archive/pending-sru.html

Anyway the proposed package seems accepted into trusty-proposed, setting the status accordingly.

Changed in im-config (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Not sure why it didn't show up. I've released it now:

--- Releasing im-config ---
Proposed: 0.24-1ubuntu4.1
Release: 0.24-1ubuntu4
Copied to trusty-updates

Thanks for pointing it out.

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

Thank you, Scott.

Changed in im-config (Ubuntu Trusty):
status: Fix Committed → Fix Released
Changed in ubuntu-translations:
status: New → Fix Released
Revision history for this message
Aurel Branzeanu (thunder-riscom) wrote :

Working like a charm, thanks!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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