Re: [問題] a big trouble about gcin and scim

看板Linux作者 (山豬MP)時間16年前 (2009/07/25 22:02), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串3/5 (看更多)
I have some questions. I have done the following action $ 1 I added the following code in ~/.profile export INPUT_METHOD="gcin" $ 2 In /etc/X11/xim.d/gcin, I have written the prograim as :OLD_PATH=$PATH :PATH=/usr/bin:/usr/X11R6/bin:/opt/kde3/bin:$PATH : :if ! type -p gcin > /dev/null 2>&1 ; then : echo "gcin is not available." : PATH=$OLD_PATH : return 1 :fi : :#when skim installed, Autostart must be "false". :#here we move $HOME/.kde/share/config/skimrc to skimrc.orig.gcin :case "$WINDOWMANAGER" in : *kde) : if type -p skim > /dev/null 2>&1 \ : && ! grep -i -q "^[[:space:]]*Autostart.*=.*false" :$HOME/.kde/share/config/skimrc : then : : if [ -f $HOME/.kde/share/config/skimrc.orig.gcin ] ; then : : mv -f $HOME/.kde/share/config/skimrc :$HOME/.kde/share/config/skimrc.orig.gcin : chmod 777 $HOME/.kde/share/config/skimrc.orig.gcin : : fi : : cat > $HOME/.kde/share/config/skimrc << __END : :[General] : :Autostart=false : :__END : : chmod 777 $HOME/.kde/share/config/skimrc : : else : : # do nothing : : : : : fi : : ;; : : *) : : # do nothing : : ;; : :esac : : :# Determine the LC_CTYPE locale category setting :tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}} : :case $tmplang in : zh_*) # Traditional Chinese and Simplify Chinese : export LC_CTYPE=$LANG : # So you can use either zh_TW.UTF-8 or zh_TW.Big5 or zh_CN.UTF-8 :or zh_CN.GB2312 : export XMODIFIERS="@im=gcin" : export GTK_IM_MODULE=gcin : export QT_IM_SWITCHER=imsw-multi : export QT_IM_MODULE=gcin : gcin & : ;; : *) # for other languages try to export LC_TYPE=zh_TW.UTF-8(or you :want to use LC_CTYPE=zh_CN.UTF-8), I'm not sure if this can work : export LC_CTYPE=$LANG : export XMODIFIERS="@im=gcin" : export GTK_IM_MODULE=gcin : export QT_IM_SWITCHER=imsw-multi : export QT_IM_MODULE=gcin : gcin & : ;; :esac :PATH=$OLD_PATH : :# success: :return 0 $ 3 In /etc/sysconfig/language, I added INPUT_METHOD="gcin" -------------------------------nonsense end------------------------------- Q1 How to install the .deb software? Q2 In your third advice, the version of gcin is lower than me. So, should I lower the version of my gcin if I use this way? Q3 I have used the least way, and the following is my program #!/bin/bash export GTK_IM_MODULE=xim ^^^^ what does this value mean? /usr/bin/firefox But, out of this question, your least way is no work exactly. So, my only choice now is going to try the third way. Finally, I very appreciate your direction. : ----------------------------------------------------------------------- : 會發生這種情況,就我目前所知可能的原因有二個: : (一) 移除scim 並安裝 gcin 後 沒有重開機或重新啟動gcin : (二) 權限的問題 : 如果是屬於(一)的問題,請重新開機試看看 : 如果重開機後問題仍然無法解決。那就有可能權限的問題,解決方法可參考如下: : Step(1) : 以 root 的身份 切換到 command line下 : Step(2) : 切換到:/usr/share/gcin/table 下 : 說明:這個table的目錄就是gcin 放 輸入法的地方 : Step(3) : 一 : 下:ls -al 命令 : 二 : 正常的情況下看到的每個檔案的權限要是這樣的: : -rw-r--r-- 1 root root : 三: 若不是( 二 ) 的情況,而是出現 :-rw-r----- 1 root root : 四: 請更改異常檔案的權限: : chmod o+r 異常檔案 : 五: 更改完畢之後請重新啟動gcin 或 重開機 : ------------------------------------------------------------------- : MPDK 兄反應在 firefo 下 無法使用 gcin 的中文輸入法 : 會發生這種原因主要是因為gcin輸入法的關系。 : 就小弟的經驗,有些電腦會這樣,但有些不會。 : 致少我的電腦就沒有這樣的情況。 : 小弟提供二種的解決方法: : (一) 請更新gcin 到 1.4的版本 : (二) 寫一隻script 來解決 : (一) : step(1) : http://sites.google.com/site/gcinunofficialdebs/gcin-unoffical-deb-packages/gcin-1-4-5 : 下載deb包 : step(2) : 安裝的套件如下:gcin_1.4.5~pre7-0~2+solomon_i386.deb : gcin-qt3-immodule_1.4.5~pre7-0~2+solomon_i386.deb : gcin-qt4-immodule_1.4.5~pre7-0~2+solomon_i386.deb : step(3) : 1 在 command line下 切換到 root : 2 dpkgi -i gcin_1.4.5~pre7-0~2+solomon_i386.deb \ : gcin-qt3-immodule_1.4.5~pre7-0~2+solomon_i386.deb \ : gcin-qt4-immodule_1.4.5~pre7-0~2+solomon_i386.deb : step(4) : 1 im-switch -s gcin : 2 重新開機(或登入) : 說明:在安裝1.4.5的版本前建議先移除原來的gcin的版本 : (二) : Step(1) : 以root 的身份切換到 command line :   Step(2) : 1 vi xx.sh : 2 加入以下的內容 :        #!/bin/bash : export GTK_IM_MODULE=xim : /usr/bin/firefox : Step(3) : chmod +x xx.sh : Step(4) :    執行 xx.sh : ./xx.sh        : Step(5) :  此時,再試看看 firefox下是否能使用gcin :       若可以,則上述的命令就寫在 /etc/rc.local 這個檔裡 :       開機的時候就會去自動執行。 :                  -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.169.164.213

07/26 00:31, , 1F
請問你的Display Manager 是用 Gnome還是KDE?!
07/26 00:31, 1F

07/26 00:51, , 2F
KDE
07/26 00:51, 2F

07/26 00:51, , 3F
Opensuse 11.1
07/26 00:51, 3F
文章代碼(AID): #1AQn1urr (Linux)
文章代碼(AID): #1AQn1urr (Linux)