請問在英文語系的ubuntu,無法輸入中文 [論壇 - Ubuntu基本設定]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



請問在英文語系的ubuntu,無法輸入中文
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4800
EXP: 84
離線
各位先進好
目前環境是英文版ubuntu,想請問如何輸入中文?
有找了一下,都是在 系統設定->語系中加入中文語系,以及在text entry加入中文國家
但使用的win + space 還是無法輸入中文
在dpkg中,有看到ibus,語系也可以選,但就是無法輸入中文
請問還有哪需要設定嗎?

另外想請問一下,因為安裝的中文語系,所以有日期會顯示中文,例如中文 "5月"
這部分可以改回英文嗎?
以及ibus的功能是?

謝謝

2018/7/12 14:47
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員二級
註冊日期:
2013/11/7 9:24
所屬群組:
已註冊使用者
等級: 8
HP : 0 / 187
MP : 30 / 5422
EXP: 51
離線
net2016 寫到:
各位先進好
目前環境是英文版ubuntu,想請問如何輸入中文?
有找了一下,都是在 系統設定->語系中加入中文語系,以及在text entry加入中文國家
但使用的win + space 還是無法輸入中文
在dpkg中,有看到ibus,語系也可以選,但就是無法輸入中文
請問還有哪需要設定嗎?

另外想請問一下,因為安裝的中文語系,所以有日期會顯示中文,例如中文 "5月"
這部分可以改回英文嗎?
以及ibus的功能是?

謝謝


如附件,我是這樣做的,我是18.04,一樣是英文界面,中文輸入用gcin

附件:



png  Selection_003.png (75.28 KB)
36860_5b4706684cfc0.png 985X734 px

2018/7/12 15:42
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4800
EXP: 84
離線
Hi Mark Chang
使用gcin後成功了,謝謝
但需要使用ctrl + space切換(win + space切換後感覺沒作用??)
再次感謝

2018/7/12 16:21
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30217
EXP: 23
離線
關於

net2016 寫到:
Hi Mark Chang
使用gcin後成功了,謝謝
但需要使用ctrl + space切換(win + space切換後感覺沒作用??)
再次感謝



可以透過「gcin-tools (gcin Tools)」這個圖形介面工具來設定。

啟動後會跳出一個設定視窗,視窗標題是「gcin-tools」,

請切換到第4個頁籤「內定輸入法 & 開啟/關閉」,

會看到其中一個欄位「輸入視窗(開啟/關閉)切換」,可以下拉切換

有四種模式可以選擇

* Control-Space
* Shift-Space
* Alt-Space
* Windows-Space

設定執行將會存入「~/.gcin/config/gcin-im-toggle-keys」這個檔案,是用數字來紀錄

* 0 : Control-Space
* 1 : Shift-Space
* 2 : Alt-Space
* 3 : Windows-Space

================================================================================

以下簡易套件探索,提供參考

執行下面指令,下載「Source Package: gcin


$ apt-get source gcin



會下載3個檔案如下

* gcin_2.8.5+dfsg1-4build4.debian.tar.xz
* gcin_2.8.5+dfsg1-4build4.dsc
* gcin_2.8.5+dfsg1.orig.tar.xz

並且解開到「gcin-2.8.5+dfsg1」這個資料夾。

================================================================================

執行


