Install and configure ibus input method

Install and configure ibusinput method

IBus(" Intelligent Input Bus") is an input method framework , a system for entering non-English characters.

IBusFunctions similarly to SCIMand Uim.

Install:

Use the software installation management tool that comes with the system to install ibusthe software package.

Red Hat// And its derivative systems are installed using CentOSthe / software installation management tool .Fedorayumdnfibus

Debianand its derivative systems aptare installed using software installation management tools ibus.

ArchLinuxand its derivative systems pacmanare installed using software installation management tools ibus.

……

input method engine

At least one input method is required for the language being used.

Available input methods include:

Chinese engine
  • ibus-pinyin: An intelligent Chinese voice input method engine that supports Chinese pinyin and phonetic symbols. The designer is Ibusthe main author of and has many advanced features (such as English spelling correction).
  • ibus-libpinyin: A powerful intelligent Chinese voice input engine, based on libpinyin, provides ibus-pinyinmore powerful functions than , supports dynamic adjustment of word frequency, cloud input, and can add user dictionaries.
  • ibus-rime: A powerful intelligent Chinese input method that supports Pinyin, Zhuyin or Pinyin without tones, Shuangpin, Cantonese Pinyin, Zhongzhouyun, Cangjie and Wubi 86.
  • ibus-chewing: An intelligent Chinese voice input method engine that supports phonetic symbols and is based on libchewing.
Japanese engine
Vietnamese engine
  • ibus-unikey: Input method engine for inputting Vietnamese characters. (Development has stopped)
other engines
  • ibus-hangul: A Korean input method, based on libhangul.
  • ibus-table: An input method engine that supports lookup-type input method.
  • ibus-m17n: An m17ninput method engine that can m17n-dbinput many languages ​​using input methods from a database.

Initial installation

After the input method engine is installed, run ibus-setupthe initial program of (when Ibusthe user wants to use ):

$ ibus-setup

The background program will be started and this message will be given:

IBus has been started! If you cannot use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.
(译:IBus 已启动!若还不能用 Ibus,请您将以下的三行代码加到 $HOME/.bashrc,再重新登录。)
 export GTK_IM_MODULE=ibus
 export XMODIFIERS=@im=ibus
 export QT_IM_MODULE=ibus

Notice:

Although Ibusa daemon is used, it is not systemda managed daemon:

Ordinary users can also run it, and it will start automatically when logging in.

Notice:

If it ibushas not been started yet,

exportCopy those " " codes to $HOME/.xprofile,

② Add this line of code to the file: " ibus-daemon -drx"

③ Log in again.

After that, you will see ibusthe settings.

IbusIbusThis screen can be accessed at any time while running by right-clicking on the icon in the system tray and selecting " Preferences" (Options).

Configuration

Notice:

If you want to input Chinese, Japanese, Korean, and Vietnamese characters, you need to install East Asian fonts .

① The default " General" (General) setting should be available, but it is best to click " Input Methods" (Input Method), select the input method in the drop-down list box, and click " Add" (Add).

②After Ibusconfiguration, you can press Ctrl+Spaceto use (press multiple times to switch between installed languages).

③ In each window, Ibusthe input method used will be remembered, so each newly opened window needs to be restarted.

④ You can replace this feature by right-clicking on the system tray icon, selecting " Preferences" (Preferences), and then clicking the " Advanced" (Advanced) tab.

Notice:

IBusDefault overrides Xmodmapthe settings of .

This feature can be disabled,

referencesClick " " ( AdvancedAdvanced) in " " (Preferences),

Check the " Use system keyboard layout" option.

Troubleshooting

1. Unable to input

If it still cannot be used after configuring according to the above steps, you can use the following steps to further set up:

① Please make sure you have installed ibus, ibus-clutter, ibus-gtk, ibus-qtand im-config, or similar software.

② Use im-config -s ibusthe command to start the ibus framework ,

③ Enter ibus-setupthe command to start ibusthe setting,

④ Restart to repair

hint:

For ibus-rimeinput method,

Please ensure that the input scheme of this input method has been installed. rimeThe input scheme is as follows:

① #晙月PINYin (pre-installed):librime-data-luna-pinyin

② # Double Pin:librime-data-double-pinyin

③ # Gong Bao Pinyin:librime-data-combo-pinyin

④ # Zhuyin, Earth Pinyin: librime-data-terra-pinyin&librime-data-bopomofo

