![fcitx 输入法在 Xubuntu 16.04 上不起作用](https://linux22.com/image/1141911/fcitx%20%E8%BE%93%E5%85%A5%E6%B3%95%E5%9C%A8%20Xubuntu%2016.04%20%E4%B8%8A%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我正在使用 Xubuntu 16.04。尽管我启用了 fcitx 输入法(Unikey 和 Hangul),但它并不适用于所有应用程序。
这是我的fcitx-diagnose
# System Info:
1. `uname -a`:
Linux 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
2. `lsb_release -a`:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
3. `lsb_release -d`:
Description: Ubuntu 16.04 LTS
4. `/etc/lsb-release`:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
5. `/etc/os-release`:
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
6. Desktop Environment:
Desktop environment is `xfce`.
7. Bash Version:
BASH_VERSION='4.3.42(1)-release'
# Environment:
1. DISPLAY:
DISPLAY=':0.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+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};
2. `xprop`:
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
3. Locale:
1. All locale:
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
ko_KR.utf8
POSIX
2. Current locale:
LANG=en_US.UTF-8
LANGUAGE=en_US
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/trongkha
2. `${XDG_CONFIG_HOME}`:
Environment variable `XDG_CONFIG_HOME` is not set.
Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/trongkha/.config`).
3. Fcitx Settings Directory:
Current fcitx settings directory is `~/.config/fcitx` (`/home/trongkha/.config/fcitx`).
5. Current user:
The script is run as trongkha (1000).
# Fcitx State:
1. executable:
Found fcitx at `/usr/bin/fcitx`.
2. version:
Fcitx version: `4.2.9.1`
3. process:
Found 3 fcitx processes:
19239 fcitx
24544 fcitx
25691 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 im module for Qt4: `/usr/lib/x86_64-linux-gnu/qt4/plugins/inputmethods/qtim-fcitx.so`.
Found fcitx im module for Qt5: `/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.
## Gtk:
1. gtk - `${GTK_IM_MODULE}`:
**Environment variable GTK_IM_MODULE is "xim" instead of "fcitx". Please check if you have exported it incorrectly in any of your init files.**
**You are using xim in gtk programs.**
**To see some application specific problems you may have when using xim, check [Hall of Shame for Linux IME Support](http://fcitx-im.org/wiki/Hall_of_Shame_for_Linux_IME_Support). For other more general problems of using XIM including application freezing, see [here](http://fcitx-im.org/wiki/XIM).**
**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:
**Cannot find `gtk-query-immodules` for gtk 2**
**Cannot find fcitx im module for gtk 2.**
2. gtk 3:
**Cannot find `gtk-query-immodules` for gtk 3**
**Cannot find fcitx im module for gtk 3.**
3. Gtk IM module cache:
1. gtk 2:
Found immodules cache for gtk `2.24.30` at `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache`.
Version Line:
# Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.30
Found fcitx im modules for gtk `2.24.30`.
"/usr/lib/x86_64-linux-gnu/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.18.9` at `/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache`.
Version Line:
# Created by /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 from gtk+-3.18.9
Found fcitx im modules for gtk `3.18.9`.
"/usr/lib/x86_64-linux-gnu/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 25 enabled addons:
fcitx-autoeng
fcitx-chttrans
fcitx-classic-ui
fcitx-clipboard
fcitx-dbus
fcitx-freedesktop-notify
fcitx-fullwidth-char
fcitx-hangul
fcitx-imselector
fcitx-ipc
fcitx-keyboard
fcitx-kimpanel-ui
fcitx-lua
fcitx-notificationitem
fcitx-punc
fcitx-quickphrase
fcitx-remote
fcitx-spell
fcitx-unicode
fcitx-unikey
fcitx-vk
fcitx-x11
fcitx-xim
fcitx-xkb
fcitx-xkbdbus
2. Found 0 disabled addons:
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-us
unikey
2. Default input methods:
You have a keyboard input method "fcitx-keyboard-us" correctly added as your default input method.
# Log:
1. `date`:
Sat Oct 29 19:09:27 KST 2016
2. `~/.config/fcitx/log/`:
total 0
-rw-rw-r-- 1 trongkha trongkha 0 Oct 29 19:00 crash.log
3. `~/.config/fcitx/log/crash.log`:
答案1
在我的计算机上,fcitx 会在 (X)Ubuntu 16.04 下由 im-config 自动启动,请参阅 /usr/share/im-config/ 即使你卸载了所有 fcitx 软件包,im-config 仍会调用 fcitx。因此我建议你也检查您是否安装了 im-config 以及它的配置方式. (在我的例子中,im-config 自动启动了一个 fcitx 进程,它占用了所有内存并使我的机器无法使用)。
这有什么关系?
我猜测是 im-config 启动不正确(或者之前配置不正确导致启动)它有自己的 fcitx 二进制文件这可能会干扰实际打包的 fcitx 工具集。这意味着,虽然您怀疑正在运行的 fcitx 是包管理器附带的 fcitx,但实际上另一个可能较旧的 fcitx 版本正在运行,并给您的系统带来麻烦。因此,上述重新安装 fcitx 的建议不会改变/改进任何东西。
您可以在 /usr/share/im-config/ 中找到 im-config 的设置
我的机器上也出现过这种情况,这可能是打包错误、遗留配置错误或升级错误(我之前安装过 Ubuntu Kylin 并多次进行 dist-upgrade)。我建议您备份 /usr/share/im-config/ 中的 im-config 配置文件,然后清除 im-config,删除 /usr/share/im-config/ 中的所有文件(如果有),然后重新安装一个干净的、全新的 im-config。
答案2
尝试rm -rf ~/.config/fcitx
重新启动 ubuntu,这至少解决了我在 xubuntu 16.04 上的问题
答案3
打开语言支持, 选择迅捷网络作为“键盘输入法系统”,然后重新登录。