im-config ignores input methods other than xim in my current locale

Bug #1847618 reported by kenn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
im-config (Ubuntu)
Fix Released
Low
Gunnar Hjalmarsson

Bug Description

I use Ubuntu 16.04.6 LTS. I can not reach other input methods such as ibus, fcitx in my current locale which is LANGUAGE=tr_TR.UTF-8. It's not listed in unity-control-center>Language Support>Keyboard Input Method System. If I launch unity-control-center from terminal which is using different locale "LANGUAGE=en_US.utf8 unity-control-center" then there is no problem, all of the installed input methods are in the list.

I also tested "python3 /usr/lib/python3/dist-packages/LanguageSelector/ImConfig.py"
it also ignores input methods other than xim and none.
If I export "LANGUAGE=en_US.utf8" it lists all the other input methods.

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

Thanks for your report. However, I can't reproduce the issue you describe.

If you run this command:

im-config -l

it should output the IM frameworks which are installed on your system plus xim. The UI in Language Support should show the same options together with a 'none' option. That's the behavior I see irrespective of which locale I use.

Any chance you can provide additional info to shed light on the issue?

Changed in language-selector (Ubuntu):
status: New → Incomplete
Revision history for this message
kenn (whatnext) wrote :

I don't know it's an architecture dependent issue because some users who reported this bug which I also have: https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/996791
mentioned architecture specific issues.

I am running Ubuntu 16.04.6 with multiarch support, I installed it as 32 bit OS but switched to 64 bit OS by means of `dpkg --add-architecture amd64` and I installed 64 bit kernel and libc stuff.
I have been running it for three years without problem.

I am also suffering from this bug may be related to the current bug: https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/1350393/

I filed this bug some time ago :
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1773517

If I run the following command `im-config -l` I only get:
xim
unless I run it like `LANGUAGE=en_US.utf8 im-config -l`
in which case I get :ibus uim scim xim

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

Thanks!

On 2019-10-11 14:15, kenn wrote:
> If I run the following command `im-config -l` I only get:
> xim
> unless I run it like `LANGUAGE=en_US.utf8 im-config -l`
> in which case I get :ibus uim scim xim

That was odd. But then this is an im-config bug. The other bugs you mentioned seem to be unrelated to this one, and im-config consists of architecture independent shell code.

Can you please open a terminal window, run the commands below, and show in a comment here what they output:

locale

locale -a

summary: - language selector ignores input methods other than xim and none in my
- current locale
+ im-config ignores input methods other than xim in my current locale
affects: language-selector (Ubuntu) → im-config (Ubuntu)
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I figured out a way to reproduce the problem:

$ im-config -l
 ibus fcitx xim
$ LC_MESSAGES=tr_TR.UTF-8 LANGUAGE= im-config -l
 xim
$

By now I'm pretty sure that you have explicitly set either LC_MESSAGES or LC_ALL to "tr_TR.UTF-8". While I'd advise you from doing so on an Ubuntu desktop (none of those variables would have been explicitly set if you had relied on Language Support for handling your locale), it still makes no sense that it causes the 'im-config -l' command to fail.

So I submitted a merge request to Debian:
https://salsa.debian.org/input-method-team/im-config/merge_requests/3/diffs

You should be able to fix it for yourself either by not setting LC_MESSAGES and/or LC_ALL explicitly, or by editing the /usr/share/im-config/xinputrc.common file in accordance with the merge request.

Would appreciate your confirmation that this is it.

Changed in im-config (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Low
status: Incomplete → In Progress
Revision history for this message
kenn (whatnext) wrote :

Thank you for responding and quick coverage.
I added my current locale in the attachment.
Ironically `LC_MESSAGES=tr_TR.UTF-8 LANGUAGE= im-config -l` prints full list:
ibus uim scim xim

but not this `LC_MESSAGES=tr_TR.UTF-8 im-config -l`, this prints:
xim

I am happy to hear that you pinpoint the bug.

I thought it was a more complicated issue.
I can apply the workaround you suggested.
Cheers

Revision history for this message
kenn (whatnext) wrote :

I confirm that replacing LANG with LC_ALL in /usr/share/im-config/xinputrc.common
fixes the bug.

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

On 2019-10-11 20:13, kenn wrote:
> Ironically `LC_MESSAGES=tr_TR.UTF-8 LANGUAGE= im-config -l` prints
> full list:
> ibus uim scim xim
>
> but not this `LC_MESSAGES=tr_TR.UTF-8 im-config -l`, this prints:
> xim

Well, since you have set LC_ALL=C.UTF-8 your case is a bit different compared to what I guessed and described in the merge request. (I would recommend you to drop that setting. It makes no sense on an Ubuntu system, and - as you just noticed - it may cause surprise behavior.)

> I confirm that replacing LANG with LC_ALL in
> /usr/share/im-config/xinputrc.common fixes the bug.

Great, thanks for confirming!

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

This bug was fixed in the package im-config - 0.44-1ubuntu1

---------------
im-config (0.44-1ubuntu1) focal; urgency=medium

  * Merge with Debian unstable, remaining changes:
    - d/maintscript: Remove /etc/profile.d/input-method-config.sh
    - d/p/01-ubuntu-default-mode.patch
    - d/p/reverse-Remove-imconfig_find_files_with_prefixpath_glob.patch
  * d/p/reverse-Remove-imconfig_find_files_with_prefixpath_glob.patch:
    - Reverse new approach for setting env variables

im-config (0.44-1) unstable; urgency=medium

  * Clean up imconfig_find_files_with_prefixpath_glob.

  [ Boyuan Yang ]
  * Add initial configuration data for fcitx5 support.

  [ Gunnar Hjalmarsson ]
  * im-launch.1: Fix a typo in the man page. (LP: #1851997)
  * xinputrc.common.in: Use LC_ALL=C for dpkg-query to ensure
    English output. (LP: #1847618)

 -- Gunnar Hjalmarsson <email address hidden> Wed, 25 Mar 2020 22:44:00 +0100

Changed in im-config (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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