⑤ # Cangjie fifth generation (pre-installed):librime-data-cangjie5

⑥ # Quick Five Generations:librime-data-quick5

⑦ # Wubi 86, pocket simplified pinyin, five-stroke painting: librime-data-wubi& librime-data-pinyin-simp&librime-data-stroke-simp

⑧ # IPA (X-SAMPA):librime-data-ipa-xsampa

⑨ # Shanghai Wuyu:librime-data-wugniu

⑩ #粤片:librime-data-jyutping

⑪ # Medieval Chinese Pinyin:librime-data-zyenpheng

2、rxvt-unicode

If you have issues ibuswith rxvt-unicodethe package, the following steps should resolve it.

① Add the following two lines of code to ~/.Xresourcesthe file:

(It may not be necessary, try it first, and then add code if problems occur)

 URxvt.inputMethod: ibus
 URxvt.preeditType: OnTheSpot,None

② Start with the following command Ibus:

ibus-daemon --xim

If is ibus-daemonturned on automatically (as in ~/.xinitrcor ~/.xsession),

But the previously executed option ibus-daemon &was useless --xim,

Make sure to end open processes first,

Try the new command again.

3. GTKApplication

When users GTKuse the input method under the application, gtk.immodulesproblems may occur because the file cannot be found.

Add to $HOME/.bashrc:

(gtk2) export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules
(gtk3) export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache

That should solve the problem.

Notice:

If set to gtk2, then gtk3applications that cannot be used such as gedit,

If set to gtk3, gtk2applications such as xfce.

4. Chinese input

If you encounter problems entering Chinese, check localethe settings.

For example, in Hong Kong, export LANG=zh_HK.utf8.

If you want to start it ibusrandomly gnome, add these ~/.profileand restart gnome.

 export GTK_IM_MODULE=ibus
 export XMODIFIERS=@im=ibus
 export QT_IM_MODULE=ibus
 ibus-daemon -drx

More detailed solutions can be found here .

5、LibreOffice

If IBushas indeed been started, but LibreOfficeno input window appears in ,

① You need to ~/.bashrcadd this line to:

export XMODIFIERS=@im=ibus

② You need to use the " --xim -d" parameter to start ibus, so ~/.xinitrcadd this line to:

ibus-daemon --xim -d

However, it must be started in the terminal LibreOffice.

If you use KDEand the above method doesn't work, and you don't mind GTK2running in mode LibreOffice,

① Install " libreoffice-gnome"

~/.xprofileAdd this line in :

export OOO_FORCE_DESKTOP="gnome"

This will enable normal use IBusin LibreOffice, and can be launched from anywhere LibreOffice– not just in the terminal.

6. Modify the font and size of the Gnome-shellMedium candidate boxibus

There is quite a bit of criticism about the fact that the candidate word fonts and font sizes of the input method Gnome-shellcannot be set independently .ibus

Below, a modification method is introduced.

① A Gnome-Shelltheme needs to be installed and activated.

② The theme gnome-shell.cssfiles need to be modified.

This file is usually in the directory /usr/share/themes/主题名/gnome-shell/.

③ Open with your favorite editor,

Search .candidate-popup-contentfield (create a new one if it does not exist):

.candidate-popup-content {
    
    
}

④ Add the following two lines as needed (it should look like the box below after adding). Through this setting, you can change the font and size of the entered letters:

.candidate-popup-content {
    
    
 /* 设置字体 */
 font-family: "Microsoft YaHei UI", serif,cantarell,sans-serif;
 /* 设置号 */
 font-size: 15px;
}

If you need to modify the font and size of the candidate box, you need to search for .candidate-boxthe field (create a new one if there is one):

.candidate-box {
    
    
}

⑤ Add the following two lines as needed (it should look like the box below after adding). Through this setting, you can change the font and size of the entered letters:

.candidate-box {
    
    
 /* 设置字体 */
 font-family: "Microsoft YaHei UI", serif,cantarell,sans-serif;
 /* 设置号 */
 font-size: 15px;
}

7. Turn on single line mode

If ibus-libpinyinusing

You can turn on single-line mode by selecting "Compact" under "Appearance" - "Display Style" in its settings interface.

Notice:

ibus-libpinyinDisplayed as "Chinese (Intelligent Pinyin)" in the input source and system tray.

Guess you like

Origin blog.csdn.net/GaaraZ/article/details/127826968