fcitx5无法在Jetbrains IDE输入中文

目前Kate、FireFox这些是正常的,RustRover界面可以正常显示候选,但是空格之后中文不会出现在编辑器里。诊断信息看起来也没问题,希望朋友们帮忙看看有没有思路。

显示环境:plasma-x11-session

环境变量位置:/etc/environment

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx

诊断工具输出:

# System Info:
1.  `uname -a`:

        Linux w 6.16.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 Oct 2025 19:26:36 +0000 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` not found.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` not found.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        PRETTY_NAME="Arch Linux"
        ID=arch
        BUILD_ID=rolling
        ANSI_COLOR="38;2;23;147;209"
        HOME_URL="https://archlinux.org/"
        DOCUMENTATION_URL="https://wiki.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
        PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
        LOGO=archlinux-logo

5.  Desktop Environment:

    Desktop environment is `kde`.

6.  XDG SESSION TYPE:

        XDG_SESSION_TYPE='x11'

7.  Bash Version:

        BASH_VERSION='5.3.3(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'


        WAYLAND_DISPLAY=''

2.  Keyboard Layout:

    1.  `setxkbmap`:

            xkb_keymap {
                xkb_keycodes  { include "evdev+aliases(qwerty)" };
                xkb_types     { include "complete"      };
                xkb_compat    { include "complete"      };
                xkb_symbols   { include "pc+us+inet(evdev)"     };
                xkb_geometry  { include "pc(pc104)"     };
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  All locales:

            C
            C.utf8
            en_US.utf8
            POSIX
            zh_CN.utf8
            zh_HK.utf8
            zh_TW.utf8

    2.  Current locale:

            LANG=en_US.UTF-8
            LC_CTYPE="en_US.UTF-8"
            LC_NUMERIC="en_US.UTF-8"
            LC_TIME=en_GB.UTF-8
            LC_COLLATE="en_US.UTF-8"
            LC_MONETARY="en_US.UTF-8"
            LC_MESSAGES="en_US.UTF-8"
            LC_PAPER="en_US.UTF-8"
            LC_NAME="en_US.UTF-8"
            LC_ADDRESS="en_US.UTF-8"
            LC_TELEPHONE="en_US.UTF-8"
            LC_MEASUREMENT="en_US.UTF-8"
            LC_IDENTIFICATION="en_US.UTF-8"
            LC_ALL=

        **Error occurs when running `locale`. Please check your locale settings.**

            locale: Cannot set LC_ALL to default locale: No such file or directory

4.  Directories:

    1.  Home:

            /home/raner

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

        Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/raner/.config`).

    3.  Fcitx5 Settings Directory:

        Current fcitx5 settings directory is `~/.config/fcitx5` (`/home/raner/.config/fcitx5`).

5.  Current user:

    The script is run as raner (1000).

# Fcitx State:
1.  executable:

    Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

    Fcitx version: `5.1.14`

3.  process:

    Found 2 fcitx5 processes:

           1377 fcitx5
           1461 fcitx5-plasma-t

4.  `fcitx5-remote`:

    `fcitx5-remote` works properly.

5.  DBus interface:

    Using `dbus-send` to check dbus.

    Owner of DBus name `org.fcitx.Fcitx5` is `:1.57`.

    PID of DBus name `org.fcitx.Fcitx5` owner is `1377`.

    Debug information from dbus:

           Group [x11::0] has 11 InputContext(s)
          IC [3b2c648079e3414884e33d8633e6fcf6] program:rustrover frontend:xim cap:4000000000 focus:0
          IC [2c032f0e19ab4bf6b5835bd25663db21] program: frontend:xim cap:4000000000 focus:0
          IC [65774837d88943e7b51fc652b6bd9d4c] program:datagrip frontend:xim cap:4000000000 focus:0
          IC [60d2a7659ca9491485189d6fc019b170] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [8c5ca76cbeeb4563bcc6716cf715cfb3] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [d6a71f410b7c48169e2047ace3d2994e] program:firefox frontend:dbus cap:6000000072 focus:0
          IC [29d46cbc24324ec9b176ad14ac58fa0a] program:konsole frontend:dbus cap:6000820872 focus:1
          IC [fd8a18e84c8b4775ab40c873604a8a4f] program: frontend:xim cap:4000000000 focus:0
          IC [3182fe912e4547eab0ac089572007015] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [40c5e536ad5b4892b9c6384e8cc25659] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [ef575322b43d48d29361de61c94ed5fa] program:cfw frontend:dbus cap:6000000032 focus:0
        Input Context without group

# Frontends setup:
The environment variable checked by this script only shows the environment under current shell. It is still possible that you did not set the environment to the whole graphic desktop session. You may inspect the actual environment variable of a certain process by using `xargs -0 -L1 /proc/$PID/environ` for a certain process that you find not working.

## Xim:
1.  `${XMODIFIERS}`:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    Xim Server Name from Environment variable is fcitx.

2.  XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

    **`fcitx5-qt4-immodule-probing` not found.**

2.  qt5 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

    Using fcitx5-qt5-immodule-probing to check the actual im module to be used under current environment:



3.  qt6 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

    Using fcitx5-qt6-immodule-probing to check the actual im module to be used under current environment:

        QT_QPA_PLATFORM=xcb
        QT_IM_MODULE=fcitx
        IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext

4.  Qt IM module files:

    Found fcitx5 qt6 module: `/usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so`.
    Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found unknown fcitx qt module: `/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so`.
    Found fcitx5 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.

    Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    **Cannot find fcitx5 input method module for Qt4.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

    Using fcitx5-gtk2-immodule-probing to check the actual im module to be used under current environment:



    Using fcitx5-gtk3-immodule-probing to check the actual im module to be used under current environment:

        GTK_IM_MODULE=fcitx

    Using fcitx5-gtk4-immodule-probing to check the actual im module to be used under current environment:



2.  `gtk-query-immodules`:

    1.  gtk 2:

        **Cannot find `gtk-query-immodules` for gtk 2**

        **Cannot find fcitx5 im module for gtk 2.**

    2.  gtk 3:

        Found `gtk-query-immodules` for gtk `3.24.51` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.51

        Found fcitx5 im modules for gtk `3.24.51`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

3.  Gtk IM module cache:

    1.  gtk 2:

        **Cannot find immodules cache for gtk 2**

        **Cannot find fcitx5 im module for gtk 2 in cache.**

    2.  gtk 3:

        Found immodules cache for gtk `3.24.51` at `/usr/lib/gtk-3.0/3.0.0/immodules.cache`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.51

        Found fcitx5 im modules for gtk `3.24.51`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

4.  Gtk IM module files:

    1.  gtk 2:

        All found Gtk 2 immodule files exist.

    2.  gtk 3:

        All found Gtk 3 immodule files exist.

    3.  gtk 4:

        All found Gtk 4 immodule files exist.

# Configuration:
## Fcitx Addons:
1.  Addon Config Dir:

    Found fcitx5 addon config directory: `/usr/share/fcitx5/addon`.

2.  Addon List:

    1.  Found 27 enabled addons:

            Simplified and Traditional Chinese Translation 5.1.9
            Classic User Interface 5.1.14
            Clipboard 5.1.14
            Cloud Pinyin 5.1.9
            DBus 5.1.14
            DBus Frontend 5.1.14
            Emoji 5.1.14
            Fcitx4 Frontend 5.1.14
            Full width character 5.1.9
            IBus Frontend 5.1.14
            Input method selector 5.1.14
            Keyboard 5.1.14
            KDE Input Method Panel 5.1.14
            Status Notifier 5.1.14
            Notification 5.1.14
            Pinyin 5.1.9
            Extra Pinyin functionality 5.1.9
            Punctuation 5.1.9
            Quick Phrase 5.1.14
            Spell 5.1.14
            Table 5.1.9
            Unicode 5.1.14
            DBus Virtual Keyboard 5.1.14
            Wayland 5.1.14
            Wayland Input method frontend 5.1.14
            XCB 5.1.14
            X Input Method Frontend 5.1.14

    2.  Found 0 disabled addons:

3.  Addon Libraries:

    All libraries for all addons are found.

4.  User Interface:

    Found 3 enabled user interface addons:

        Classic User Interface
        KDE Input Method Panel
        DBus Virtual Keyboard

## Input Methods:
1.  `/home/raner/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name=Default
        # Layout
        Default Layout=us
        # Default Input Method
        DefaultIM=pinyin

        [Groups/0/Items/0]
        # Name
        Name=keyboard-us
        # Layout
        Layout=

        [Groups/0/Items/1]
        # Name
        Name=pinyin
        # Layout
        Layout=us

        [GroupOrder]
        0=Default

# Log:
1.  `date`:

        Sat Oct 25 11:03:59 CST 2025

2.  `/home/raner/.config/fcitx5/crash.log`:

    `/home/raner/.config/fcitx5/crash.log` not found.

**Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.**

**Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.**

你的locale用到了en_GB.UTF-8但是你没有启用它。

1 Like

我使用wayland,没啥问题

感谢帮助!这里贴一下具体操作和结果。

  1. 解除/etc/locale.genen_GB.UTF-8这一行的注释;
  2. 运行locale-gen
  3. 重启RustRover即可成功输入中文

diagnose显示结果中locale不出现任何报错如下,注意3.1中新增的en_GB.UTF-8

3.  Locale:

    1.  All locales:

            C
            C.utf8
            en_GB.utf8
            en_US.utf8
            POSIX
            zh_CN.utf8
            zh_HK.utf8
            zh_TW.utf8

    2.  Current locale:

            LANG=en_US.UTF-8
            LC_CTYPE="en_US.UTF-8"
            LC_NUMERIC="en_US.UTF-8"
            LC_TIME=en_GB.UTF-8
            LC_COLLATE="en_US.UTF-8"
            LC_MONETARY="en_US.UTF-8"
            LC_MESSAGES="en_US.UTF-8"
            LC_PAPER="en_US.UTF-8"
            LC_NAME="en_US.UTF-8"
            LC_ADDRESS="en_US.UTF-8"
            LC_TELEPHONE="en_US.UTF-8"
            LC_MEASUREMENT="en_US.UTF-8"
            LC_IDENTIFICATION="en_US.UTF-8"
            LC_ALL=