您尚未登录。

#1 2016-12-13 16:49:10

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

图形界面是 gnome 的,之前一直用 ibus ,但是在某次升级之后不能输入中文了,便将输入法更换成了 fcitx,但是发现还是和 ibus 一样,在某些应用中可以使用中文输入法(比如 chromuim),但是想 gnome 的终端,Remarkable 图形编辑器,都无法使用。我在家目录的 .xprofile .xinitrc .Xauthority 中都加入了以下几行代码:

--------------------------------------------------------------------------------
$ cat .Xauthority 
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
# exec openbox-session

--------------------------------------------------------------------------------
$ cat .xprofile 
# ----------------- set fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
# exec openbox-session
# export LC_CTYPE=zh_CN.UTF-8
# export XIM=fcitx
# export XIM_PROGRAM=fcitx
# export GTK_IM_MODULE=fcitx
# export QT_IM_MODULE=fcitx
# export XMODIFIERS="@im=fcitx"
# eval `dbus-launch --sh-syntax --exit-with-session`
# exec fcitx &
# ----------------- set ibus
# export XIM=ibus
# export XIM_PROGRAM=ibus
# export GTK_IM_MODULE=ibus
# export XMODIFIERS=@im=ibus
# export QT_IM_MODULE=ibus
# ibus-daemon -d -x
# export GTK_IM_MODULE=xim
# export QT_IM_MODULE=xim

--------------------------------------------------------------------------------
$ cat .xinitrc   
#!/bin/sh
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
#exec openbox-session
# export LC_CTYPE=zh_CN.utf8
# eval `dbus-launch --sh-syntax --exit-with-session`

    但是还是无法使用,fcitx-diagnose 的时候依旧是报“未在 .xprofile 中添加上面三行”。

    因为之前写 markdown 的时候一直用的是 haroopad (在 haroopad 上可以使用中文输入法),但是最近 haroopad 老是抽风,一打开文档就启动 n 个进程,一下子就把系统卡死了,所以只好卸载之,但是测试了一下在 Remarkable 和 retext 上都无法用 fcitx 输入中文,很闹心啊。

    下面是 fcitx-diagnose 的 log, 麻烦哪位大神帮帮忙了!

$ fcitx-diagnose 
# System Info:
1.  `uname -a`:

        Linux mojies 4.8.10-1-ARCH #1 SMP PREEMPT Mon Nov 21 11:55:43 CET 2016 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` not found.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` not found.

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/"

5.  Desktop Environment:

    Desktop environment is `gnome3`.

6.  Bash Version:

        BASH_VERSION='4.4.5(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'

2.  Keyboard Layout:

    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.  All locale:

            C
            en_US.utf8
            POSIX
            zh_CN.utf8

    2.  Current locale:

            LANG=en_US.UTF-8
            LC_CTYPE=en_US.UTF-8
            LC_NUMERIC=en_US.UTF-8
            LC_TIME=en_US.UTF-8
            LC_COLLATE="en_US.UTF-8"
            LC_MONETARY=en_US.UTF-8
            LC_MESSAGES="en_US.UTF-8"
            LC_PAPER=en_US.UTF-8
            LC_NAME="en_US.UTF-8"
            LC_ADDRESS="en_US.UTF-8"
            LC_TELEPHONE="en_US.UTF-8"
            LC_MEASUREMENT=en_US.UTF-8
            LC_IDENTIFICATION="en_US.UTF-8"
            LC_ALL=

4.  Directories:

    1.  Home:

            /home/mojies

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

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

    3.  Fcitx Settings Directory:

        Current fcitx settings directory is `~/.config/fcitx` (`/home/mojies/.config/fcitx`).

5.  Current user:

    The script is run as mojies (1000).

# Fcitx State:
1.  executable:

    Found fcitx at `/usr/bin/fcitx`.

2.  version:

    Fcitx version: `4.2.9.1`

3.  process:

    Found 2 fcitx processes:

         1062 fcitx
         1071 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` works properly.

# Fcitx Configure UI:
1.  Config Tool Wrapper:

    Found fcitx-configtool at `/usr/bin/fcitx-configtool`.

2.  Config GUI for gtk2:

    **Config GUI for gtk2 not found.**

3.  Config GUI for gtk3:

    Found `fcitx-config-gtk3` at `/usr/bin/fcitx-config-gtk3`.

4.  Config GUI for kde:

    **`kcmshell4` not found.**

# Frontends setup:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS is not set**

    **Please set environment variable XMODIFIERS to "@im=fcitx" using the tool your distribution provides or add `export XMODIFIERS=@im=fcitx` to your `~/.xprofile`. See [Input Method Related Environment Variables: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables#XMODIFIERS).**
    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}`:

    **Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add `export QT_IM_MODULE=fcitx` to your `~/.xprofile`. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).**

2.  qt5 - `${QT_IM_MODULE}`:

    **Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add `export QT_IM_MODULE=fcitx` to your `~/.xprofile`. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).**

3.  Qt IM module files:
    Found fcitx qt module: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    Found fcitx im module for Qt4: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    Found fcitx im module for Qt5: `/usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.

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

    **Please set environment variable GTK_IM_MODULE to "fcitx" using the tool your distribution provides or add `export GTK_IM_MODULE=fcitx` to your `~/.xprofile`. See [Input Method Related Environment Variables: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        Found `gtk-query-immodules` for gtk `2.24.31` at `/usr/bin/gtk-query-immodules-2.0`.
        Version Line:

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

        Found fcitx im modules for gtk `2.24.31`.

            "/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:*" 

    2.  gtk 3:

        Found `gtk-query-immodules` for gtk `3.22.4` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

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

        Found fcitx im modules for gtk `3.22.4`.

            "/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 IM module cache:

    1.  gtk 2:

        Found immodules cache for gtk `2.24.31` at `/usr/lib/gtk-2.0/2.10.0/immodules.cache`.
        Version Line:

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

        Found fcitx im modules for gtk `2.24.31`.

            "/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:*" 

    2.  gtk 3:

        Found immodules cache for gtk `3.22.4` at `/usr/lib/gtk-3.0/3.0.0/immodules.cache`.
        Version Line:

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

        Found fcitx im modules for gtk `3.22.4`.

            "/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 IM module files:

    1.  gtk 2:

        All found Gtk 2 immodule files exist.

    2.  gtk 3:

        All found Gtk 3 immodule files exist.

# Configuration:
## Fcitx Addons:
1.  Addon Config Dir:

    Found fcitx addon config directory: `/usr/share/fcitx/addon`.

2.  Addon List:

    1.  Found 26 enabled addons:

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

    2.  Found 1 disabled addons:

            fcitx-qw

3.  Addon Libraries:

    All libraries for all addons are found.

4.  User Interface:

    Found 2 enabled user interface addons:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## Input Methods:
1.  Found 2 enabled input methods:

        fcitx-keyboard-cn
        sunpinyin

2.  Default input methods:

    You have a keyboard input method "fcitx-keyboard-cn" correctly added as your default input method.

# Log:
1.  `date`:

        Tue Dec 13 16:47:31 CST 2016

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

        total 0

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

    `~/.config/fcitx/log/crash.log` not found.

最近编辑记录 majtsdd (2016-12-13 23:17:02)

离线

#2 2016-12-13 21:26:58

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

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

你用的是什么登录管理器?(是怎样登录到图形环境的?)

离线

#3 2016-12-13 21:33:56

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

fcitx-diagnose 的输出内容显示没有正确设置,XMODIFIERS,QT_IM_MODULE,GTK_IM_MODULE 这3个环境变量,也就是你的那3句export没有生效。
可以试试把那3句export写到 /etc/environment 里

离线

#4 2016-12-13 21:40:45

ouyang
稀释
所在地: 安徽芜湖
注册时间: 2016-02-16
帖子: 43

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

写的有问题吧   写到哪里了


——一只ID名为稀释的小白

离线

#5 2016-12-13 22:12:34

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

依云 说:

你用的是什么登录管理器?(是怎样登录到图形环境的?)

    不好意思,晚上有点事没有在线,我用的就是 gnome 的登陆管理器,按照 http://bbs.archlinuxcn.org/viewtopic.php?id=1037 这个教程安装的,之前用的 ibus 中途卸载了,装的 fcitx。

离线

#6 2016-12-13 22:22:05

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

mgna17 说:

fcitx-diagnose 的输出内容显示没有正确设置,XMODIFIERS,QT_IM_MODULE,GTK_IM_MODULE 这3个环境变量,也就是你的那3句export没有生效。
可以试试把那3句export写到 /etc/environment 里

    首先非常感谢 mgna17 这个方法应该是可以解决各个平台 XMODIFIERS,QT_IM_MODULE,GTK_IM_MODULE 这三个环境变量配置的问题,而且亲测是有用的。
    但是还是有点疑问,为什么我设置的三个文件在启动的时候都没有被引用到。

离线

#7 2016-12-13 22:23:28

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

依云 说:

你用的是什么登录管理器?(是怎样登录到图形环境的?)

    三楼 mgna17 的解答可以解决我的那个问题,但是还是不太清楚为什么那三个文件都没有被引用到。

离线

#8 2016-12-13 22:28:18

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

ouyang 说:

写的有问题吧   写到哪里了

    那三个文件(.xprofile .xinitrc .Xauthority)都放在家目录,之前起作用过(安装 ibus 的时候可用,当然配置参数也是 ibus  的),后来系统升级之后导致 ibus 不可用,我怀疑和现在自己遇到的 fcitx 的问题是一个性质。前后反复对比了 wiki 网上的方法,fcitx 官网的方法,语法应该是没有错的。或者可以这样说,试验过,发现不行。

离线

#9 2016-12-13 22:41:56

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

majtsdd 说:

为什么我设置的三个文件在启动的时候都没有被引用到。

听说是wayland的问题,最新版的gnome用上了wayland之后就要这样设置了。
你pstree -p | grep 'g.*session' 应该可以看到一个像 gdm-xxxx-session 这样的进程

类似这样,你是wayland的话看到的应该是个wayland-session:

$ pstree -p |grep 'gdm.*session'
           |-gdm(355)-+-gdm-session-wor(909)-+-gdm-x-session(1118)-+-Xorg(1128)
           |          |-gdm-session-wor(13704)-+-gdm-x-session(13721)-+-Xorg(13723)

最近编辑记录 Mr.I (2016-12-13 22:42:45)

离线

#10 2016-12-13 23:12:59

majtsdd
会员
注册时间: 2016-05-13
帖子: 9

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

mgna17 说:
majtsdd 说:

为什么我设置的三个文件在启动的时候都没有被引用到。

听说是wayland的问题,最新版的gnome用上了wayland之后就要这样设置了。
你pstree -p | grep 'g.*session' 应该可以看到一个像 gdm-xxxx-session 这样的进程

类似这样,你是wayland的话看到的应该是个wayland-session:

$ pstree -p |grep 'gdm.*session'
           |-gdm(355)-+-gdm-session-wor(909)-+-gdm-x-session(1118)-+-Xorg(1128)
           |          |-gdm-session-wor(13704)-+-gdm-x-session(13721)-+-Xorg(13723)

    对,正如你所说,的确出现了 wayland-session 这个进程。

最近编辑记录 majtsdd (2016-12-13 23:18:21)

离线

#11 2016-12-14 10:52:43

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

Re: 由于 2016 年 9月份的升级导致,fxitx 无法在 gnome 的某些软件中使用的问题(已解决,非常感谢 mgna17)

majtsdd 说:
依云 说:

你用的是什么登录管理器?(是怎样登录到图形环境的?)

    三楼 mgna17 的解答可以解决我的那个问题,但是还是不太清楚为什么那三个文件都没有被引用到。

现在你知道为什么了吗?Wayland 不读取 X 的文件。

离线

页脚