我在xubuntu24.04上面安装了 bleachbit,选择清除了APT、dEEP SCAN中的...

Создано: 26 марта 2026 г.

Отвечено с использованием GPT-5.3 от Chat01

Вопрос

我在xubuntu24.04上面安装了 bleachbit,选择清除了APT、dEEP SCAN中的teMPORARY FILES、System中的全部执行后,我的IDEA 无法使用fcitx5打出中文了,在浏览器或者 word中是可以打出中文的,xubuntu使用的是xfce桌面.我的电脑在使用bleachbit之前在IDEA中是可以打出中文的

Ответ

这个问题基本可以确定是 BleachBit 清理时误删了 fcitx5 或输入法相关的缓存 / 配置 / 环境变量依赖,而 IDEA(JetBrains 系列)对输入法支持本来就比较“挑环境”,所以只在 IDEA 里失效。

你现在的情况是:

  • ✅ 浏览器 / LibreOffice 正常 → fcitx5 本身没坏
  • ❌ IDEA 不行 → 多半是 环境变量 / fcitx模块 / IDEA输入法兼容层 出问题

下面按“从最可能 → 最彻底”的顺序帮你排查👇


✅ 一、先确认 fcitx5 环境变量(最关键)

在终端执行:

bash
echo $GTK_IM_MODULE echo $QT_IM_MODULE echo $XMODIFIERS

正常应该是:

text
GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx

❗如果不是,修复:

编辑:

bash
nano ~/.xprofile

写入:

bash
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx

然后执行:

bash
source ~/.xprofile

👉 重启系统(必须)


✅ 二、确认 fcitx5 在 IDEA 进程中生效

启动 IDEA 后,在终端执行:

bash
ps aux | grep idea

找到进程 PID,然后:

bash
cat /proc/进程ID/environ | tr '\0' '\n' | grep IM

👉 如果这里没有 fcitx 相关变量
说明 IDEA 启动时没加载输入法环境(非常常见)


✅ 三、最常见原因:BleachBit 删除了 fcitx5 模块

重新安装一遍输入法组件:

bash
sudo apt install --reinstall \ fcitx5 \ fcitx5-configtool \ fcitx5-frontend-gtk3 \ fcitx5-frontend-qt5 \ fcitx5-module-xorg \ fcitx5-chinese-addons

✅ 四、IDEA 专属问题(重点)

JetBrains IDE 在 Linux 上需要额外支持:

👉 安装 fcitx5-qt(关键)

bash
sudo apt install fcitx5-frontend-qt5 fcitx5-frontend-qt6

👉 如果你用的是 JetBrains Toolbox 启动 IDEA

Toolbox 启动不会继承系统环境变量!

解决:

修改启动脚本:

bash
nano ~/.local/share/JetBrains/Toolbox/scripts/idea.sh

在最前面加:

bash
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx

✅ 五、尝试用 ibus 兼容模式(备用方案)

JetBrains 有时候更兼容 ibus:

bash
export GTK_IM_MODULE=ibus export QT_IM_MODULE=ibus export XMODIFIERS=@im=ibus

(但一般 fcitx5 + qt 插件就够了)


✅ 六、检查 fcitx5 是否正常运行

bash
fcitx5-diagnose

重点看:

  • frontend 是否正常
  • qt/gtk 模块是否 loaded

✅ 七、最直接验证方法

用终端启动 IDEA(很关键):

bash
GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx idea.sh

👉 如果这样能输入中文
说明问题 100% 是环境变量丢失


💥 为什么 BleachBit 会导致这个问题?

BleachBit 的这些选项很危险:

  • APT cache(可能删依赖状态)
  • Deep Scan Temporary Files(可能删 /tmp 运行时 socket)
  • System 全选(可能删配置)

👉 fcitx5 依赖:

  • socket 文件
  • cache
  • env hook

这些被删后: 👉 普通应用自动恢复
👉 IDEA 不会(它对输入法支持不标准)


✅ 推荐最终解决路径(最省事)

直接执行这一套👇

bash
sudo apt install --reinstall fcitx5* nano ~/.xprofile

写入:

bash
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx

然后:

bash
reboot

🚀 如果还不行

你可以把下面信息发我,我可以帮你精准定位:

bash
echo $XDG_SESSION_TYPE echo $DESKTOP_SESSION fcitx5-diagnose

还有你 IDEA 是:

  • snap 安装?
  • 官方 tar.gz?
  • toolbox?

👉 不同安装方式解决方案会不一样 👍

Вопрос

我的IDEA是官方 tar.gz,,已经执行你推荐的修复方式
randy@randy-CP300Z3:~echoechoXDG_SESSION_TYPE
echo $DESKTOP_SESSION
fcitx5-diagnose
x11
xubuntu

