您尚未登录。

#1 2019-09-24 22:27:32

a28553835
会员
注册时间: 2019-09-24
帖子: 6

[已解决]KDE环境下的konsole和kate里面不能切换输入法

安装的是fcitx,在各种浏览器和部分软件上是可以正常切换输入法输入中文,
但是在konsole,kate,Yakuake上都不能切换输入法(目测系统自带的软件都不能,后来下载的软件上都可以正常使用)
鼠标放键盘图标上提示:无输入窗口

已经尝试的方法:
1.修改profile
2.修改xprofile
3.修改etc/environment
以上方法都试过了,都没办法解决

最近编辑记录 a28553835 (2019-09-28 09:23:11)

离线

#2 2019-09-24 22:29:58

a28553835
会员
注册时间: 2019-09-24
帖子: 6

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

fcitx-diagnose 
# 系统信息:
1.  `uname -a`:

        Linux Utmoon 4.19.69-1-MANJARO #1 SMP PREEMPT Thu Aug 29 08:51:46 UTC 2019 x86_64 GNU/Linux

2.  `lsb_release -a`:

        LSB Version:    n/a
        Distributor ID: ManjaroLinux
        Description:    Manjaro Linux
        Release:        18.1.0
        Codename:       Juhraya

3.  `lsb_release -d`:

        Description:    Manjaro Linux

4.  `/etc/lsb-release`:

        DISTRIB_ID=ManjaroLinux
        DISTRIB_RELEASE=18.1.0
        DISTRIB_CODENAME=Juhraya
        DISTRIB_DESCRIPTION="Manjaro Linux"

5.  `/etc/os-release`:

        NAME="Manjaro Linux"
        ID=manjaro
        ID_LIKE=arch
        PRETTY_NAME="Manjaro Linux"
        ANSI_COLOR="1;32"
        HOME_URL="https://www.manjaro.org/"
        SUPPORT_URL="https://www.manjaro.org/"
        BUG_REPORT_URL="https://bugs.manjaro.org/"

6.  桌面环境:

    桌面环境为 `kde`。

7.  Bash 版本:

        BASH_VERSION='5.0.9(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+cn+us:2+inet(evdev)"        };
                xkb_geometry  { include "pc(pc105)"     };
            };

    2.  `xprop`:

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

3.  Locale:

    1.  全部可用 locale:

            C
            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=zh_CN.UTF-8

4.  目录:

    1.  主目录:

            /home/amnesia

    2.  `${XDG_CONFIG_HOME}`:

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

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

    3.  Fcitx 设置目录:

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

5.  当前用户:

    脚本作为 amnesia (1000) 运行。

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

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

2.  版本:

    Fcitx 版本: `4.2.9.5`

3.  进程:

    找到了 2 个 fcitx 进程:

         6961 fcitx
         6971 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

5.  DBus 界面:

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

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

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

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

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

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

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

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

    在 `/usr/bin/fcitx-config-gtk3` 找到了 `fcitx-config-gtk3`。

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

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

    环境变量 XMODIFIERS 已经正确地设为了 "@im=fcitx".
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

3.  XIM 编码:

,它的编码不是 UTF-8。您可能会在使用 XIM 提交字符串时遇到问题。**

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

" 而不是 "fcitx". 请检查您是否在某个初始化文件中错误的设置了它的值.**
    **您可能会在 qt4 程序中使用 fcitx 时遇到问题.**

    **请使用您发行版提供的工具将环境变量 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).**

2.  qt5 - `${QT_IM_MODULE}`:

" 而不是 "fcitx". 请检查您是否在某个初始化文件中错误的设置了它的值.**
    **您可能会在 qt5 程序中使用 fcitx 时遇到问题.**

    **请使用您发行版提供的工具将环境变量 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).**

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`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-libpinyin-dictmanager.so`.
    **无法找到 Qt4 的 fcitx 输入法模块.**

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

