环境arch hyprland fcitx5 对于onlyoffice 不管是在setting.ini还是直接显式指定
QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx onlyoffice-desktopeditors
都无法输入中文,以下是fcitx diagnose输出
fcitx diagnose
# 系统信息:
1. `uname -a`:
Linux laptop-arch 6.18.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 02 Jan 2026 17:52:55 +0000 x86_64 GNU/Linux
2. `lsb_release`:
`lsb_release` 未找到.
3. `/etc/lsb-release`:
`/etc/lsb-release` 未找到.
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. 桌面环境:
无法确定桌面环境。
6. XDG 会话类型:
XDG_SESSION_TYPE='wayland'
7. Bash 版本:
BASH_VERSION='5.3.9(1)-release'
# 环境:
1. DISPLAY:
DISPLAY=':0'
WAYLAND_DISPLAY='wayland-1'
2. 键盘布局:
1. `setxkbmap`:
WARNING: Running setxkbmap against an Xwayland server
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(pc105)" };
};
2. `xprop`:
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
3. Locale:
1. 全部可用 locale:
C
C.utf8
en_US.utf8
POSIX
zh_CN.utf8
2. 当前 locale:
LANG=zh_CN.UTF-8
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. 目录:
1. 主目录:
/home/xxx
2. `${XDG_CONFIG_HOME}`:
环境变量 `XDG_CONFIG_HOME` 是设定为 `/home/xxx/.config` 。
`XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/xxx/.config`)。
3. Fcitx5 设置目录:
当前 fcitx5 设置目录是 `~/.config/fcitx5` (`/home/xxx/.config/fcitx5`)。
5. 当前用户:
脚本作为 xxx (1000) 运行。
# Fcitx 状态:
1. 可执行文件:
在 `/usr/sbin/fcitx5` 找到了 fcitx5。
2. 版本:
Fcitx 版本: `5.1.17`
3. 进程:
找到了 1 个 fcitx5 进程:
33426 fcitx5
4. `fcitx5-remote`:
`fcitx5-remote` 工作正常。
5. DBus 界面:
使用 `dbus-send` 来检查 dbus。
DBus 名称 `org.fcitx.Fcitx5` 的所有者是 `:1.451`。
DBus 名称 `org.fcitx.Fcitx5` 的 PID 所有者是 `33426`。
来自 dbus 的调试信息:
Group [wayland:] has 5 InputContext(s)
IC [1cfe53270c2c47ce9538c8f8e3b28c88] program:kitty frontend:wayland_v2 cap:100000072 focus:0
IC [0fd8367b1e4e43b5b90b0beb67393c62] program:firefox frontend:wayland_v2 cap:72 focus:0
IC [a965d350f15047d88cd750c52e689b4d] program:kitty frontend:wayland_v2 cap:100000072 focus:1
IC [15b72034da134b469289040e95651e03] program:ONLYOFFICE frontend:wayland_v2 cap:100000072 focus:0
IC [2160b2634b0b4f1f8b6b49e86027e646] program: frontend:wayland_v2 cap:100000072 focus:0
Group [x11::0] has 0 InputContext(s)
Input Context without group
# 前端设置:
此脚本检查的环境变量仅能显示当前命令行的环境。仍有可能您的环境并没有应用于整个桌面。您可以通过使用命令对某个无法正常工作的进程使用命令 `xargs -0 -L1 /proc/$PID/environ` 检查此进程的实际的环境变量。
## Xim:
1. `${XMODIFIERS}`:
**XMODIFIERS 没有设置**
**请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中。参见 [输入法相关的环境变量:XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#XMODIFIERS)。**
从环境变量中获取的 Xim 服务名称为 fcitx.
2. 根窗口上的 XIM_SERVERS:
Xim 服务的名称与环境变量中设置的相同。
## Qt:
1. qt4 - `${QT4_IM_MODULE}`:
**请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中。参见 [输入法相关的环境变量:QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE)。**
**`fcitx5-qt4-immodule-probing` 未找到.**
2. qt5 - `${QT_IM_MODULE}`:
**请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中。参见 [输入法相关的环境变量:QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE)。**
**如果您的混成器完全支持 qt5 使用的 text-input 协议,您也可以使用 qt5 内置的 Wayland 模块。**
使用 fcitx5-qt5-immodule-probing 来检查在当前环境下将被实际使用的输入法模块:
QT_QPA_PLATFORM=wayland
QT_IM_MODULE=
IM_MODULE_CLASSNAME=QComposeInputContext
3. qt6 - `${QT_IM_MODULE}`:
**请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中。参见 [输入法相关的环境变量:QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE)。**
**如果您的混成器完全支持 qt6 使用的 text-input 协议,您也可以使用 qt6 内置的 Wayland 模块。**
使用 fcitx5-qt6-immodule-probing 来检查在当前环境下将被实际使用的输入法模块:
QT_QPA_PLATFORM=wayland
QT_IM_MODULE=
IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
4. Qt 输入法模块文件:
找到了 fcitx5 的 qt 输入法模块:`/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`。
找到了 fcitx5 的 qt6 输入法模块:`/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`。
找到了未知的 fcitx qt 模块:`/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so`。
找到了 fcitx5 qt6 模块:`/usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so`。
下列错误也许并不准确,因为对路径所对应的 Qt 版本的猜测取决于发行版如何打包 Qt。如果您不使用任何对应版本的 Qt 程序,或者在 Wayland 下使用 Qt 的 text-input 支持,下列错误也不是严重问题。
**无法找到 Qt4 的 fcitx5 输入法模块。**
## Gtk:
1. gtk - `${GTK_IM_MODULE}`:
**请使用您发行版提供的工具将环境变量 GTK_IM_MODULE 设为 "fcitx" 或者将 `export GTK_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中。参见 [输入法相关的环境变量:GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#GTK_IM_MODULE)。**
**如果您的混成器完全支持 gtk 使用的 text-input 协议,您也可以使用 gtk 内置的 Wayland 模块。**
**`fcitx5-gtk2-immodule-probing` 未找到.**
**`fcitx5-gtk3-immodule-probing` 未找到.**
**`fcitx5-gtk4-immodule-probing` 未找到.**
2. `gtk-query-immodules`:
1. gtk 2:
**无法找到 gtk 2 的 `gtk-query-immodules`。**
**无法找到 gtk 2 的 fcitx5 输入法模块。**
2. gtk 3:
在 `/usr/sbin/gtk-query-immodules-3.0` 找到了 gtk `3.24.51` 的 `gtk-query-immodules`。
版本行:
# Created by /usr/sbin/gtk-query-immodules-3.0 from gtk+-3.24.51
**无法在 `/usr/sbin/gtk-query-immodules-3.0` 的输出中找到 fcitx5。**
**无法找到 gtk 3 的 fcitx5 输入法模块。**
3. Gtk 输入法模块缓存:
1. gtk 2:
**无法找到 gtk 2 的输入法模块缓存**
**无法在缓存中找到 gtk 2 的 fcitx5 输入法模块。**
2. gtk 3:
在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.24.51` 的输入法模块缓存。
版本行:
# Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.51
**无法输入法模块缓存 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 中找到 fcitx5**
**无法在缓存中找到 gtk 3 的 fcitx5 输入法模块。**
4. Gtk 输入法模块文件:
1. gtk 2:
找到的全部 Gtk 2 输入法模块文件均存在。
2. gtk 3:
找到的全部 Gtk 3 输入法模块文件均存在。
3. gtk 4:
找到的全部 Gtk 4 输入法模块文件均存在。
# 配置:
## Fcitx 插件:
1. 插件配置文件目录:
找到了 fcitx5 的插件配置目录:`/usr/share/fcitx5/addon`。
2. 插件列表:
1. 找到了 28 个已启用的插件:
Simplified and Traditional Chinese Translation 5.1.11
Classic User Interface 5.1.17
Clipboard 5.1.17
Cloud Pinyin 5.1.11
DBus 5.1.17
DBus Frontend 5.1.17
Emoji 5.1.17
Fcitx4 Frontend 5.1.17
Full width character 5.1.11
IBus Frontend 5.1.17
Input method selector 5.1.17
Keyboard 5.1.17
KDE Input Method Panel 5.1.17
Status Notifier 5.1.17
Notification 5.1.17
Pinyin 5.1.11
Extra Pinyin functionality 5.1.11
Punctuation 5.1.11
Quick Phrase 5.1.17
Rime 5.1.12
Spell 5.1.17
Table 5.1.11
Unicode 5.1.17
DBus Virtual Keyboard 5.1.17
Wayland 5.1.17
Wayland Input method frontend 5.1.17
XCB 5.1.17
X Input Method Frontend 5.1.17
2. 找到了 0 个被禁用的插件:
3. 插件库:
所有插件所需的库都被找到。
4. 用户界面:
找到了 3 个已启用的用户界面插件:
Classic User Interface
KDE Input Method Panel
DBus Virtual Keyboard
## 输入法:
1. `/home/xxx/.config/fcitx5/profile`:
[Groups/0]
# Group Name
Name=默认
# 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=
[GroupOrder]
0=默认
# 日志:
1. `date`:
2026年 01月 07日 星期三 15:19:33 CST
2. `/home/xxx/.config/fcitx5/crash.log`:
`/home/xxx/.config/fcitx5/crash.log` 未找到.
**警告:fcitx5-diagnose 的输出可能包含敏感信息,包括发行版名称,内核版本,正在运行的程序名称等。**
**尽管这些信息对于开发者诊断问题有帮助,请在公开发送到在线网站前检查并且根据需要移除的对应信息。**
另外 指定 --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime是可以的,但是鼠标位置不对(hyprland.conf里面设置xwayland {force_zero_scaling = true} .Xresource里面Xft.dpi 缩放异常 鼠标位置仍不对) 并且多了一个空白窗口,里面主要的窗口是elecrton运行在wayland下 另一个窗口不知道是啥仍运行在xwayland下