[已解决]求解啊 fcitx不能在qt程序和java程序中打出中文了

其他Linux/Unix/BSD/OSX等发行版讨论
回复
yazi_beicheng
帖子: 67
注册时间: 2010-11-28 18:56

[已解决]求解啊 fcitx不能在qt程序和java程序中打出中文了

#1

帖子 yazi_beicheng »

RT

现在不能在netbeans/qipmsg/wine/libreoffice这些程序里面打出中文了

每次发rtx之类的都是在stardict活着chromium里面打完了复制过去

好痛苦啊 求解救

用的slim+openbox,.xinitrc里面已经设置如下三个变量:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"


fcitx-qt[2-5]也安装了 求解啊
上次由 yazi_beicheng 在 2013-06-17 9:03,总共编辑 1 次。
我的博客http://beicheng.co.cc
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#2

帖子 lilydjwg »

在终端里确认你的环境变量设置已经生效。

看看 fcitx-diagnose 的输出。

你出问题的程序应该都是用的 XIM 吧。
yazi_beicheng
帖子: 67
注册时间: 2010-11-28 18:56

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#3

帖子 yazi_beicheng »

lilydjwg 写了:在终端里确认你的环境变量设置已经生效。

看看 fcitx-diagnose 的输出。

你出问题的程序应该都是用的 XIM 吧。

代码: 全选

yazi ~ $ 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=

代码: 全选

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

        Linux beicheng 3.9.5-1-ARCH #1 SMP PREEMPT Sat Jun 8 09:22:45 CEST 2013 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        ID=arch
        PRETTY_NAME="Arch Linux"
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

# 环境.
1.  DISPLAY:

        DISPLAY=':0.0'

2.  键盘布局:

        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)"	};
        };

3.  Locale:

    1.  当前 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=

    2.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            zh_CN.utf8

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

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

2.  版本:

    Fcitx 版本: 4.2.7

3.  进程:

    找到了 2 个 fcitx 进程:

          409 fcitx
          424 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# 前端设置.
## Xim.
1.  `${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.  `${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).**

2.  Qt 输入法模块文件:

    找到了未知的 fcitx qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    找到了未知的 fcitx qt 模块: `/usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.
    找到了 qt 的 fcitx 输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.

## Gtk.
1.  `${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).**

2.  Gtk 输入法模块文件:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk 2 的 gtk-query-immodules
        已找到 gtk 2 的 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 的 gtk-query-immodules

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk 3 的 gtk-query-immodules
        已找到 gtk 3 的 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:*" 

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

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

2.  插件列表:

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

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-cloudpinyin
            fcitx-dbus
            fcitx-fullwidth-char
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            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

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

        fcitx-keyboard-us
        pinyin

2.  默认输入法:

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

# 日志.
1.  `date`.

        2013年 06月 16日 星期日 21:46:42 UTC

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

        总用量 4
        -rw-r--r-- 1 yazi users 52 6月   8 16:39 crash.log

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

        fcitx: RenderBadPicture (invalid Picture parameter)


好像没有问题?
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

这些加入.xinitrc里面了

qt程序也不能输入中文
我的博客http://beicheng.co.cc
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#4

帖子 lilydjwg »

yazi_beicheng 写了: 好像没有问题?
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

这些加入.xinitrc里面了

qt程序也不能输入中文
有问题。是不是和这位一样?

https://bbs.archlinuxcn.org/viewtopic.php?id=1862
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#5

帖子 eexpress »

env|grep IM
看结果。

.xinitrc干嘛?写.bashrc吧。

应该不要设置的。输入法安装的时候,应该自动处理这些。
● 鸣学
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#6

帖子 lilydjwg »

eexpress 写了:env|grep IM
看结果。

.xinitrc干嘛?写.bashrc吧。

应该不要设置的。输入法安装的时候,应该自动处理这些。
你知道 ~/.bashrc 是什么情况下才会调用的么?

输入法安装的安装脚本可没办法处理那么多,用桌面环境的还好,自己跑 X 的用户你让脚本怎么搞?
yazi_beicheng
帖子: 67
注册时间: 2010-11-28 18:56

Re: 求解啊 fcitx不能在qt程序和java程序中打出中文了

#7

帖子 yazi_beicheng »

lilydjwg 写了:
yazi_beicheng 写了: 好像没有问题?
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

这些加入.xinitrc里面了

qt程序也不能输入中文
有问题。是不是和这位一样?

https://bbs.archlinuxcn.org/viewtopic.php?id=1862

谢谢谢谢啊 果然我也是不懂exec命令的人= = 已经解决
我的博客http://beicheng.co.cc
回复