" 而不是 "fcitx". 请检查您是否在某个初始化文件中错误的设置了它的值.**
    **您可能会在 gtk 程序中使用 fcitx 时遇到问题.**

    **请使用您发行版提供的工具将环境变量 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).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

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

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.32

        已找到 gtk `2.24.32` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

        在 `/usr/bin/gtk-query-immodules-2.0-32` 找到了 gtk `2.24.32` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-2.0-32 from gtk+-2.24.32

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

    2.  gtk 3:

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

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

        已找到 gtk `3.24.10` 的 fcitx 输入法模块.

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

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

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

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.32

        已找到 gtk `2.24.32` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

        在 `/usr/lib32/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.32` 的输入法模块缓存.
        版本行:

            # Created by usr/bin/gtk-query-immodules-2.0-32 from gtk+-2.24.32

        **无法输入法模块缓存 `/usr/lib32/gtk-2.0/2.10.0/immodules.cache` 中找到 fcitx**

    2.  gtk 3:

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

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

        已找到 gtk `3.24.10` 的 fcitx 输入法模块.

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

4.  Gtk 输入法模块文件:

    1.  gtk 2:

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

    2.  gtk 3:

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

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

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

2.  插件列表:

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

            fcitx-autoeng
            fcitx-autoeng-ng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-fullwidth-char-enhance
            fcitx-googlepinyin
            fcitx-imselector
            fcitx-ipc
            fcitx-ipcportal
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-libpinyin
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-punc-ng
            fcitx-quickphrase
            fcitx-remote
            fcitx-sogoucloudpinyin
            fcitx-sogoupinyin
            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.  找到了 5 个启用的输入法:

        pinyin
        fcitx-keyboard-cn
        googlepinyin
        shuangpin
        sogoupinyin

2.  默认输入法:

    **您的第一个 (默认) 输入法是 pinyin 而不是一个键盘输入法. 您可能无法禁用 fcitx 输入法.**

# 日志:
1.  `date`:

        2019年 09月 24日 星期二 22:28:24 CST

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

        总用量 4
        -rw-r--r-- 1 amnesia amnesia 44  9月 24 22:03 crash.log

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

        fcitx: BadWindow (invalid Window parameter)

离线

#3 2019-09-24 23:11:05

axionl
会员
注册时间: 2017-08-04
帖子: 1
个人网站

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

community/fcitx-qt5 装了吗

离线

#4 2019-09-25 00:31:46

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

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

你贴的日志有些怪怪的。
你的某个 shell 配置脚本是不是用了 DOS / Windows 的换行符?
你把日志的原文贴上来试试?(文件分享可以用 https://transfer.sh/ 或者 https://send.firefox.com/ 或者 Mega 网盘)

离线

#5 2019-09-27 10:28:27

a28553835
会员
注册时间: 2019-09-24
帖子: 6

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

依云 说:

你贴的日志有些怪怪的。
你的某个 shell 配置脚本是不是用了 DOS / Windows 的换行符?
你把日志的原文贴上来试试?(文件分享可以用 https://transfer.sh/ 或者 https://send.firefox.com/ 或者 Mega 网盘)

https://send.firefox.com/download/9dea1 … i_AX-9X5RA

离线

#6 2019-09-27 14:31:18

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

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

你的环境变量 LC_CTYPE、XMODIFIERS、QT4_IM_MODULE、QT_IM_MODULE、GTK_IM_MODULE 值的末尾有一个回车符。也就是说,你设置这些环境变量的那个文件错误地使用了 DOS / Windows 的换行符。使用 file 命令来确认。使用 dos2unix 命令来转换,或者在 Vim 中打开并执行 :setl ff=unix fenc=utf8 nobomb eol 然后保存并退出 :wq。

PS: 你这是 Manjaro 系统,应当发到「Arch Linux 衍生发行版」版块。

离线

#7 2019-09-27 18:43:54

a28553835
会员
注册时间: 2019-09-24
帖子: 6

Re: [已解决]KDE环境下的konsole和kate里面不能切换输入法

依云 说:

你的环境变量 LC_CTYPE、XMODIFIERS、QT4_IM_MODULE、QT_IM_MODULE、GTK_IM_MODULE 值的末尾有一个回车符。也就是说,你设置这些环境变量的那个文件错误地使用了 DOS / Windows 的换行符。使用 file 命令来确认。使用 dos2unix 命令来转换,或者在 Vim 中打开并执行 :setl ff=unix fenc=utf8 nobomb eol 然后保存并退出 :wq。

PS: 你这是 Manjaro 系统,应当发到「Arch Linux 衍生发行版」版块。

哇谢谢大佬,我都要弄哭了.

对不起原帖发错地方了.

谢谢大佬,终于解决了

离线

页脚