View previous topic :: View next topic |
Author |
Message |
kaytoo n00b
Joined: 09 Dec 2006 Posts: 22
|
Posted: Thu Dec 14, 2006 8:49 am Post subject: Scim安装指南,有安装的问题可以参照此帖~ |
|
|
一个输入法装了三天 ...不得不佩服自己的RP,把自己总结的步骤发上来,希望能对正在为此头疼的朋友有帮助.希望大家可以少走些弯路,至少比我多活了三天......
声明:以下步骤都是是从网上搜集整理出来的,再加以校正.并非自己原创,我现在可没有那个本事....
我的Gentoo版本是2006.1.图形界面用的是gnome
安装语言是zh_TW.Big5
1.vi ~/.bash_profile or ~/.zprofile
Code: |
export LANG="zh_TW.Big5"
export LC_CTYPE="zh_TW.Big5"
|
2.vi /etc/make.conf
3.emerge zh-kcfonts arphicfonts twmoefonts
4.vi ~/.gnomerc
Code: |
#!/bin/sh
# Set your Language/Character Set. Possible Choices:
# zh_TW.Big5 : Traditional Chinese Big5
# zh_CN.gb2312 : Simplified Chinese GB
# zh_HK.Big5HKSCS : Traditional Chinese Big5 with HK characters.
XLANG="zh_TW.Big5"
# Set your preferred XIM Server. Possible Choices:
# xcin, scim, fcitx, xsim, chinput
XIM="scim"
# Uncomment the line below if you would like an all Chinese environment
#LANG="${XLANG}"
################################################
### You do not need to modify the code below ###
################################################
xcin_init() {
if [ "${XLANG}" = "zh_CN.gb2312" ]; then
export XMODIFIERS=@im=xcin-${XLANG}
else
export XMODIFIERS=@im=xcin
fi
[ -n "${XLANG}" -a -x /usr/bin/xcin ] && LANG="${XLANG}" /usr/bin/xcin &
}
scim_init() {
export XMODIFIERS=@im=SCIM
# loads both GTK2 and XIM servers
[ -x /usr/bin/scim ] && (
LANG="${XLANG}" /usr/bin/scim -f socket -ns socket -d
LANG="${XLANG}" /usr/bin/scim -f x11 -s socket -c socket -d
)
}
xsim_init() {
export XMODIFIERS=@im=XSIM
[ -x /usr/bin/xsim ] && LANG="${XLANG}" /usr/bin/xsim &
}
fcitx_init() {
if [ "${XLANG}" = "zh_CN.gb2312" -o "${XLANG}" = "zh_CN" ]; then
export XMODIFIERS=@im=fcitx
export XIM=fcitx
export XIM_PROGRAM=fcitx
[ -x /usr/bin/fcitx ] && LANG="${XLANG}" /usr/bin/fcitx &
else
echo "Invalid Language/Charset for fcitx"
fi
}
chinput_init() {
export XMODIFIERS=@im=Chinput
[ -x /usr/bin/chinput ] && LANG="${XLANG}" /usr/bin/chinput
}
case ${XIM} in
xcin)
xcin_init
;;
scim)
scim_init
;;
fcitx)
fcitx_init
;;
xsim)
xsim_init
;;
chinput)
chinput_init
;;
*)
echo "XIM invalid"
;;
esac
| ################################################
### End of XIM initialisation code ###
################################################
################################################
### Add the rest of your initialisation ###
################################################
# for gnome-session
exec /etc/X11/gdm/gnomerc
# for other wm
# exec /usr/bin/fluxbox
[/code]
然后
emerge scim-tables
emerge scim-pinyin
最后
vi /etc/gtk-2.0/gtk.immodules
Code: |
找到这行
"scim" "SCIM Input Method" "scim" "/usr/share/locale" ""
换成
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "*"
|
这样,什么firefox.gaim输入问题就全解决了! |
|
Back to top |
|
|
akar Bodhisattva
Joined: 03 Dec 2004 Posts: 348 Location: HKSAR,China
|
Posted: Fri Dec 15, 2006 1:49 am Post subject: |
|
|
kaytoo 網友,你好,歡迎你來到 Gentoo 官方論譠。 一輸入法也安裝三天,我也偑服你一下。 想當年我第一次安裝 Gentoo 時,因為搞不好中文,結果放棄了。
這是我的中文 設置 撮要:
總體編譯設置 System-wide emerege USE settings
/etc/make.conf wrote: |
USE = USE+ "nls cjk unicode zh_TW" -- enable i18N 程式可處理中文的開關選項
|
安裝中文字體 emerge cjk fonts
你可以在這裏找到很多字體。 Found youself tones of font for cjk glyphs display.
Code: | $ ls /usr/portage/media-fonts/ |
個人設置 中文環境桌面系統 customize Desktop Environment profile to CJK-enabled
~/.xinitrc wrote: |
export LANG=zh_TW.UTF-8
export LANGUAGE=zh_TW
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
exec dbus-launch --exit-with-session gnome-session
|
注意,以上的文檔是給 startx 指令用的, 如果是用圖型界面登入系統的,它是讀取這個文檔:
ps: .xinitrc is used by console command "startx", for those who login system though GDM, here is one more step:
Code: | $ ln -sv ~/{.xinitrc,.xsession} |
_________________ AKar |
|
Back to top |
|
|
ant1688 Tux's lil' helper
Joined: 03 May 2007 Posts: 138
|
Posted: Wed Jun 13, 2007 12:49 pm Post subject: |
|
|
多谢akar的回复。
我已经装过i18N,显示和输入中文没有问题,唯独问题在中文文件名。也曾经试过 mount -t vfat -o iocharset=gb2312,code=cp936 之类的各种组合,均无改进。
看到你写的 Quote: | USE = USE+ "nls cjk unicode zh_TW" -- enable i18N | 我猜想可能需要用你说的USE参数重新编译一下i18N。
AKar@2007-06-14 修改本帖編碼為 utf-8 |
|
Back to top |
|
|
akar Bodhisattva
Joined: 03 Dec 2004 Posts: 348 Location: HKSAR,China
|
Posted: Mon Jun 18, 2007 1:03 am Post subject: |
|
|
我在猜想會不會是 運行的程式和底層的文字編碼不一致而形成的給合性問題。可以找來一個目錄比較少資料、又有中文訊息的,然後用以下指令弄一些資料,然後貼上來看看:
Quote: | $ LANG=C ls -1 |hexdump |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|