Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

I can't run fcitx on Atom #5447

Closed
gongbaodd opened this issue Feb 7, 2015 · 10 comments
Closed

I can't run fcitx on Atom #5447

gongbaodd opened this issue Feb 7, 2015 · 10 comments
Labels

Comments

@gongbaodd
Copy link

atom version:0.177.0
archLinux: x86_64
fcitx version: 4.2.8.5

I can use fcitx in Chrome/Chromium.But I cannot type Chinese in atom of this version.

@izuzak
Copy link
Contributor

izuzak commented Feb 9, 2015

@gongbaodd Can you clarify what fcitx is exactly (I've never heard about it) and why you can't use it in Atom (are you seeing an error or some other unexpected behavior)? Sharing more details and perhaps a screenshot would be helpful.

@xfq
Copy link
Contributor

xfq commented Feb 12, 2015

fcitx is an input method framework. It supports multiple input method engines and you can input languages such as Chinese, Japanese, and Korean with fcitx. Some information about fcitx:

I'm not quite familiar with fcitx, though. On GNU/Linux, I usually use SCIM or IBus when inputting CJK characters.

Just FYI - Emacs also has many built-in input methods (although the Chinese ones are somewhat inefficient, I think). Moreover, Vim has ywvim and VimIM.

@yuyichao
Copy link

@xfq Unless there's something I'm missing, the emacs/vim input methods are irrelevant here. (Furthermore, I use emacs and it's input method support is terrible in many ways.)

@izuzak I just installed atom and tested Fcitx on it. It seems that the input method originally works fine but sometimes when atom window got focus, the focus is not in the input region (the cursor is not blinking) and (I'm guessing) you are manually forwarding the key event which confuses/breaks the input method. @wengxt

@gongbaodd if you are not able to use fcitx at all, please paste $ fcitx-diagnose

@wengxt
Copy link

wengxt commented Feb 12, 2015

A stable reproducible way to trigger a input method related bug is open the menu from menubar, then input method focus will be messed up.

@yuyichao it's a chrome/chromium based editor, I doubt they are doing anything specificly.

I know opera and chrome are suffering from a similar issue that focus of input method might not work in some case.

There are some effort from chromium to fix focus problem.
https://code.google.com/p/chromium/issues/detail?id=323376
https://code.google.com/p/chromium/issues/detail?id=290701

From latest code, this hidden option is still needed to be enabled manually:
https://src.chromium.org/viewvc/chrome/trunk/src/ui/base/ui_base_switches_util.cc?revision=280546

I don't know if atom accept chromium specific argument, but @gongbaodd you can try

atom --enable-text-input-focus-manager

to see if it works better. I do notice with this argument or without this argument make a small difference, but both have some bug.

@izuzak
Copy link
Contributor

izuzak commented Feb 13, 2015

Thanks for the comments @xfq @yuyichao @wengxt. I have to admit that I have little knowledge about those things, so just trying to get as much information and context as possible.

Looking at some other issues, I noticed #2266 and #5328 (maybe #2242 as well?). Do those issues look like they cover the problem described in this issue? If so, it would be great to have a single issue with all the necessary information.

@wengxt
Copy link

wengxt commented Feb 13, 2015

@izuzak
This might be the same issue #2266 as this.

Input method related issue is quite platform specific . This is on mac, so I have no idea about that. Usually, one won't be able reproduce same input method bug different platform. #5328

For #2242 , from the log most likely ibus itself crashed. (fcitx and ibus are both input method framework under linux, users need to pick one of them to use input method to type their languages, especially for CJKV users.)

@wengxt
Copy link

wengxt commented Feb 13, 2015

Ah, for #2242, what ever the original reports might be the same issue.

For @khanhicetea 's case in #2242, ibus might just crash.

@gongbaodd
Copy link
Author

@yuyichao I found that the environment variables were wrong. I edited ~/.xprofile as below and it worked.

export GTK_IM_MODULE=fcitx

thanks a lot @yuyichao @xfq @yuyichao @wengxt @defunkt

@light4
Copy link

light4 commented Jul 20, 2015

I can't run fcitx on Atom Editor v1.0.2, export GTK_IM_MODULE=fcitx and atom --enable-text-input-focus-manager do not work. Fcitx works fine on Chrome.

fcitx-diagnose output:

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

        Linux Archlinux 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015 x86_64 GNU/Linux

2.  `lsb_release -a`:

        LSB Version:    1.4
        Distributor ID: Arch
        Description:    Arch Linux
        Release:    rolling
        Codename:   n/a

3.  `lsb_release -d`:

        Description:    Arch Linux

4.  `/etc/lsb-release`:

        LSB_VERSION=1.4
        DISTRIB_ID=Arch
        DISTRIB_RELEASE=rolling
        DISTRIB_DESCRIPTION="Arch Linux"

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

6.  桌面环境:

    桌面环境为 `kde`。

7.  Bash Version:

        BASH_VERSION='4.3.39(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0'

2.  键盘布局:

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

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN.gbk
            zh_CN.utf8

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

4.  目录:

    1.  主目录:

            /home/light4

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/light4/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/light4/.config/fcitx`)。

5.  当前用户:

    脚本作为 light4 (1000) 运行。

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

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

2.  版本:

    Fcitx 版本: `4.2.9`

3.  进程:

    找到了 2 个 fcitx 进程:

         2253 fcitx
        11852 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    **未找到 gtk3 的配置界面.**

4.  KDE 的配置界面:

    **无法找到一个图形界面的配置工具,请安装 `kcm-fcitx`,`fcitx-config-gtk2`,`fcitx-config-gtk3` 之一。**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    环境变量 XMODIFIERS 已经正确地设为了 "@im=fcitx".
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    环境变量 QT_IM_MODULE 已经正确地设为了 "fcitx".

2.  qt5 - `${QT_IM_MODULE}`:

    环境变量 QT_IM_MODULE 已经正确地设为了 "fcitx".

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

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

    环境变量 GTK_IM_MODULE 已经正确地设为了 "fcitx".

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.28` 的 `gtk-query-immodules`.
        版本行:

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

        已找到 gtk `2.24.28` 的 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:*" 

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.16.5` 的 `gtk-query-immodules`.
        版本行:

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

        已找到 gtk `3.16.5` 的 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:*" 

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.28` 的输入法模块缓存.
        版本行:

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

        已找到 gtk `2.24.28` 的 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:*" 

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.16.5` 的输入法模块缓存.
        版本行:

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

        已找到 gtk `3.16.5` 的 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:*" 

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

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

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

2.  插件列表:

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

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-cloudpinyin
            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-rime
            fcitx-spell
            fcitx-sunpinyin
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

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

        fcitx-keyboard-us
        sunpinyin
        pinyin
        rime

2.  默认输入法:

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

# 日志:
1.  `date`:

        2015年 07月 20日 星期一 13:17:24 CST

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

        总用量 0

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

    `~/.config/fcitx/log/crash.log` 未找到.

@lock
Copy link

lock bot commented Jan 21, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants