From Fcitx
Revision as of 23:33, 2 February 2016 by Weng Xuetian (talk | contribs) (Created page with "=== 所有Qt程序都有问题? === * 运行qtconfig (名称可能根据你的发行版有所不同,他可能是 qtconfig-qt4 ),选择第三个标签,确认fcitx是在...")
Jump to navigation Jump to search
Other languages:
English • ‎中文(简体)‎


从 4.2.7 开始,Fcitx 提供了一个 fcitx-diagnose 的命令,它可以检测一些常见的问题并且给出一些建议。

Linux 输入法支持耻辱堂

使用 Ctrl + Space 时无法激活 Fcitx



    • 最可能的原因是某个快捷键占用了 Ctrl Space,请修改另一个快捷键并重试。这常见于编辑器中,因为很多集成开发环境默认使用 Ctrl+Space 作为补全的快捷键。

所有 Gtk 程序都有问题?

  • 请打开一个传统意义上的Gtk程序(所谓传统,就是它不应该是Firefox,Libreoffice这种仅仅是是使用Gtk样式作为界面的程序)。Gedit是一个不错的选择。右键点击输入框,将会弹出一个“输入法”菜单,请确认“Fcitx”被选中。
  • 如果菜单中确实有Fcitx,但是还是无法正常工作,请先尝试重新启动Fcitx,如果这次就可以工作了,那么请检查你的DBus设置,或者延长Fcitx的启动时间。如果你使用自定义的启动脚本,你可以参考配置 (其他)
  • 如果Fcitx没有默认选中,那么请先尝试选中它,并且立刻试试可否输入。如果不行,请参见上面一条。为了永久性的修复这个问题(默认选中 Fcitx ),请阅读安装和配置中的配置部分。
  • 如果没有 Fcitx这项,那么请首先检查你的安装,你所需要的包名包含了fcitx和gtk。如果你是从源码编译的Fcitx,请确认你启用了GTK2,GTK3的输入法模块选项。如果你确认这点的话,请阅读输入法相关的环境变量中的如何更新Gtk的缓存文件。
  • 如果你正在使用 Ubuntu,并且刚刚升级到 12.04,或者发生了什么不好的事情 (由于打包者的疏忽,或者有问题的包管理器无法按照正确顺序更新包,例如 pacman) 你可能会注意到 gtk.immodules 相关的文件并未在升级时正确生成。试试卸载fcitx-frontend-gtk2, fcitx-frontend-gtk3 或者你发行版对应的包,然后重新安装这两个包来触发文件的生成。然后重新检查输入法菜单里面是否有“Fcitx”。


  • 运行qtconfig (名称可能根据你的发行版有所不同,他可能是 qtconfig-qt4 ),选择第三个标签,确认fcitx是在默认输入法组合框中。如果没有,请检查你的安装。
  • 以上解决方案也可以类似解决XIM的问题,但我们强烈建议你使用输入法模块。参见 输入法相关环境变量

Is it Java, Xterm, wine, or some other non-Gtk/Qt Application?

There are also some very rare case, that you're using a embedded linux or mini-linux distro, in which you must use XIM, the X server might missing some locale file. The file is usually needed to be under /usr/share/X11/locale/.

And When you must use XIM, please make sure, your locale must NOT be C or POSIX and need to be a valid locale (no matter which language), and need to be generated if you are using glibc (locale-gen). When you are using im module, there is no such limitation.



LC_CTYPE=zh_CN.UTF-8 emacs

Don't forget to check your locale -a contains that. See also Input method related environment variables.

Emacs will use `-*-*-*-r-normal--14-*-*-*-*-*-*-*' as basefont(in src/xfns.c), if you do not have one matched(like terminus、or 75dpi things, you can look the output of `xlsfonts'), XIM can not be activated.

Problem in Firefox and Google Docs

You might want to toggle preedit off temporarily, which is Ctrl+Alt+P.

