Your message dated Mon, 06 Jul 2026 17:27:27 +0000
with message-id <[email protected]>
and subject line Bug#1134791: fixed in im-config 1.0
has caused the Debian Bug report #1134791,
regarding im-config: im-launch passes empty LC_CTYPE to phase2 check, causing 
fcitx5 auto selection to mismatch and daemon not to start
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1134791: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1134791
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: im-config
Version: 0.62
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

I am seeing a startup failure with im-config 0.62 where the first Xsession
phase selects fcitx5 correctly, but the im-launch phase2 safety check computes
a different automatic input method and therefore refuses to start the fcitx5
daemon.

This was observed on Ubuntu Kylin 26.04 with im-config 0.62, but the code path
is in the Debian im-config scripts as well. I am reporting it here because the
problem appears to be in im-launch's clean-environment phase2 check.

Observed behavior
=================

The session is an X11 UKUI session with zh_CN.UTF-8 as the main locale:

    XDG_SESSION_TYPE=x11
    DESKTOP_SESSION=ukui
    XDG_SESSION_DESKTOP=ukui
    XDG_CURRENT_DESKTOP=UKUI
    LANG=zh_CN.UTF-8

At login, /etc/X11/Xsession.d/70im-config_launch runs phase1 and selects
fcitx5:

    im-config:   Set environment variables from 
/etc/X11/Xsession.d/70im-config_launch (all empty strings)
    im-config:   @ IM_CONFIG_PHASE='1'
    im-config:     echo_auto_selected_im: im='fcitx5' for not_GNOME and CJK for 
IM_CONFIG_PREFERRED='fcitx5'
    im-config:     run_im: source 'fcitx5.rc'.
    im-config:   >>> GTK_IM_MODULE='fcitx' QT_IM_MODULE='fcitx' 
CLUTTER_IM_MODULE='xim' SDL_IM_MODULE='fcitx' XMODIFIERS='@im=fcitx'

Then im-launch starts from /etc/X11/Xsession.d/99x11-common_start and runs its
phase2 comparison. The clean-environment subshell selects ibus instead:

    im-config: @ IM_CONFIG_ENTRY='xsession-im-launch' XDG_SESSION_TYPE ='x11'
    im-config:   GTK_IM_MODULE='fcitx' QT_IM_MODULE='fcitx' 
CLUTTER_IM_MODULE='xim' SDL_IM_MODULE='fcitx' XMODIFIERS='@im=fcitx'
    im-config:   BEGIN for xsession-im-launch * x11 
(/etc/X11/Xsession.d/99x11-common_start)
    im-config: @ IM_CONFIG_ENTRY='subshell' XDG_SESSION_TYPE ='x11'
    im-config:   GTK_IM_MODULE='' QT_IM_MODULE='' CLUTTER_IM_MODULE='' 
SDL_IM_MODULE='' XMODIFIERS=''
    im-config:   @ IM_CONFIG_PHASE='1'
    im-config:     echo_auto_selected_im: 
im=$(echo_highest_priority_installed_im) for not_GNOME and not_CJKV
    im-config:     echo_highest_priority_installed_im 'ibus'
    im-config:     run_im: source 'ibus.rc'.
    im-config:   >>> GTK_IM_MODULE='ibus' QT_IM_MODULE='ibus' 
CLUTTER_IM_MODULE='ibus' SDL_IM_MODULE='' XMODIFIERS='@im=ibus'
    im-config:   Don't start daemon from /etc/X11/Xsession.d/99x11-common_start 
(variables changed from /etc/X11/Xsession.d/70im-config_launch)

As a result, the phase2 branch in /usr/share/im-config/data/23_fcitx5.rc is not
reached, so /usr/bin/fcitx5 -d is not started by im-config.

I temporarily added logging to 23_fcitx5.rc and confirmed it was only run with
IM_CONFIG_PHASE=1:

    2026-04-24 13:47:09 23_fcitx5.rc: before phase2 check, IM_CONFIG_PHASE=1
    2026-04-24 13:47:09 23_fcitx5.rc: after phase2 check, IM_CONFIG_PHASE=1

