使用 gcin

原來都是使用 gentoo-zh 的 overlay 所提供的 gcin 的 ebuild,其原先是由 "gentoo-taiwan" maintain 的,後來併入 "gentoo-zh"。但也許因為用的人少,漸漸的也不維護了。後來發現自己建 overlay 比較方便。只要用 google 搜尋想要的 overlay 的 ebuild,丟到對應的目錄下,即可使用。

例如,自己建的 overlay 放在 /home/user/overlay 目錄下,然後在 /etc/portage/make.conf 加上下面的設定即可。

PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/user/overlay ${PORTDIR}"

下載 overlay 的 ebuild,或自行建立,例如 gcin-2.7.9.ebuild,放在 /home/user/overlay/app-i18n/gcin 下,再執行下述指令建立 Manifest,

ebuild gcin-2.7.9.ebuild digest

接下來就可以安裝 gcin 了

# emerge -av gcin

或者

# ACCEPT_KEYWORDS=~* emerge -av gcin

針對使用 xfce4,在 ~/.config/xfce4/ 下建立 xinitrc,內容如下

=====================================
#!/bin/sh
#
# Settings for gcin.
#
export LANG=zh_TW.UTF-8
export LC_ALL=zh_TW.UTF-8
# 若要用 Big5 用下列設定
# export LC_ALL=zh_TW.Big5
# 支援 gtk 和 qt 應用程式的中文輸入
export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
export XMODIFIERS="@im=gcin"
exec gcin &
# execute the original scripts
sh /etc/xdg/xfce4/xinitrc
======================================

gcin 的輸入視窗黏在應用程式的左上角

2016/12/25 重裝後,再度發生這狀況,之前,筆電一直這樣,竟然不知道自己已經處理過了。

問題: gcin 的輸入視窗黏在應用程式的左上角。

網路上找到的答案,照著作,在 firefox 就正常了。

What steps will reproduce the problem?

1. A newly installed gentoo x86 with gnome (gnome-shell)

2. Install gcin and set up my .xprofile to launch it

3. on gtk-2 application like firefox, it cannot be launched

By $cat /etc/gtk-2.0/i686-pc-linux-gnu/gtk.immodules

There is no gcin module string:

"/usr/lib/gtk-2.0/immodules/im-gcin.so" "gcin" "gcin Input Method"

"gcin" "/usr/share/locale" "zh:ja"

執行指令 gtk-query-immodules-2.0 --update-cache 及 gtk-query-immodules-3.0 --update-cache,

更新 gtk2 和 gtk3 的 immodules.cache。

The reference is: http://hyperrate.com/thread.php?tid=26229

The same problem also seem in previous fedora package too.

64 位元的系統,請檢查 /etc/gtk-2.0/x86_64-pc-linux-gnu/gtk.immodules

檔案中,多了下面這行

"/usr/lib64/gtk-2.0/immodules/im-gcin.so"

"gcin" "gcin Input Method" "gcin" "/usr/share/locale" "zh:ja"

另外,可加上環境變數

GTK_IM_MODULE=gcin

外觀設定:

按鍵顯示於應用程式:

enable: 輸入時會字根會出現在遊標後面。

disable: 不會

外觀設定說明

http://hyperrate.com/thread.php?tid=10789

關於 gcin qt4 immodule 的設定

ref: http://hyperrate.com/thread.php?tid=26801

用手動設定,執行 /usr/bin/qtconfig ,在interface 的分頁

XIM Input Stype: On The Spot

Default Input Method: gcin

查詢 qtconfig 所屬的 portage

equery belongs qtconfig

* Searching for qtconfig ...

x11-libs/qt-qt3support-4.7.4 (/usr/bin/qtconfig)

gcin 原始檔: gcin-2.7.9.tar.xzgcin-2.8.3.tar.xz