Cannot use Fcitx in flash

Please read Hall of Shame for Linux IME Support, and use im module.

Cannot type English after updating to fcitx newer than 4.2.4

Make sure you have add "Keyboard" to the input method list. You can use Configuration tool.

And you may want to move "Keyboard" to the first one.

Unexpected keyboard layout change

Use Configuration tool, to bind specific keyboard layout to the specific input method.

xmodmap settings being overwritten

Fcitx now control keyboard layout and when switch layout, xmodmap setting will be overwritten. So fcitx-xkb provides an option to specify the xmodmap script and let fcitx loads it for you whenever keyboard layout changes. Or disable fcitx-xkb addon is also a solution for you, or if your requirement is simply, for example, switching Caps Lock and Esc, which is provided by xkb option, you can just set it with your desktop keyboard configuration tool (Gnome and KDE all support such configuration).

For more detailed explanation, xmodmap is a very low level tool, that doesn't aware keyboard layout. For X11, keyboard layout is built on a set of profile, when such profile is loaded, anything you changed with xmodmap will be overwritten, this isn't specific to fcitx, but all tool that support keyboard layout configuration. Xkb option is a set of profile that can do some pre-defined change over keyboard layout, including many thing that people usually do with xmodmap, for example, defining where dead key is, switching Caps Lock and Esc, and so on. Unless you have special requirements, xkb layout and xkb option is recommended.

Since 4.2.7, Fcitx will try to load ~/.Xmodmap if it exists.

Configure user interface, font, vertical list

Use Configuration tool, Addon Configuration -> Classic UI.

If you are using fcitx-configtool newer than 0.4.5 or kcm-fcitx newer 0.4.1, you can directly configure those from the first level tab.

Possible issue for GNOME 3.6

Note for GNOME Later than 3.6

Classic UI is not transparent

  • This problem might NOT exist any more since 4.2.6 with a different approach for detect composite manager.
  • Restart Fcitx first, if it's ok then, it might be a bug in your Window manager. Gnome-Shell, xcompmgr is known to have this bug. You can try to set the delay start to walkaround this problem.
  • If restart Fcitx doesn't solve this problem, you should check whether your window manager supports composite or it's enabled or not.


Enable desktop effects.

Metacity before GNOME3

gconftool-2 -s --type bool /apps/metacity/general/compositing_manager true


Xfwm support composite, but need to be enabled by hand.


0.9 series compiz can disable composite. You can use ccsm to configure it.

Other window manager

You can use xcompmgr, cairo-compmgr as composite manager for them.


Original Minecraft under linux doesn't support input method, what make it worse is, XIM will conflict with its key event processing, one way to work around is, set a wrong environment variable on purpose for minecraft, then start up it. You can use following script to do that

# set a wrong one
export XMODIFIERS="@im=null"
# start minecraft, this might change depends on you're mod, but simply its what you ARE using to start minecraft.
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame

This way can be also used, if you don't want fcitx to work on some application which is using XIM.

There is a mod can be used to support input under Linux, called NihongoMOD, 1.2.2 with minecraft 1.5.2 can work with Fcitx without upper hack.

Root application under normal user X

Root application under X normal user session is always broken (in general, not specific to fcitx), due to the fact that dbus is a user session only process. The only way to type in root application with normal fcitx is to use XIM, set GTK_IM_MODULE=xim and QT_IM_MODULE=xim before you start your application.

Cursor Following problem

There is a common misunderstanding that it's input method's fault that input window could not follow the cursor, which is simply wrong. This is how cursor following works: Application send the position to Input method, then input method move the input window. So if application do not send the position, the position would be wrong. This behavior is controlled by application, but not input method. So if you meet any problem, please ask application to fix it, don't ask input method to do anything. Actually, input method could do nothing with this.

Although there is some walkaround for specific problem, bug is still in application, not in input method.

  • Opera, enable on the spot for XIM.
  • Firefox, enable preedit.