2017年10月22日 星期日

樹莓派安裝中文輸入法 (酷音輸入法)

鄉下那台 XP 老電腦上個月被我換成樹莓派 Pi 3, 因為已經開不了機了. Pi 3 效能大概跟我那台 XP 差不多, 雖然語系指定為英語, 但瀏覽中文網頁沒有問題, 也可以寫 blogger, 唯一的問題是如何輸入中文?

我找到下面這篇文章, 原來只要一個指令就可以安裝酷音中文輸入法了 :

樹莓派Raspberry Pi安裝中文輸入法與字型

$ sudo apt-get install scim-chewing

酷音輸入法類似 Windows 上的注音輸入法, 但配詞比較聰明, 參考 :

新酷音輸入法

安裝完後樹莓派須重新啟動才能使用此中文輸入法. 在樹莓派中切換中英文是按 Ctrl+SPACE; 若安裝了多個輸入輸入法, 按 Ctrl+Shift 可切換不同之輸入法.

安裝過程如下 :

pi@raspberrypi:~ $ sudo apt-get install scim-chewing
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following extra packages will be installed:
  dialog im-config libchewing3 libchewing3-data libscim8c2a scim
  scim-gtk-immodule scim-im-agent scim-modules-socket
Suggested packages:
  scim-uim scim-pinyin scim-hangul scim-m17n scim-prime scim-anthy scim-skk
  scim-canna scim-tables-additional scim-tables-ja scim-tables-ko
  scim-tables-zh scim-thai
Recommended packages:
  ttf-arphic-uming
The following NEW packages will be installed:
  dialog im-config libchewing3 libchewing3-data libscim8c2a scim scim-chewing
  scim-gtk-immodule scim-im-agent scim-modules-socket
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,573 kB of archives.
After this operation, 8,346 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libchewing3-data all 0.4.0-2 [1,399 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libchewing3 armhf 0.4.0-2 [67.8 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libscim8c2a armhf 1.4.15-3 [226 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main dialog armhf 1.2-20140911-1 [233 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main im-config all 0.27-2 [53.7 kB]                              
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main scim armhf 1.4.15-3 [372 kB]                                
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main scim-modules-socket armhf 1.4.15-3 [54.0 kB]                
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main scim-im-agent armhf 1.4.15-3 [60.9 kB]                      
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main scim-gtk-immodule armhf 1.4.15-3 [44.3 kB]                  
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main scim-chewing armhf 0.3.4-4.1 [62.5 kB]                    
Fetched 2,573 kB in 10s (242 kB/s)                                                                                        
Selecting previously unselected package libchewing3-data.
(Reading database ... 122949 files and directories currently installed.)
Preparing to unpack .../libchewing3-data_0.4.0-2_all.deb ...
Unpacking libchewing3-data (0.4.0-2) ...
Selecting previously unselected package libchewing3:armhf.
Preparing to unpack .../libchewing3_0.4.0-2_armhf.deb ...
Unpacking libchewing3:armhf (0.4.0-2) ...
Selecting previously unselected package libscim8c2a:armhf.
Preparing to unpack .../libscim8c2a_1.4.15-3_armhf.deb ...
Unpacking libscim8c2a:armhf (1.4.15-3) ...
Selecting previously unselected package dialog.
Preparing to unpack .../dialog_1.2-20140911-1_armhf.deb ...
Unpacking dialog (1.2-20140911-1) ...
Selecting previously unselected package im-config.
Preparing to unpack .../im-config_0.27-2_all.deb ...
Unpacking im-config (0.27-2) ...
Selecting previously unselected package scim.
Preparing to unpack .../scim_1.4.15-3_armhf.deb ...
Unpacking scim (1.4.15-3) ...
Selecting previously unselected package scim-chewing:armhf.
Preparing to unpack .../scim-chewing_0.3.4-4.1_armhf.deb ...
Unpacking scim-chewing:armhf (0.3.4-4.1) ...
Selecting previously unselected package scim-modules-socket:armhf.
Preparing to unpack .../scim-modules-socket_1.4.15-3_armhf.deb ...
Unpacking scim-modules-socket:armhf (1.4.15-3) ...
Selecting previously unselected package scim-im-agent.
Preparing to unpack .../scim-im-agent_1.4.15-3_armhf.deb ...
Unpacking scim-im-agent (1.4.15-3) ...
Selecting previously unselected package scim-gtk-immodule:armhf.
Preparing to unpack .../scim-gtk-immodule_1.4.15-3_armhf.deb ...
Unpacking scim-gtk-immodule:armhf (1.4.15-3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for libgtk2.0-0:armhf (2.24.25-3+deb8u1) ...
Processing triggers for libgtk-3-0:armhf (3.14.5-1+deb8u1rpi1rpi1g) ...
Setting up libchewing3-data (0.4.0-2) ...
Setting up libchewing3:armhf (0.4.0-2) ...
Setting up libscim8c2a:armhf (1.4.15-3) ...
Setting up dialog (1.2-20140911-1) ...
Setting up im-config (0.27-2) ...
Setting up scim (1.4.15-3) ...
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/ja_JP (xinput-ja_JP) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/ko_KR (xinput-ko_KR) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/zh_CN (xinput-zh_CN) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/zh_TW (xinput-zh_TW) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/zh_HK (xinput-zh_HK) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim to provide /etc/X11/xinit/xinput.d/zh_SG (xinput-zh_SG) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/ja_JP (xinput-ja_JP) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/ko_KR (xinput-ko_KR) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/zh_CN (xinput-zh_CN) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/zh_TW (xinput-zh_TW) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/zh_HK (xinput-zh_HK) in auto mode
update-alternatives: using /etc/X11/xinit/xinput.d/scim-immodule to provide /etc/X11/xinit/xinput.d/zh_SG (xinput-zh_SG) in auto mode
Setting up scim-chewing:armhf (0.3.4-4.1) ...
Setting up scim-modules-socket:armhf (1.4.15-3) ...
Setting up scim-im-agent (1.4.15-3) ...
Setting up scim-gtk-immodule:armhf (1.4.15-3) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
pi@raspberrypi:~ $

但是使用時發現有時候會卡住, 按注音都沒反應, 要切回英文模式才可輸入, 不知啥原因.

參考 :

Raspberry Pi 筆記(三十八):系統語系與中文輸入法
樹莓派 Raspberry Pi 安裝中文輸入法與字型

沒有留言 :