中文输入法 scim安装 gentoo 64 non-multi-lib

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.

File: /etc/make.conf
...
# 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.

File: /etc/make.conf
...
# CJK
USE="${USE} scim immqt-bc cjk unicode nls anthy m17n-lib"

After adding these USE flags do a simple update.

emerge -avuDN
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.

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.

File: /etc/locale.gen
...
# 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:

locale-gen
env-update; source /etc/profile

[edit ] Environment

Edit the following as root to set the locale. Replace en_us.UTF-8 which your locale of choice.

File: /etc/env.d/02locale
...
LANG="en_US.UTF-8"
...

Then run

env-update; source /etc/profile

After doing this, make sure your locale was registered.

locale

[edit ] Getting SCIM

Getting SCIM is as simple as emerging anything else. In the terminal:

[edit ] Gnome / XFCE4

emerge -av scim scim-tables

[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.

emerge -av skim scim-tables scim-qtimm

[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.

emerge -av scim-bridge

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 (拼音)

emerge -av
scim-pinyin

Some additional input methods can choose for Tranditional Chinese language by install gentoo-taiwan overlay.

emerge -av layman
layman -a
gentoo-taiwan

1. scim-chewing (新酷音)

emerge -av
scim-chewing

2. scim-array (行列30)

emerge -av
scim-array

[edit ] Japanese

emerge -av uim
scim-uim scim-anthy

[edit ] Korean

emerge -av
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

File: /etc/profile
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

[edit ] KDE

For KDE (SKIM) do

File: /etc/profile
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=skim
export QT_IM_MODULE=skim

For KDE (SCIM-Bridge) do

File: /etc/profile
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

File: ~/.xinitrc
scim -d &

For KDE

File: ~/.xinitrc
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
LANG='zh_CN' scim -d
export XMODIFIERS=@im=SCIM
#export XIM_PROGRAM=scim
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

阅读更多
个人分类: linux_gentoo
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

中文输入法 scim安装 gentoo 64 non-multi-lib

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