Expected behavior
=================

The im-launch phase2 check should compute the same automatic input method as
phase1 when the relevant session and locale inputs have not changed. In this
case both phase1 and the im-launch subshell should select fcitx5, and im-launch
should then start /usr/bin/fcitx5 -d.

Actual behavior
===============

phase1 selects fcitx5, but the im-launch clean-environment subshell selects
ibus. im-launch treats this as an environment mismatch and refuses to run the
phase2 daemon startup code.

Likely cause
============

In /usr/bin/im-launch, the clean environment is created with entries like:

    LANG="$LANG" \
    LANGUAGE="$LANGUAGE" \
    LC_ALL="$LC_ALL" \
    LC_CTYPE="$LC_CTYPE" \

If LC_CTYPE is unset or empty in the parent environment, this still passes an
explicit empty LC_CTYPE variable to the subshell. That empty LC_CTYPE overrides
LANG for im-config's locale detection in xinputrc.common:

    IM_CONFIG_LC_CTYPE=$(locale | sed -nr 's/LC_CTYPE=\"?([a-zA-Z_]*).*/\1/p')

Minimal reproduction of that specific locale issue:

    $ env -i LANG=zh_CN.UTF-8 LC_CTYPE= locale | sed -nr 
's/LC_CTYPE=\"?([a-zA-Z_]*).*/LC_CTYPE parsed: \1/p'
    LC_CTYPE parsed:

    $ env -i LANG=zh_CN.UTF-8 locale | sed -nr 
's/LC_CTYPE=\"?([a-zA-Z_]*).*/LC_CTYPE parsed: \1/p'
    LC_CTYPE parsed: zh_CN

The same difference changes im-config's auto selection:

    $ env -i HOME="$HOME" LANG=zh_CN.UTF-8 LANGUAGE= XDG_SESSION_TYPE=x11 
XDG_SESSION_DESKTOP=ukui XDG_CURRENT_DESKTOP=UKUI DESKTOP_SESSION=ukui 
IM_CONFIG_ENTRY=subshell IM_CONFIG_PHASE=1 sh -c '. 
/usr/share/im-config/initializer; . /usr/share/im-config/im-config_setting; 
printf "%s\n" "$GTK_IM_MODULE $QT_IM_MODULE $CLUTTER_IM_MODULE $SDL_IM_MODULE 
$XMODIFIERS"'
    fcitx fcitx xim fcitx @im=fcitx

    $ env -i HOME="$HOME" LANG=zh_CN.UTF-8 LANGUAGE= LC_CTYPE= 
XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=ukui XDG_CURRENT_DESKTOP=UKUI 
DESKTOP_SESSION=ukui IM_CONFIG_ENTRY=subshell IM_CONFIG_PHASE=1 sh -c '. 
/usr/share/im-config/initializer; . /usr/share/im-config/im-config_setting; 
printf "%s\n" "$GTK_IM_MODULE $QT_IM_MODULE $CLUTTER_IM_MODULE $SDL_IM_MODULE 
$XMODIFIERS"'
    ibus ibus ibus  @im=ibus

Suggested direction
===================

Please avoid injecting empty locale variables into the env -i subshell in
im-launch. For example, LC_ALL and LC_CTYPE could be omitted when they are
empty, or LC_CTYPE could fall back to LANG when unset/empty, so that locale(1)
inside the subshell sees the same effective LC_CTYPE as phase1.

System/package information
==========================

    im-config 0.62
    fcitx5 5.1.19-1
    ibus 1.5.34~rc2-1
    x11-common 1:7.7+26ubuntu1
    gettext-base 0.23.2-1

    Distribution/flavour: Ubuntu Kylin 26.04
    lsb_release output:
      Distributor ID: Ubuntu
      Description:    Ubuntu 26.04 LTS
      Release:        26.04
      Codename:       resolute

    Linux kylin-A7S-E3 7.0.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Mon Apr 
