您尚未登录。

#1 2018-02-04 11:50:26

bou
会员
注册时间: 2018-02-04
帖子: 2

cannot input Chinese by fcitx (KDE plasma)

As a newbie in linux, it's my first time to ask a question in this forum.
I have consulted the wiki and searched this forum for similar questions, but it didn't solve my problem.
I can start my fcitx successfully, and can configure the input method by gui. Even though I have set the input method as 'pinyin' in fcitx, I cannot input Chinese. I have configured basic locales.
Hope someone can help me with the problem. Thank you very much.

[woodenfish@woodenfish ~]$ fcitx-diagnose
# 系统信息:
1.  `uname -a`:

        Linux woodenfish 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25 UTC 2018 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
        ID_LIKE=archlinux
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

5.  桌面环境:

    桌面环境为 `kde`。

6.  Bash 版本:

        BASH_VERSION='4.4.18(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0'

2.  键盘布局:

    1.  `setxkbmap`:

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

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us,cn", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            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/woodenfish

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/woodenfish/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/woodenfish/.config/fcitx`)。

5.  当前用户:

    脚本作为 woodenfish (1001) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9.5`

3.  进程:

    找到了 2 个 fcitx 进程:

          579 fcitx
         1275 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

5.  DBus 界面:

    使用 `dbus-send` 来检查 dbus。

    DBus 名称 `org.fcitx.Fcitx` 的所有者是 `:1.47`。

    DBus 名称 `org.fcitx.Fcitx` 的 PID 所有者是 `579`。

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    **未找到 gtk3 的配置界面.**

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

    **无法找到一个图形界面的配置工具,请安装 `kcm-fcitx`,`fcitx-config-gtk2`,`fcitx-config-gtk3` 之一。**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS 没有设置**

    **请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_r … 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_r … _IM_MODULE).**

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_r … _IM_MODULE).**

3.  Qt 输入法模块文件:

    找到了 Qt5 的输入法模块: `/usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.
    找到了未知的 fcitx qt 模块: `/usr/lib/qt/plugins/kcm_fcitx.so`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor5.so`.
    **无法找到 Qt4 的 fcitx 输入法模块.**

## 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_r … _IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        **无法找到 gtk 2 的 `gtk-query-immodules`.**

        **无法找到 gtk 2 的 fcitx 输入法模块.**

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.22.26` 的 `gtk-query-immodules`.
        版本行:

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

        **无法在 `/usr/bin/gtk-query-immodules-3.0` 的输出重找到 fcitx.**

        **无法找到 gtk 3 的 fcitx 输入法模块.**

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        **无法找到 gtk 2 的输入法模块缓存**

        **无法在缓存中找到 gtk 2 的 fcitx 输入法模块.**

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.22.26` 的输入法模块缓存.
        版本行:

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

        **无法输入法模块缓存 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 中找到 fcitx**

        **无法在缓存中找到 gtk 3 的 fcitx 输入法模块.**

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 26 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-imselector
            fcitx-ipc
            fcitx-ipcportal
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库:

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 2 个启用的输入法:

        fcitx-keyboard-us
        pinyin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2018年 02月 04日 星期日 11:36:34 CST

2.  `~/.config/fcitx/log/`:

        总用量 4
        -rw-r--r-- 1 woodenfish woodenfish 44 2月   4 2018 crash.log

3.  `~/.config/fcitx/log/crash.log`:

        fcitx: BadWindow (invalid Window parameter)

离线

#2 2018-02-04 11:58:03

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: cannot input Chinese by fcitx (KDE plasma)

问题很明确:你没有设置 GTK_IM_MODULE、QT_IM_MODULE 和 XMODIFIERS。
找个地方设置吧。具体怎么设置需要看你用的登录管理器是什么。大概写到 ~/.pam_environment 也是可以的。

离线

#3 2018-02-04 12:08:17

bou
会员
注册时间: 2018-02-04
帖子: 2

Re: cannot input Chinese by fcitx (KDE plasma)

依云 说:

问题很明确:你没有设置 GTK_IM_MODULE、QT_IM_MODULE 和 XMODIFIERS。
找个地方设置吧。具体怎么设置需要看你用的登录管理器是什么。大概写到 ~/.pam_environment 也是可以的。

按您说的解决了!感谢!

离线

页脚