System Info:

  1. uname -a:

    Linux randy-CP300Z3 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
    
  2. lsb_release -a:

    text
    Distributor ID: Ubuntu Description: Ubuntu 24.04.3 LTS Release: 24.04 Codename: noble
  3. lsb_release -d:

    Description:	Ubuntu 24.04.3 LTS
    
  4. /etc/lsb-release:

    text
    DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.3 LTS"
  5. /etc/os-release:

    text
    PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo
  6. Desktop Environment:

    Desktop environment is xfce.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='x11'
    
  8. Bash Version:

    BASH_VERSION='5.2.21(1)-release'
    

Environment:

  1. DISPLAY:

    text
    DISPLAY=':0.0' WAYLAND_DISPLAY=''
  2. Keyboard Layout:

    1. setxkbmap:

      text
      xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+cn+inet(evdev)" }; xkb_geometry { include "pc(pc105)" }; };
    2. xprop:

      _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "cn", "", ""
      
  3. Locale:

    1. All locales:

      text
      C C.utf8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 POSIX zh_CN.utf8 zh_SG.utf8
    2. Current locale:

      text
      LANG=zh_CN.UTF-8 LANGUAGE=zh_CN LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL=
  4. Directories:

    1. Home:

      /home/randy
      
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

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

    3. Fcitx5 Settings Directory:

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

  5. Current user:

    The script is run as randy (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.1.7

  3. process:

    Found 1 fcitx5 process:

       2548 fcitx5
    
  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.43.

    PID of DBus name org.fcitx.Fcitx5 owner is 2548.

    Debug information from dbus:

    text
    Group [x11::0.0] has 5 InputContext(s) IC [1831f82f90c34d2db42d761c9e0915f7] program:xfce4-terminal frontend:dbus cap:6000000032 focus:1 IC [467aaa4c0a964d9ba34b421df5b00fc2] program:xfce4-terminal frontend:dbus cap:6000000032 focus:0 IC [d874e25a10084118aca2b374e0b1a14f] program:firefox frontend:fcitx4 cap:12 focus:0 IC [b204d75e09784334822bb82426e484b9] program:firefox frontend:fcitx4 cap:52 focus:0 IC [6f701c7a170e4799ba4c0e04ad2e027f] program:wrapper-2.0 frontend:dbus cap:6000000072 focus:0 Input Context without group

Fcitx Configure UI:

  1. Config Tool Wrapper:

    Found fcitx5-configtool at /usr/bin/fcitx5-configtool.

  2. Config GUI for qt:

    Found fcitx5-config-qt at /usr/bin/fcitx5-config-qt.

  3. Config GUI for kde:

    kcmshell5 not found.

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:

    text
    QT_QPA_PLATFORM=xcb QT_IM_MODULE=fcitx IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
  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:

    text
    QT_QPA_PLATFORM=xcb QT_IM_MODULE=fcitx IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
  4. Qt IM module files:

    Found fcitx5 im module for qt6: /lib/x86_64-linux-gnu/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found fcitx5 qt6 module: /lib/x86_64-linux-gnu/fcitx5/qt6/libfcitx-quickphrase-editor5.so.
    Found fcitx5 im module for qt5: /lib/x86_64-linux-gnu/qt5/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:

    GTK_IM_MODULE=fcitx
    

    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:

    GTK_IM_MODULE=fcitx
    
  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:

      Cannot find gtk-query-immodules for gtk 3

      Cannot find fcitx5 im module for gtk 3.

  3. Gtk IM module cache:

    1. gtk 2:

      Found immodules cache for gtk 2.24.33 at /lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache.
      Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0t64/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Found fcitx5 im modules for gtk 2.24.33.

      text
      "/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.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:*"
    2. gtk 3:

      Found immodules cache for gtk 3.24.41 at /lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache.
      Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk-3-0t64/gtk-query-immodules-3.0 from gtk+-3.24.41
      

      Found fcitx5 im modules for gtk 3.24.41.

      text
      "/usr/lib/x86_64-linux-gnu/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 29 enabled addons:

      text
      Simplified and Traditional Chinese Translation 5.1.3 Classic User Interface 5.1.7 Clipboard 5.1.7 Cloud Pinyin 5.1.3 DBus 5.1.7 DBus Frontend 5.1.7 Emoji 5.1.7 Fcitx4 Frontend 5.1.7 Full width character 5.1.3 IBus Frontend 5.1.7 Lua IME API 5.0.12 Input method selector 5.1.7 Keyboard 5.1.7 KDE Input Method Panel 5.1.7 Lua Addon Loader 5.0.12 Status Notifier 5.1.7 Notification 5.1.7 Pinyin 5.1.3 Extra Pinyin functionality 5.1.3 Punctuation 5.1.3 Quick Phrase 5.1.7 Spell 5.1.7 Table 5.1.3 Unicode 5.1.7 DBus Virtual Keyboard 5.1.7 Wayland 5.1.7 Wayland Input method frontend 5.1.7 XCB 5.1.7 X Input Method Frontend 5.1.7
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 3 enabled user interface addons:

    text
    Classic User Interface KDE Input Method Panel DBus Virtual Keyboard

Input Methods:

  1. /home/randy/.config/fcitx5/profile:

    text
    [Groups/0] # Group Name Name=Default # Layout Default Layout=cn # Default Input Method DefaultIM=wbpy [Groups/0/Items/0] # Name Name=keyboard-cn # Layout Layout= [Groups/0/Items/1] # Name Name=wbpy # Layout Layout= [GroupOrder] 0=Default

Log:

  1. date:

    2026年 03月 26日 星期四 16:29:32 CST
    
  2. /home/randy/.config/fcitx5/crash.log:

    /home/randy/.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.

Мысль

Troubleshooting IDEA input context issue

Based on my diagnostics, it seems the problem is that IDEA is not connecting to fcitx. The issue is likely with the desktop launcher not inheriting the correct environment variables. I’ll guide the user to edit the .desktop file or use a wrapper script to ensure fcitx works with IDEA. Let’s suggest these commands to help fix it:

  1. grep -R "Exec=.*idea" /.local/share/applications /usr/share/applications
  2. Replace Exec with a wrapper script if needed.

Troubleshooting Fcitx with JetBrains on Ubuntu

It seems like the problem might be with environment variables not persisting after BleachBit cleared some configurations, which could have affected the JBR. I'll suggest restarting after removing stale configs, specifically by running rm -rf /.cache/JetBrains/IntelliJIdea*. There's a known issue with Fcitx on Linux, and JetBrains needs X11 environment vars. I’ll ask the user to check the exact process environment too.

Thought for 51s

Ответ

从你这份 fcitx5-diagnose 看,fcitx5 本身是正常的,环境变量也正确,Qt/GTK 的输入法模块都在。关键异常点是:

  • firefoxxfce4-terminal 都有 InputContext
  • 没有看到 IDEA / java / jetbrains 的 InputContext

这说明不是 fcitx5 坏了,而是 IDEA 这个进程没有真正接入 fcitx。JetBrains 官方对 Linux + Fcitx 的说明也明确提到:在 X11 下必须让 IDE 进程拿到 GTK_IM_MODULE=fcitxQT_IM_MODULE=fcitxXMODIFIERS=@im=fcitx 这几个环境变量;同时,JetBrains 近期仍有 fcitx5 在 Linux 上失效的已知问题记录。(YouTrack)

你现在最像是这两类问题之一:

  1. IDEA 的启动方式没吃到环境变量
  2. BleachBit 清理后,IDEA 的用户配置里把输入法支持关掉了,或者启动配置被污染了

下面按最有效的顺序修。


先做结论判断

你的诊断结果已经足够说明:

  • 不是中文语言包问题
  • 不是 fcitx5 服务没启动
  • 不是 qt/gtk 模块缺失
  • 问题集中在 JetBrains Runtime / IDEA 启动配置

第一步:强制用带环境变量的方式启动 IDEA

不要先点桌面图标。先在终端里进入 IDEA 的 bin 目录启动:

bash
cd /你的/idea安装目录/bin env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx ./idea.sh

然后在 IDEA 编辑器里测试中文输入。

结果怎么判断

  • 如果这样能输入中文
    说明问题就是:桌面启动器/菜单启动方式没有把输入法环境传给 IDEA
  • 如果这样还是不能输入中文
    说明问题在:IDEA 自身配置 / JetBrains Runtime 状态

第二步:直接检查 IDEA 进程环境

启动 IDEA 后,执行:

bash
ps -ef | grep -i '[i]dea'

找到 IDEA 的 PID 后执行:

bash
tr '\0' '\n' < /proc/PID/environ | grep -E '^(GTK_IM_MODULE|QT_IM_MODULE|XMODIFIERS)='

正常应该看到:

bash
GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx

判断

  • 如果这里没有这三项,问题就坐实是 启动器问题
  • 如果这里有,但 IDEA 仍不能输入,继续做下面两步

第三步:修复桌面启动器

官方 tar.gz 常见情况是你后来创建了一个 .desktop 启动项,但这个启动项不一定带环境。

先找桌面文件:

bash
grep -R "idea.sh" ~/.local/share/applications /usr/share/applications 2>/dev/null

通常会看到类似:

bash
~/.local/share/applications/jetbrains-idea.desktop

编辑它:

bash
nano ~/.local/share/applications/jetbrains-idea.desktop

Exec= 改成这样:

ini
Exec=env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx /你的/idea安装目录/bin/idea.sh %f

保存后刷新:

bash
update-desktop-database ~/.local/share/applications

然后退出 IDEA,重新从菜单启动测试。


第四步:重置 IDEA 用户配置里的输入法相关状态

JetBrains 有过“把输入法支持禁用后不明显提示如何恢复”的问题记录。(YouTrack)

BleachBit 清理后,最值得怀疑的是 用户配置目录 有异常。

先备份再重置当前版本配置。执行前先关掉 IDEA:

bash
mv ~/.config/JetBrains ~/.config/JetBrains.bak.$(date +%F-%H%M%S) mv ~/.cache/JetBrains ~/.cache/JetBrains.bak.$(date +%F-%H%M%S) mv ~/.local/share/JetBrains ~/.local/share/JetBrains.bak.$(date +%F-%H%M%S)

然后重新启动 IDEA 测试。

说明

这一步会让 IDEA 像“第一次启动”那样重新生成配置。
如果这样恢复了中文输入,说明就是 JetBrains 配置被 BleachBit 清坏了


第五步:给 IDEA 显式加 Java 参数

JetBrains 在 Linux/Fcitx 上一直有兼容性问题,常见的补救方式是给 VM options 加一项。JetBrains 官方也承认 Linux 上 Fcitx/Fcitx5 存在持续问题。(YouTrack)

在 IDEA 的自定义 VM options 文件里加入:

text
-Drecreate.x11.input.method=true

如果你还没建过这个文件,可以直接在安装目录测试。编辑:

bash
nano /你的/idea安装目录/bin/idea64.vmoptions

在最后加:

text
-Drecreate.x11.input.method=true

保存后重启 IDEA。

注意

这个参数在部分版本上能修,在少数场景也可能引出键盘异常,所以它是“测试项”,不是绝对长期方案。JetBrains 那边也有相关问题记录。(YouTrack)


第六步:确认没有误用自定义 JDK / 自定义 JBR

在终端执行:

bash
/你的/idea安装目录/bin/idea.sh | head

或者进入 IDEA 的 Help → AboutRuntime version

你要确认两件事:

  • 不是外部系统 JDK 在启动 IDE
  • 不是某个旧的/损坏的 JBR 被引用了

如果你之前改过 IDEA_JDKJDK_HOMEJAVA_HOME,先临时清掉再试:

bash
unset IDEA_JDK unset JDK_HOME unset JAVA_HOME env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx /你的/idea安装目录/bin/idea.sh

第七步:最稳妥的“重新覆盖安装”

因为你是 tar.gz 安装,最省事的修复之一是:

  1. 下载一份新的同版本或最新版本 IDEA
  2. 解压到一个新目录
  3. 不要复用旧安装目录
  4. 用上面那个 env ... ./idea.sh 方式先启动测试

JetBrains 官方到现在仍在维护 Linux/Fcitx 相关问题;如果是 JBR 本身状态异常,直接换一份完整安装比在旧目录里修更快。(YouTrack)


我认为你现在最该先做的两步

按命中率排序:

1)先这样启动测试