13 11:09:53 UTC 2026 x86_64 GNU/Linux

Regards,
zhangpan


-- System Information:
Debian Release: forky/sid
  APT prefers resolute
  APT policy: (500, 'resolute')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.0-14-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to C.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

--- End Message ---
--- Begin Message ---
Source: im-config
Source-Version: 1.0
Done: Osamu Aoki <[email protected]>

We believe that the bug you reported is fixed in the latest version of
im-config, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Osamu Aoki <[email protected]> (supplier of updated im-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 07 Jul 2026 02:01:46 +0900
Source: im-config
Architecture: source
Version: 1.0
Distribution: unstable
Urgency: medium
Maintainer: Debian Input Method Team <[email protected]>
Changed-By: Osamu Aoki <[email protected]>
Closes: 1112639 1134791 1141583
Changes:
 im-config (1.0) unstable; urgency=medium
 .
   * Major code refactor with cleaner logic
     (Closes: #1141583, #1134791)
   * Remove old unsuccessful artifacts accumulated to support Wayland.
   * No more root operation.
   * Skip IBUS_ENABLE_SYNC_MODE (Closes: #1112639)
Checksums-Sha1:
 e024980d19723d2cfbc8e290a1461b5dc1a0b33e 1916 im-config_1.0.dsc
 c30a2e16216e4d46260cb9309c05ed8c3f21ee8b 36072 im-config_1.0.tar.xz
Checksums-Sha256:
 64cb11635bf4b52e3a58ef687b7f24d2e445147211672b0336f41f0739b43071 1916 
im-config_1.0.dsc
 52ba7d5367fb4d023bf1b50977e9f42efb4b0950fa23ca1b669c17a385c78240 36072 
im-config_1.0.tar.xz
Files:
 77a617a491bb4d0886a1b48c32ed32e7 1916 utils optional im-config_1.0.dsc
 d1c64c955153e6bd559f9b2d69d209fc 36072 utils optional im-config_1.0.tar.xz

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEMTNyTWIHiBV56V1iHhNWiB3Y15EFAmpL4AURHG9zYW11QGRl
Ymlhbi5vcmcACgkQHhNWiB3Y15FF6g//Sb99IeWdj+WFeO/YlybAQf1fmWHerSeB
9NXgCinzy6vQlhgwnrWziF0jxgyZy48nuT0P/sYkpKv1addDOmqkUsogJTXO/MWy
8frW+A5YKqercSJsRq4FMEvU0gxKFqbOo2Wm+LZdoW+SKLMN92zfXJkecxj/hkvr
pdNWVRERaVEpXppQeohWcQkWSrZSBA+vpLqJUfxgeapYos1JWdMjZngMMpnWCUrR
e9wBHJTD5S1rCydSB3IdJdDGNBHB7UW2AV6rjn3M9bXzuNu17mciqXuHfPIyKA5g
7wxwYqCeBL8of6/Il9JUtojC1EqP7j4yqKDJ+P/t7tStke24S+eHcZdFMzq+Sh9y
JkugD6FT+dmbmXhhKQ6t8scl6PfFdkA0erpS2/0kfxOP2o4RrqptnILQHj6RdLwO
YHHLjQaDq7+Id2SNGI3sInW0UU9+jxa1uDqhGNkmL2CKO2Gk5mIiMZ5DxJMzJKYL
PKAnmNU7Lo2whIciZkh+lgh7zvK9o3rtISgVvUWT//PITTigGcKzv6wc1HqNIPk2
DDMEt4BAer/D1yWvN29A8Dh6HPqkg2+7CuTe7WodzS8YtNV6b4pVhfWmsu0xe6iK
HwUZt8KBej8XoQ8NGGedhm+0e6I1kbpJHiKhmqobCzO23HwGEc/eIDYSWcRGxUGr
ASVnrSfVi3c=
=wLmf
-----END PGP SIGNATURE-----

Attachment: pgpP2mBf97GdR.pgp
Description: PGP signature


--- End Message ---

Reply via email to