fcitx không chịu VNI?

493 views
Skip to first unread message

maikhai

unread,
Mar 10, 2016, 10:06:20 PM3/10/16
to ArchLinux Việt Nam
Mình cài để dùng thử fcitx coi sao, nhưng sau một hồi mò mẫm thì tuy gõ telex được, VNI lại không cho ra tiếng Việt.
Arch đang chạy MATE, không thấy có .xprofile hoặc .xinitrc nên mình nhét đại một file ".xprofile" vào với nội dung như trong hướng dẫn
[afota@fota ~]$ cat .xprofile

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

Reboot thì fcitx tự động nạp, xem kỹ trong config thấy input method là Unikey và VNI, và cũng đã add font ttf.hannom, nhưng gõ "có" (co+1) thì vẫn bị nhảy ra thành "cos". Nếu bật sang Telex thì khi gõ "cos" nhảy ra "có" ngon lành.

Mong nhận được trợ giúp. Cám ơn.

maikhai

unread,
Mar 11, 2016, 7:34:39 AM3/11/16
to ArchLinux Việt Nam
Gõ tiếng Việt với fcitx trong Arch xfce4:

* Trước hết cần gỡ ibus-unikey khỏi hệ thống. Tiếp theo,
* Vào https://wiki.archlinux.org/index.php/fcitx, làm theo hướng dẫn.
Với Arch64 (Linux localhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3
13:12:33 UTC 2016 x86_64 GNU/Linux)
Cần chạy:

# pacman -S fcitx-unikey
# pacman -S ttf-hannom
# pacman -S fcitx-configtool
# pacman -S fcitx-im (All)

Dán 3 dòng sau vào .xinitrc hoặc .xprofile (quất luôn cả hai vì không
nắm rõ :)

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

Chuột phải vào icon fcitx để ấn định kiểu gõ, vv...
Nếu cần, chạy # fcitx-diagnose để soát coi còn gì rắc rối.
Reboot.
Fcitx sẽ autostart. Nhấn Ctrl+Space để chuyển kiểu nhập.

Kết quả:
Gõ tốt trong xcfe4-terminal, firefox, note, mousepad, libreoffice.
Trong UXterm và xterm có vấn đề tuy vẫn cho ra tiếng Việt.

Ghi mấy dòng cài đặt theo history, có thể sót.
Mong các bạn sửa giùm các chỗ sai, và bổ sung cài đặt trong các môi
trường kde, gnome, MATE, vv. Cám ơn.

[cobh@localhost ~]$ fcitx-diagnose
# System Info:
1. `uname -a`:

Linux localhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 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 `xfce`.

6. 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
en_US.utf8
POSIX

2. Current locale:

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

4. Directories:

1. Home:

/home/cobh

2. `${XDG_CONFIG_HOME}`:

Environment variable `XDG_CONFIG_HOME` is not set.

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

3. Fcitx Settings Directory:

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

5. Current user:

The script is run as cobh (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:

652 fcitx
665 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}`:

Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
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}`:

Environment variable QT_IM_MODULE is set to "fcitx" correctly.

2. qt5 - `${QT_IM_MODULE}`:

Environment variable QT_IM_MODULE is set to "fcitx" correctly.

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

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

Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

2. `gtk-query-immodules`:

1. gtk 2:

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

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

Found fcitx im modules for gtk `2.24.29`.

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

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

Found fcitx im modules for gtk `3.18.7`.

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

Found fcitx im modules for gtk `2.24.29`.

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

Found fcitx im modules for gtk `3.18.7`.

"/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-imselector
fcitx-ipc
fcitx-keyboard
fcitx-kimpanel-ui
fcitx-libpinyin
fcitx-notificationitem
fcitx-pinyin
fcitx-pinyin-enhance
fcitx-punc
fcitx-quickphrase
fcitx-remote
fcitx-spell
fcitx-table
fcitx-unicode
fcitx-unikey
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-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`:

Fri Mar 11 19:33:06 ICT 2016

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

total 0

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

`~/.config/fcitx/log/crash.log` not found.
[cobh@localhost ~]$

maikhai

unread,
Mar 13, 2016, 10:43:30 PM3/13/16
to ArchLinux Việt Nam
Ghi chép thêm về fcitx:

Vì lần trước dù "thành công" nhưng không biết chắc chắn là thành công do đâu, nên mình quyết định cài một bản Arch mới toanh vào partition khác để thử lại. Kết quả lần này càng ... thê thảm hơn:
* Cài Arch cho chạy xfce4 không nhận ra unicode,
* Khi cài enlightenment thì mới gõ được. Tuy nhiên: các dấu sắc và dấu huyền bị sai chỗ (xem các dòng trên), dù đã thử chọn hoặc bỏ chọn "oà""uý",
* Nếu vào bằng enlightenment16 thì hệ thống không tự động nạp fcitx, phải kích hoạt bằng dòng lệnh.

maikhai

unread,
Mar 13, 2016, 10:53:48 PM3/13/16
to ArchLinux Việt Nam
Vào 09:43:30 UTC+7 Thứ Hai, ngày 14 tháng 3 năm 2016, maikhai đã viết:


Vào 09:43:30 UTC+7 Thứ Hai, ngày 14 tháng 3 năm 2016, maikhai đã viết:
Các chỗ gõ sai liệt kê ra như:
Khi gõ chữ về (v+e+^+`)thì dấu huyền bị đánh bên ngoài,
Khi gõ chữ chắc chắn (c+h+ă+1) thì dấu sắc bị đánh vào chữ c # chữ "chắn" thì dấu sắc bị đánh trên chữ n.
Kỳ lạ là sau khi nhấn vào nút "ĐĂNG" thì các chỗ sai như mô tả trên kia không còn nữa mà trở thành đúng như thông thường.

Có ai cũng bị như vậy không nhỉ?

maikhai

unread,
Mar 14, 2016, 4:45:18 AM3/14/16
to ArchLinux Việt Nam
Mình cũng bị như thế này khi gõ trong xterm:

Một điểm trừ là khi dùng trên skype, phần text đang trong preedit bị hiển thị trong một ô riêng chứ không chỉ là text bị gạch dưới như trong những chương trình khác. (xem hình dưới)
http://www.nerdyweekly.com/posts/ibus-is-dead-to-me-use-fcitx-instead-vi/

Reply all
Reply to author
Forward
0 new messages