您尚未登录。

#1 2018-07-30 20:24:53

ArchLong
会员
注册时间: 2018-07-30
帖子: 3

ArchLinux Fcitx 无法使用输入中文

~/.xprofile  setting
export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export LOCALE=en_US.UTF-8
eval `dbus-launch --sh-syntax --exit-with-session`
exec fcitx &

~/.xinitrc    setting
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
done
unset f
fi

##twm &
##xclock -geometry 50x50-1+1 &
##xterm -geometry 80x50+494+51 &
##xterm -geometry 80x20+494-0 &
##exec xterm -geometry 80x66+0+0 -name login
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
exec gnome-session

离线

#2 2018-07-30 20:25:43

ArchLong
会员
注册时间: 2018-07-30
帖子: 3

Re: ArchLinux Fcitx 无法使用输入中文

# System Info:
1.  `uname -a`:

        Linux hasee 4.17.10-1-ARCH #1 SMP PREEMPT Wed Jul 25 11:23:00 UTC 2018 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"
        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.  Desktop Environment:

    Desktop environment is `gnome3`.

6.  Bash Version:

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

    2.  `xprop`:

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

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=zh_CN.UTF-8
            LC_TIME=zh_CN.UTF-8
            LC_COLLATE="en_US.UTF-8"
            LC_MONETARY=zh_CN.UTF-8
            LC_MESSAGES="en_US.UTF-8"
            LC_PAPER=zh_CN.UTF-8
            LC_NAME="en_US.UTF-8"
            LC_ADDRESS="en_US.UTF-8"
            LC_TELEPHONE="en_US.UTF-8"
            LC_MEASUREMENT=zh_CN.UTF-8
            LC_IDENTIFICATION="en_US.UTF-8"
            LC_ALL=

4.  Directories:

    1.  Home:

            /home/chen

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

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

    3.  Fcitx Settings Directory:

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

5.  Current user:

    The script is run as chen (1000).

# Fcitx State:
1.  executable:

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

2.  version:

    Fcitx version: `4.2.9.5`

3.  process:

    Found 2 fcitx processes:

         2640 fcitx
         2652 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` works properly.

5.  DBus interface:

    Using `dbus-send` to check dbus.

    Owner of DBus name `org.fcitx.Fcitx` is `:1.65`.

    PID of DBus name `org.fcitx.Fcitx` owner is `2640`.

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

3.  Qt IM module files:

    Found fcitx qt module: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor5.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_r … _IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

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

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

        Found fcitx im modules for gtk `2.24.32`.

            "/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.30` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

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

        Found fcitx im modules for gtk `3.22.30`.

            "/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.32` 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.32

        Found fcitx im modules for gtk `2.24.32`.

            "/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.30` 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.30

        Found fcitx im modules for gtk `3.22.30`.

            "/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 27 enabled addons:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-googlepinyin
            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.  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 5 enabled input methods:

        fcitx-keyboard-us-sun_type6
        wbpy
        pinyin
        fcitx-keyboard-us
        googlepinyin

2.  Default input methods:

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

# Log:
1.  `date`:

        2018年 07月 30日 星期一 20:25:16 CST

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

        total 4
        -rw-r--r-- 1 chen users 44 5月  13 2016 crash.log

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

        fcitx: BadWindow (invalid Window parameter)

离线

#3 2018-07-30 22:21:10

Kurobac
小白
注册时间: 2018-05-12
帖子: 69

Re: ArchLinux Fcitx 无法使用输入中文

你是不是用的Wayland?
如果是,把相关环境变量写到 /etc/environment。


# pacman -Syu

离线

#4 2018-07-31 09:14:37

ArchLong
会员
注册时间: 2018-07-30
帖子: 3

Re: ArchLinux Fcitx 无法使用输入中文

Kurobac 说:

你是不是用的Wayland?
如果是,把相关环境变量写到 /etc/environment。

之前搞了好久.
我把环境变量写到/etc/enviroment后,重启就可以,非常感谢,

离线

页脚