bash
cd /你的/idea安装目录/bin env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx ./idea.sh

2)如果还不行,直接重置 JetBrains 用户配置

bash
mv ~/.config/JetBrains ~/.config/JetBrains.bak.$(date +%F-%H%M%S) mv ~/.cache/JetBrains ~/.cache/JetBrains.bak.$(date +%F-%H%M%S) mv ~/.local/share/JetBrains ~/.local/share/JetBrains.bak.$(date +%F-%H%M%S)

为什么我现在更怀疑 IDEA 配置,而不是 fcitx5

因为你的 fcitx5-diagnose 已经显示:

  • fcitx5 正在运行
  • DBus 正常
  • X11 会话正常
  • 环境变量正确
  • Qt5/Qt6 输入法模块都在
  • GTK 输入法模块都在

唯独没有 IDEA 的输入上下文。这基本已经把问题收敛到 “IDEA 进程自身” 了。


把这三条命令的结果发我,我可以直接帮你判断是哪一类,不用你再自己猜:

bash
ps -ef | grep -i '[i]dea' tr '\0' '\n' < /proc/上面那个PID/environ | grep -E '^(GTK_IM_MODULE|QT_IM_MODULE|XMODIFIERS|JAVA_HOME|IDEA_JDK)=' grep -R "Exec=.*idea" ~/.local/share/applications /usr/share/applications 2>/dev/null

Поделиться этим Q&A