$ grep 'gcin-im-toggle-keys' gcin-2.8.5+dfsg1/* -R -n



顯示


gcin-2.8.5+dfsg1/gcin-conf.h:36:#define GCIN_IM_TOGGLE_KEYS "gcin-im-toggle-keys"
grep: gcin-2.8.5+dfsg1/gcin.test: No such file or directory
grep: gcin-2.8.5+dfsg1/libgcin-im-client.so.1: No such file or directory
gcin-2.8.5+dfsg1/man/gcin-tools.1:160:.IP "\fB$HOME/.gcin/config/gcin-im-toggle-keys\fP \fInumber\fP"
grep: gcin-2.8.5+dfsg1/ts-contribute-en: No such file or directory
grep: gcin-2.8.5+dfsg1/ts-edit-en: No such file or directory



================================================================================

執行


$ grep 'GCIN_IM_TOGGLE_KEYS' gcin-2.8.5+dfsg1/* -R -n



顯示


gcin-2.8.5+dfsg1/gcin-conf.h:36:#define GCIN_IM_TOGGLE_KEYS "gcin-im-toggle-keys"
gcin-2.8.5+dfsg1/gcin-settings.cpp:120:  gcin_im_toggle_keys = get_gcin_conf_int(GCIN_IM_TOGGLE_KEYS, 0);
gcin-2.8.5+dfsg1/gcin-setup-list.cpp:253:  save_gcin_conf_int(GCIN_IM_TOGGLE_KEYS, imkeys[idx].keynum);
gcin-2.8.5+dfsg1/gcin-setup-list.cpp:255:  save_gcin_conf_int(GCIN_IM_TOGGLE_KEYS, Control_Space);
grep: gcin-2.8.5+dfsg1/gcin.test: No such file or directory
grep: gcin-2.8.5+dfsg1/libgcin-im-client.so.1: No such file or directory
grep: gcin-2.8.5+dfsg1/ts-contribute-en: No such file or directory
grep: gcin-2.8.5+dfsg1/ts-edit-en: No such file or directory



================================================================================

執行


$ grep 'Control_Space' gcin-2.8.5+dfsg1/* -R -n



顯示


gcin-2.8.5+dfsg1/eve.cpp:1268:      ((kev_state & (ControlMask|Mod1Mask|ShiftMask))==ControlMask && gcin_im_toggle_keys==Control_Space) ||
gcin-2.8.5+dfsg1/gcin.cpp:99:        if ((call_data->key_index == 0 && gcin_im_toggle_keys==Control_Space) ||
gcin-2.8.5+dfsg1/gcin.h:80:  Control_Space=0,
gcin-2.8.5+dfsg1/gcin-setup-list.cpp:10:  {"Control-Space", Control_Space},
gcin-2.8.5+dfsg1/gcin-setup-list.cpp:255:  save_gcin_conf_int(GCIN_IM_TOGGLE_KEYS, Control_Space);
grep: gcin-2.8.5+dfsg1/gcin.test: No such file or directory
grep: gcin-2.8.5+dfsg1/libgcin-im-client.so.1: No such file or directory
grep: gcin-2.8.5+dfsg1/ts-contribute-en: No such file or directory
grep: gcin-2.8.5+dfsg1/ts-edit-en: No such file or directory



================================================================================

執行


$ grep 'Control_Space' gcin-2.8.5+dfsg1/gcin.h -n -A 5 -B 2



顯示


78-
79-typedef enum {
80:  Control_Space=0,
81-  Shift_Space=1,
82-  Alt_Space=2,
83-  Windows_Space=3,
84-} IM_TOGGLE_KEYS;
85-




================================================================================

執行


$ grep 'Control_Space' gcin-2.8.5+dfsg1/gcin-setup-list.cpp -n -A 6 -B 5



顯示


5-
6-struct {
7-  char *keystr;
8-  int keynum;
9-} imkeys[] = {
10:  {"Control-Space", Control_Space},
11-  {"Shift-Space", Shift_Space},
12-  {"Alt-Space", Alt_Space},
13-  {"Windows-Space", Windows_Space},
14-  { NULL, 0},
15-};
16-
--
...略...



================================================================================

以上提供參考


2018/7/15 13:47
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30217
EXP: 23
離線
延續「#4」,

若是使用「hime」,則是透過「hime-setup」這個圖形介面工具

在第一個頁簽「開啟/關閉/預設輸入法」,

有一個欄位「Toggle input window」,

一樣有四種模式可以選擇

* Control-Space
* Shift-Space
* Alt-Space
* Windows-Space

設定執行將會存入「~/.config/hime/hime.conf」這個檔案,

紀錄在其中一行,舉例「hime-im-toggle-keys=0」,

也是用數字來紀錄

* 0 : Control-Space
* 1 : Shift-Space
* 2 : Alt-Space
* 3 : Windows-Space

執行


$ grep 'hime-im-toggle-keys' ~/.config/hime/hime.conf



顯示


hime-im-toggle-keys=0


2018/7/15 14:16
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30217
EXP: 23
離線
若是使用「ibus」,預設是使用「<Super>space」也就是,您原本提到的「win + space」。

================================================================================

可以使用下面指令,還原成預設值


$ gsettings reset org.freedesktop.ibus.general.hotkey triggers



================================================================================

可以使用下面指令,觀看目前的設定值


$ gsettings get org.freedesktop.ibus.general.hotkey triggers



顯示


['<Super>space']



================================================================================

而我慣用「Ctrl + Space」,所以我會執行下面指令來做設定


$ gsettings set org.freedesktop.ibus.general.hotkey triggers "['<Control>space']"



上面這個指令,我之前有紀錄在「GitHub」上


後記: 相關討論「#2 回覆: Lubuntu 18.10 輸入法問題


================================================================================

若一開始要找尋「org.freedesktop.ibus.general.hotkey triggers」

可以執行下面指令


$ gsettings list-recursively | grep ibus | grep triggers



顯示


org.freedesktop.ibus.general.hotkey triggers ['<Super>space']



================================================================================

若要找尋預設值,另一個方法如下

執行


$ dpkg -L ibus | grep schemas



顯示


/usr/share/glib-2.0/schemas
/usr/share/glib-2.0/schemas/10_ibus.gschema.override
/usr/share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml



可以使用「triggers」當關鍵字,在「/usr/share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml」這個檔案找尋

可以找到其中一段如下


<key type="as" name="triggers"><default>[ '<Super>space' ]</default><summary>Trigger shortcut keys for gtk_accelerator_parse</summary><description>The shortcut keys for turning input method on or off</description></key>



================================================================================

關於「gsettings」的一些討論案例連結,我之前有紀錄在「[索引] 泛Ubuntu 安裝調校」。

可以找尋「## gsettings and dconf」,就可以找到相關討論案例列表。

================================================================================


若是要使用圖形界面來設定,則是使用「ibus-setup」。

在第一個頁簽「General」,

有一個區塊「Keyborard Shortcuts」,

有一個選項「Next input Method」,在那可以設定。

================================================================================

另外我不確定在您的環境,無法在「ibus」切換輸入法的原因,

我測試的時候也是採用「英文界面」。

我目前想到一個可能的原因,也許您還沒安裝相關的中文輸入,也沒設定加入新的中文輸入法到候選切換列表裡。

我之前有紀錄一個安裝「Shell Script」,提供您參考

這個範例是使用「ibus-chewing」來做中文輸入。

另外我目前測試,是在「lxqt」測試,要先執行「ibus-setup」,才能正常使用「ibus」。

然後在「gnome-shell」則是無法正常運作,目前不曉得關鍵因素是啥,這部份我目前沒再研究下去了。


先紀錄目前觀察到的


================================================================================

一開始進到「lxqt」,執行下面指令


$ ps aux | grep ibus



顯示


gdm       3576  0.0  0.1 366828  9564 tty1     Sl   15:30   0:00 ibus-daemon --xim --panel disable
gdm       3579  0.0  0.0 286076  7852 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-dconf
gdm       3582  0.0  0.3 396688 29304 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
gdm       3584  0.0  0.0 284020  7768 ?        Sl   15:30   0:00 /usr/lib/ibus/ibus-portal
gdm       3661  0.0  0.0 210352  7596 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-engine-simple
user      10516  0.0  0.0  13072  1028 pts/0    S+   15:55   0:00 grep --color=auto ibus




然後再執行


$ ibus-setup



接著再執行



$ ps aux | grep ibus



則會顯示如下


gdm       3576  0.0  0.1 366828  9564 tty1     Sl   15:30   0:00 ibus-daemon --xim --panel disable
gdm       3579  0.0  0.0 286076  7852 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-dconf
gdm       3582  0.0  0.3 396688 29304 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
gdm       3584  0.0  0.0 284020  7768 ?        Sl   15:30   0:00 /usr/lib/ibus/ibus-portal
gdm       3661  0.0  0.0 210352  7596 tty1     Sl   15:30   0:00 /usr/lib/ibus/ibus-engine-simple
user      10529  0.2  0.1 369044  9888 ?        Sl   15:56   0:00 ibus-daemon --xim
user      10534  0.0  0.1 288388  8184 ?        Sl   15:56   0:00 /usr/lib/ibus/ibus-dconf
user      10535  3.7  0.4 461816 37836 ?        Sl   15:56   0:00 /usr/lib/ibus/ibus-ui-gtk3
user      10539  0.1  0.2 328412 17472 ?        Sl   15:56   0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
user      10542  0.0  0.1 286184  8412 ?        Sl   15:56   0:00 /usr/lib/ibus/ibus-portal
user      10552  0.0  0.1 212516  8256 ?        Sl   15:56   0:00 /usr/lib/ibus/ibus-engine-simple
user      10574  0.0  0.0  13072  1060 pts/0    R+   15:56   0:00 grep --color=auto ibus





================================================================================

我個人採用的「輸入法框架」是「fcitx」,使用的「中文輸入法」則是使用「fcitx-chewing

之前有紀錄一些輸入法安裝的「Shell Script」放在「GitHub」上。

================================================================================

以上提供參考,報告完畢


2018/7/15 15:00
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 221
MP : 39 / 4800
EXP: 84
離線

我個人採用的「輸入法框架」是「fcitx」,使用的「中文輸入法」則是使用「fcitx-chewing」

之前有紀錄一些輸入法安裝的「Shell Script」放在「GitHub」上。

samwhelp

我後來執行ibus-setup,在input Method中,加入chinese-Zuyin,使用super + space切換還是英文,看來沒成功
目前比較不解的地方為,所謂的"輸入法框架",也就是您們所說的fcitx、gcin、hime、ibus...是什麼東西Orz?
看來不是輸入法,但好像一定要安裝,如果沒有桌面環境下(raspberry pi server)可以輸入中文嗎?

2018/7/17 15:28
應用擴展 工具箱
回覆: 請問在英文語系中ubuntu,無法輸入中文
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30217
EXP: 23
離線
net2016 寫到:

我個人採用的「輸入法框架」是「fcitx」,使用的「中文輸入法」則是使用「fcitx-chewing」

之前有紀錄一些輸入法安裝的「Shell Script」放在「GitHub」上。

samwhelp

我後來執行ibus-setup,在input Method中,加入chinese-Zuyin,使用super + space切換還是英文,看來沒成功
目前比較不解的地方為,所謂的"輸入法框架",也就是您們所說的fcitx、gcin、hime、ibus...是什麼東西Orz?
看來不是輸入法,但好像一定要安裝,如果沒有桌面環境下(raspberry pi server)可以輸入中文嗎?


其實我也不太會解釋,所以先找了Wiki的連結紀錄下來

## Wikipedia

* FCITX
* IBus
* gcin

## Arch Wiki

* Fcitx
* IBus
* Gcin


## Package

* fcitx-chewing
* ibus-chewing
* hime-chewing

## 新酷音

* http://chewing.im/
* http://chewing.im/projects.html
* https://github.com/chewing

以上提供參考


2018/7/17 20:42
應用擴展 工具箱
回覆: 請問在英文語系的ubuntu,無法輸入中文
會員一級
註冊日期:
2011/7/3 21:10
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 60
MP : 7 / 2159
EXP: 41
離線
在kubuntu18.04 安裝好fcitx 的倉頡輸入, 在chrome 可以輸入中文, 但在libreoffice, kate 就用不了, 有解決方法嗎?謝謝

2018/8/27 13:12
應用擴展 工具箱
回覆: 請問在英文語系的ubuntu,無法輸入中文
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30217
EXP: 23
離線
ybm 寫到:
在kubuntu18.04 安裝好fcitx 的倉頡輸入, 在chrome 可以輸入中文, 但在libreoffice, kate 就用不了,
有解決方法嗎?謝謝


我沒使用「Kubuntu18.04」測試過,所以不確定在您的環境,所導致的關鍵因素是啥,

我在我的環境「Ubuntu 18.04」,「桌面環境」是使用「lxqt」,輸入法是使用「fcitx-chewing」。

在「LibreOffice」,「kate」輸入中文是可以正常運作的。

以前有紀錄一些討論案例的連結,在「[索引] 中文輸入

例如可以參考這篇「LibreOffice 不能用 fcitx 打中文」。

================================================================================

以下提供在我的環境的相關資訊,給您參考。

================================================================================

執行


$ dpkg -l '*fcitx*'



顯示


Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-=========
ii  fcitx                           1:4.2.9.6-1          all                  Flexible Input Method Framework
ii  fcitx-bin                       1:4.2.9.6-1          amd64                Flexible Input Method Framework - essential binaries
ii  fcitx-chewing                   0.2.2-1              amd64                Fcitx wrapper for Chewing library
ii  fcitx-config-common             0.4.10-1             all                  graphic Fcitx configuration tool - common files
ii  fcitx-config-gtk                0.4.10-1             amd64                graphic Fcitx configuration tool - Gtk+ 3 version
ii  fcitx-data                      1:4.2.9.6-1          all                  Flexible Input Method Framework - essential data files
ii  fcitx-frontend-all              1:4.2.9.6-1          all                  Flexible Input Method Framework - frontends metapackage
un  fcitx-frontend-fbterm           <none>               <none>               (no description available)
ii  fcitx-frontend-gtk2             1:4.2.9.6-1          amd64                Flexible Input Method Framework - GTK+ 2 IM Module frontend
ii  fcitx-frontend-gtk3             1:4.2.9.6-1          amd64                Flexible Input Method Framework - GTK+ 3 IM Module frontend
ii  fcitx-frontend-qt4              1:4.2.9.6-1          amd64                Flexible Input Method Framework - Qt4 IM Module frontend
ii  fcitx-frontend-qt5:amd64        1.1.1-1build3        amd64                Free Chinese Input Toy of X - Qt5 IM Module frontend
un  fcitx-hangul                    <none>               <none>               (no description available)
un  fcitx-keyboard                  <none>               <none>               (no description available)
un  fcitx-libs                      <none>               <none>               (no description available)
un  fcitx-libs-gclient              <none>               <none>               (no description available)
un  fcitx-libs-qt5                  <none>               <none>               (no description available)
un  fcitx-m17n                      <none>               <none>               (no description available)
ii  fcitx-module-dbus               1:4.2.9.6-1          amd64                Flexible Input Method Framework - D-Bus module and IPC frontend
ii  fcitx-module-kimpanel           1:4.2.9.6-1          amd64                Flexible Input Method Framework - KIMPanel protocol module
ii  fcitx-module-lua                1:4.2.9.6-1          amd64                Flexible Input Method Framework - Lua module
un  fcitx-module-quickphrase-editor <none>               <none>               (no description available)
ii  fcitx-module-x11                1:4.2.9.6-1          amd64                Flexible Input Method Framework - X11 module and XIM frontend
ii  fcitx-modules                   1:4.2.9.6-1          amd64                Flexible Input Method Framework - core modules
un  fcitx-modules-x11               <none>               <none>               (no description available)
un  fcitx-tools                     <none>               <none>               (no description available)
ii  fcitx-ui-classic                1:4.2.9.6-1          amd64                Flexible Input Method Framework - Classic user interface
un  fcitx-ui-kimpanel               <none>               <none>               (no description available)
un  fcitx-ui-light                  <none>               <none>               (no description available)
un  fcitx-unikey                    <none>               <none>               (no description available)
un  kde-config-fcitx                <none>               <none>               (no description available)
ii  libfcitx-config4:amd64          1:4.2.9.6-1          amd64                Flexible Input Method Framework - configuration support library
ii  libfcitx-core0:amd64            1:4.2.9.6-1          amd64                Flexible Input Method Framework - library of core functions
ii  libfcitx-gclient1:amd64         1:4.2.9.6-1          amd64                Flexible Input Method Framework - D-Bus client library for Glib
ii  libfcitx-qt5-1:amd64            1.1.1-1build3        amd64                Free Chinese Input Toy of X - D-Bus client libraries for Qt5
ii  libfcitx-utils0:amd64           1:4.2.9.6-1          amd64                Flexible Input Method Framework - utility support library



================================================================================

執行下面指令,觀看「/etc/default/locale」這個檔案的內容


$ cat /etc/default/locale



顯示


# File generated by update-locale
LANG="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"



================================================================================

執行


$ locale



顯示


LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=



關於「locale」,我之前有簡易紀錄一些「筆記」。
關於「輸入法」,之前也有簡易紀錄。

================================================================================

以上提供參考,報告完畢

2018/8/27 13:51
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.