1.先按这个装
http://en.gentoo-wiki.com/wiki/SCIM
Prerequisites
[edit ] General
It is best to add the following USE flags in your /etc/make.conf file.
...
# CJK
USE="${USE} scim unicode nls"
[edit ] CJK (Chinese Japanese Korean)
If you are planning to input CJK, it is best that you add the following to your /etc/make.conf file.
...
# CJK
USE="${USE} scim immqt-bc cjk unicode nls anthy m17n-lib"
After adding these USE flags do a simple update.
world
[edit ] Setting the Locale
By default, Gentoo is set to POSIX. Since using SCIM means you are going to use Unicode characters, you must set your locale accordingly. The following command should print your locale.
The output should be blank or say "POSIX" on each line unless you have already set your locale to something else.
[edit ] System
To set your locale, first check your /etc/locale.gen file. You should have set this when you installed Gentoo. Specify your locales here. Check /usr/share/i18n/SUPPORTED to find what you have to put in for your language. Some examples are listed below.
...
# For United States English
en_US ISO-8859-1
en_US.UTF-8 UTF-8
# For German
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
# For Chinese
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_CN GB2312
# For Japanese
ja_JP EUC-JP
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
# For Korean
ko_KR EUC-KR
ko_KR.EUC-KR EUC-KR
ko_KR.UTF-8 UTF-8
After you are done here, generate the locales using the following command:
[edit ] Environment
Edit the following as root to set the locale. Replace en_us.UTF-8 which your locale of choice.
...
LANG="en_US.UTF-8"
...
Then run
After doing this, make sure your locale was registered.
[edit ] Getting SCIM
Getting SCIM is as simple as emerging anything else. In the terminal:
[edit ] Gnome / XFCE4
[edit ] KDE
Some SCIM front-end that you can choose in KDE such as SKIM and SCIM-Bridge.
[edit ] SKIM (for KDE3 and qt3)
The original SCIM front-end is for GTK+. There is a front end for KDE called SKIM.
[edit ] SCIM-Bridge (for KDE4 and qt4)
这里当时过不去,得用ACCEPT_KEYWORDS="~amd64" emerge scim-bridge
But SKIM is not ready for KDE4 in this time (Sep. 8, 2009). SCIM-Bridge front-end is another choose in KDE4.
Use USE="-kde" for install scim-tables without install qt3. This package includes almost all CJK input methods.
USE="-kde" emerge -av scim-tables
[edit ] CJK
To have any of these languages, simply emerge the components. You can of course have two or more of these at the same time.
[edit ] Chinese
Some input methods can choose for Simplified Chinese language.
1. scim-pinyin (拼音)
scim-pinyin
Some additional input methods can choose for Tranditional Chinese language by install gentoo-taiwan overlay.
gentoo-taiwan
1. scim-chewing (新酷音)
scim-chewing
2. scim-array (行列30)
scim-array
[edit ] Japanese
scim-uim scim-anthy
[edit ] Korean
scim-hangul
[edit ] Using SCIM
To let applications recognize SCIM as an input method, you have to export some variables. This can easily be accomplished by appending the following lines to /etc/profile .
[edit ] GNOME or other GTK windows manager
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
[edit ] KDE
For KDE (SKIM) do
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=skim
export QT_IM_MODULE=skim
For KDE (SCIM-Bridge) do
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim-bridge
export QT_IM_MODULE=scim-bridge
export QT4_IM_MODULE=scim-bridge
[edit ] xinitrc
If you wish to have scim start automatically when you login add it to your ~/.xinitrc file.
For GTK
scim -d &
For KDE
skim -d &
[edit ] Tada
Now restart your computer to make sure all variables are loaded, then press ctrl+space to see the magic.
2. 再按这个:
https://forums.gentoo.org/viewtopic-t-706857-start-0.html
因为设置LC_CTYPE="zh_CN.UTF-8"时,netbeans中的错误提示为中文(我的所 有的应用程序都是英文的)
Code: |
mg@mg ~ $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" ... LC_ALL=en_US.UTF-8 |
/etc/gtk-2.0/gtk.immodules
修改 etc/gtk-2.0/gtk.immodules 文件将中间的
Code: |
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so" "xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh" |
加上 en 就可
Code: |
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so" "xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh" |
按上述方法修改无效果时,可按下述方法操作:
修改 etc/gtk-2.0/gtk.immodules 文件将中间的
Code: |
"/usr/lib/gtk-2.0/immodules/im-scim.so" "scim" "SCIM Input Method" "scim" "/usr/share/locale" "" |
加上 en:ko:ja:th:zh 就可
Code: |
"/usr/lib/gtk-2.0/immodules/im-scim.so" "scim" "SCIM Input Method" "scim" "/usr/share/locale" "en:ko:ja:th:zh" |
我的 .xinitrc
Code: |
# SCIM |