Don't override IM variables

Bug #1594681 reported by Gunnar Hjalmarsson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Fix Released
Low
Unassigned
gnome-session
Fix Released
Medium
gnome-session (Ubuntu)
Fix Released
Medium
Gunnar Hjalmarsson
Xenial
Fix Released
Medium
Gunnar Hjalmarsson
gnome-settings-daemon (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Gunnar Hjalmarsson

Bug Description

[Impact]

Currently these variable settings are hardcoded in gnome-session and gnome-settings-daemon:

QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

That way the use of alternative IM frameworks, for instance fcitx, is prevented. The variables should only be set if they are empty, so the values set by im-config are honored.

[Test Case]

* Install Ubuntu GNOME
* Install both the gnome-session and gnome-settings-daemon proposed updates
* Install fcitx
* Set fcitx as the input method:
  im-config -n fcitx
* Relogin
* Check the IM-related environment variables:
  env | grep -E '_IM|XMOD'

After the proposed uploads of gnome-session and gnome-settings-daemon, those variables are consistently (unlike before) set to "fcitx".

[Regression Potential]

Low. im-config sets "ibus" by default in Ubuntu GNOME anyway. This change prevents an inconsistent input method configuration for users who have actively chosen some other IM framework.

The gnome-settings-daemon change was included upstream in 3.19.3 and the gnome-session change was included upstream in 3.21.90.

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

Well, I tested the attached patch, but it didn't make a difference - those two variables are still set to "ibus". What else can it be?

OTOH I could successfully type Mozc in gedit using fcitx. Can it be because the GTK_IM_MODULE variable was set to fcitx (by im-config) without being overridden by something else?

In any case, there seems to be more into it to make Ubuntu GNOME safely ready for users who prefer other IM frameworks but ibus.

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

As can be seen in bug #1596181, Ubuntu GNOME prevents you from enabling XIM too.

Revision history for this message
Faissal Chamekh (chamfay) wrote :

This problem happen to me also when trying to switch to xim using im-config.

$ printenv | grep -E '(_IM|XMOD)'
CLUTTER_IM_MODULE=xim
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
QT4_IM_MODULE=xim
GTK_IM_MODULE=xim

as you can see QT_IM_MODULE and XMODIFIERS still unchanged.

Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

Hi Gunnar,

I applied your patch and build on xenial [1].

[1]: https://launchpad.net/~ikuya-fruitsbasket/+archive/ubuntu/gnome-session

It works great to me.

What is deference?

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

Weird. I get this:

$ cat ~/.xinputrc | grep run_im
run_im fcitx
$ echo $XDG_CURRENT_DESKTOP
GNOME
$ dpkg-query -W gnome-session
gnome-session 3.18.1.2-1ubuntu1.16.04.2~ppa1
$ env | grep -E '_IM|XMOD'
CLUTTER_IM_MODULE=xim
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
QT4_IM_MODULE=fcitx
GTK_IM_MODULE=fcitx

That's why I'm disinclined to proceed.

@Ikuya: Did you possibly take any other steps besides applying the patch?

no longer affects: language-selector (Ubuntu Xenial)
no longer affects: language-selector (Ubuntu)
Changed in gnome-session (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: Confirmed → In Progress
Changed in gnome-session (Ubuntu Xenial):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: New → In Progress
Changed in gnome-settings-daemon (Ubuntu Xenial):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: New → In Progress
Changed in gnome-settings-daemon (Ubuntu):
status: New → Fix Released
summary: - Don't set ibus variables from gnome-session
+ Don't override IM variables
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Ikuya: I found that gnome-settings-daemon 3.18, which is in the Xenial archive, also overrides those two variables. So my guess is that you had 3.20 on your Xenial installation. (If not, this is still a mystery.)

Anyway, I prepared merge proposals for gnome-session (Yakkety and Xenial), and attached a Xenial patch for gnome-settings-daemon.

description: updated
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Changed in gnome-session:
importance: Unknown → Medium
status: Unknown → Confirmed
Mathew Hodson (mhodson)
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Medium
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Pushed gnome-session to yakkety. Pushed gnome-session and gnome-settings-daemon to xenial (unapproved queue). Therefore, I am unsubscribing ubuntu-sponsors now.

Changed in ubuntu-gnome:
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-session - 3.20.2-1ubuntu2

---------------
gnome-session (3.20.2-1ubuntu2) yakkety; urgency=medium

  * debian/patches/dont_override_IM_variables.patch:
    - Honor values set by e.g. im-config, and with that give users
      the option to use fcitx or other framework (LP: #1594681).

 -- Gunnar Hjalmarsson <email address hidden> Sun, 14 Aug 2016 02:04:00 +0200

Changed in gnome-session (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
terakin (terakinizers) wrote :

Hi,

  I was just stacked by this trouble ... (1) cannot input Japanese characters via Mozc (Japanese input method) in Dash search window (2) cannot input any Japanese characters for Skype.
  I suppose these troubles closely connected to this bug.

  Both troubles was solved like a magic by installing gnome-session packages at Gunnar's PPA (ppa:gunnarhj/gnome-im). I suggest this modification will link to solve the problem.

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

Thanks for sharing the good news, @terakin. :) I suppose it's fcitx-mozc you are using, then.

Changed in gnome-session:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Gunnar, or anyone else affected,

Accepted gnome-settings-daemon into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-settings-daemon/3.18.2-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gnome-settings-daemon (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in gnome-session (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Gunnar, or anyone else affected,

Accepted gnome-session into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-session/3.18.1.2-1ubuntu1.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

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

I installed gnome-session 3.18.1.2-1ubuntu1.16.04.2 and gnome-settings-daemon 3.18.2-0ubuntu3.1 from xenial-proposed, accomplished the test case, and can confirm that the variable assignments work as expected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for gnome-settings-daemon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-session - 3.18.1.2-1ubuntu1.16.04.2

---------------
gnome-session (3.18.1.2-1ubuntu1.16.04.2) xenial; urgency=medium

  * debian/patches/dont_override_IM_variables.patch:
    - Honor values set by e.g. im-config, and with that give users
      the option to use fcitx or other framework (LP: #1594681).

 -- Gunnar Hjalmarsson <email address hidden> Sun, 14 Aug 2016 02:05:00 +0200

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

This bug was fixed in the package gnome-settings-daemon - 3.18.2-0ubuntu3.1

---------------
gnome-settings-daemon (3.18.2-0ubuntu3.1) xenial; urgency=medium

  * debian/patches/dont_override_IM_variables.patch:
    - Honor values set by e.g. im-config, and with that give users
      the option to use fcitx or other framework (LP: #1594681).

 -- Gunnar Hjalmarsson <email address hidden> Sat, 13 Aug 2016 20:32:00 +0200

Changed in gnome-settings-daemon (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in ubuntu-gnome:
status: Fix Committed → 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.