Difference between revisions of "IBus"

From ArchWiki
Jump to: navigation, search
m (LibreOffice: typo)
(Update KIMPanel configuration for Plasma 5)
 
(47 intermediate revisions by 28 users not shown)
Line 1: Line 1:
 
[[Category:Internationalization]]
 
[[Category:Internationalization]]
 +
[[ja:IBus]]
 
[[zh-CN:IBus]]
 
[[zh-CN:IBus]]
 
[[zh-TW:IBus]]
 
[[zh-TW:IBus]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|This article discusses the installation, configuration, and troubleshooting steps associated with the usage of IBus.}}
+
{{Related|Fcitx}}
{{Article summary heading|Related}}
+
{{Related|SCIM}}
{{Article summary wiki|SCIM}}
+
{{Related|UIM}}
{{Article summary wiki|UIM}}
+
{{Related articles end}}
{{Article summary end}}
+
'''IBus''' (''Intelligent Input Bus'') is an [[wikipedia:Input_method|input method framework]], a system for entering foreign characters. IBus functions similarly to [[Fcitx]], [[SCIM]] and [[UIM]].
'''IBus''' ("Intelligent Input Bus") is an [http://en.wikipedia.org/wiki/Input_method input method framework], a system for entering foreign characters. IBus functions similarly to [[SCIM]] and [[UIM]].  
+
  
==Installation==
+
== Installation ==
Install the {{pkg|ibus}} package from the [[Official Repositories]].
+
  
Additionally, to enable IBus for Qt applications, install the {{pkg|ibus-qt}} library.
+
Install the {{Pkg|ibus}} package from the [[official repositories]].
 +
 
 +
Additionally, to enable IBus for Qt applications, install the {{Pkg|ibus-qt}} library.
 +
 
 +
=== Input method engines ===
  
===Input Method Engines===
 
 
You will need at least one input method, corresponding to the language you wish to type. Available input methods include:
 
You will need at least one input method, corresponding to the language you wish to type. Available input methods include:
  
* ibus-anthy: A Japanese IME, based on {{Pkg|anthy}}.
+
* {{Pkg|ibus-anthy}} - Japanese IME, based on {{Pkg|anthy}}.
* ibus-pinyin: An intelligent Chinese Phonetic IME for Hanyu pinyin and Zhuyin (Bopomofo) users. Designed by IBus main author and has many advance features such as English spell checking.
+
* <strike>{{Pkg|ibus-pinyin}} - Intelligent Chinese Phonetic IME for Hanyu pinyin and Zhuyin (Bopomofo) users. Designed by IBus main author and has many advance features such as English spell checking.</strike> Package currently not maintained and partly broken with latest ibus base. Use {{Pkg|ibus-libpinyin}} instead.
* {{AUR|ibus-rime}}: A powerful and smart Chinese input method for Chinese (pinyin, zhuyin, with or without tones, double pinyin, Jyutping, Wugniu, Cangjie5 and Wubi 86) (AUR)
+
* {{Pkg|ibus-rime}} - Powerful and smart Chinese input method for Chinese (pinyin, zhuyin, with or without tones, double pinyin, Jyutping, Wugniu, Cangjie5 and Wubi 86).
* ibus-chewing: An intelligent Chinese Phonetic IME for Zhuyin (Bopomofo) users, based on {{Pkg|libchewing}}.
+
* {{Pkg|ibus-chewing}} - Intelligent Chinese Phonetic IME for Zhuyin (Bopomofo) users, based on {{Pkg|libchewing}}.
* ibus-hangul: A Korean IME, based on {{Pkg|libhangul}}.
+
* {{Pkg|ibus-hangul}} - Korean IME, based on {{Pkg|libhangul}}.
* ibus-unikey: An IME for typing Vietnamese characters.
+
* {{Pkg|ibus-unikey}} - IME for typing Vietnamese characters.
* ibus-table: An IME that accommodates table-based IMs.
+
* {{Pkg|ibus-table}} - IME that accommodates table-based IMs.
* ibus-m17n: A m17n IME which allows input of many languages using the input methods from m17n-db.
+
* {{Pkg|ibus-m17n}} - M17n IME which allows input of many languages using the input methods from {{Pkg|m17n-db}}.
* ibus-keymagic: A complex smart input method, designed to work with all kind of languages by using keyboard layouts(km2) generated by layout script(kms).
+
* {{AUR|ibus-mozc}} - Japanese IME, based on [[Mozc]].
 +
* {{Pkg|ibus-kkc}} - Japanese IME, based on {{Pkg|libkkc}}.
  
 
To see all available input methods:
 
To see all available input methods:
Line 33: Line 36:
 
Others packages are also available in the [[AUR]].
 
Others packages are also available in the [[AUR]].
  
===Initial Setup===
+
=== Initial setup ===
Now, run ibus-setup (as the user who will use IBus):
+
 
$ ibus-setup
+
Now, run {{ic| $ ibus-setup}} (as the user who will use IBus).
 
It will start the daemon and give you this message:
 
It will start the daemon and give you this message:
  IBus has been started! If you cannot use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.
+
  IBus has been started! If you cannot use IBus, please add below lines in {{ic|$HOME/.bashrc}}, and relogin your desktop.
  export GTK_IM_MODULE=ibus
+
export GTK_IM_MODULE=ibus
  export XMODIFIERS=@im=ibus
+
export XMODIFIERS=@im=ibus
  export QT_IM_MODULE=ibus
+
export QT_IM_MODULE=ibus
{{Note|Although IBus uses a daemon, it is not the sort of daemon managed by the DAEMONS array in /etc/rc.conf: it runs as an ordinary user and will be started for you when you login.}}
+
{{Note|If, however, ibus is ''not'' autostarted upon login, then move the “export …” lines above to $HOME/.xprofile instead, and append this line to the same file: “ibus-daemon -drx”, and relogin your desktop.}}
+
You will then see a configuration screen; you can access this screen whenever IBus is running by right-clicking the icon in the system tray and choosing "Preferences". See [[#Configuration|Configuration]].
+
  
If IBus doesn't work in Qt/KDE applications, ensure that the ibus-qt library is installed and define IBus as the default IME in the Qt configuration editor:
+
{{Note|
$ qtconfig
+
* Although IBus uses a daemon, it is not the sort of daemon managed by ''systemd'': it runs as an ordinary user and will be started for you when you login.
In "Interface" -> "Default Input Method", select {{ic|ibus}} instead of {{ic|xim}}.
+
* If, however, IBus is '''not''' autostarted upon login, then move the “export …” lines above to either
 +
** {{ic|$HOME/.xprofile}} instead and append this line to the same file: {{ic|ibus-daemon -drx}}, '''or'''
 +
** {{ic|$HOME/.xinitrc}} and append this line to the same file: {{ic|ibus-daemon -drx}}.
 +
::Which works best, depends on your [[Window manager]], see also [[xprofile]] and [[xinitrc]].
 +
* You can also try adding {{ic|ibus-daemon -drx}} after the {{ic|export ...}} lines in {{ic|$HOME/.bashrc}}.
 +
}}
  
==Configuration==
+
You will then see a configuration screen; you can access this screen whenever IBus is running by right-clicking the icon in the system tray and choosing ''Preferences''. See [[#Configuration|Configuration]].
=== Ibus ===
+
{{Note|You need to have [[Fonts_FAQ#Chinese.2C_Japanese.2C_Korean.2C_Vietnamese|East Asian fonts]] installed if you want to enter Chinese, Japanese, Korean or Vietnamese characters.}}
+
The default "General" settings should be fine, but go to "Input Methods" and select your input method(s) in the drop down box, then press "Add". You can use multiple input methods if you wish.
+
Once IBus is set up, you can press Ctrl+Space to use it (multiple times to cycle through available input methods). IBus will remember which input method you are using in each window, so you will have to reactivate it for each new window. You can override this behavior by right clicking the system tray icon, selecting "Preferences", and going to the "Advanced" tab.
+
  
=== Ibus-rime ===
+
If IBus does not work in Qt/KDE applications, ensure that the ''ibus-qt'' library is installed and define IBus as the default IME in the Qt configuration editor:
==== Installation ====
+
$ qtconfig-qt4
If you have decided to use the great ibus-rime IME, here are some help to install it and to configure it.
+
In ''Interface > Default Input Method'', select ''ibus'' instead of ''xim''.
  
First, you should install it from AUR : {{AUR|ibus-rime}}. Use your favorite package wrapper or use the official way with makepkg.
+
=== GNOME ===
  
In order to work, Rime is based on schemas that should be edited by the user. However, it comes installed with a default pinyin input schema so you can use it as it.
+
GNOME includes IBus by default, so you should only need to install the package specific to your language. To enable input in your language, add it to the ''Input Sources'' section of the ''Region & Language'' settings. After you add your input sources (at least 2), GNOME will show the input switcher icon in the tray. If you do not find your appropriate input source when trying to add your input sources, most likely you have not done locale-gen for that locale. The default keyboard shortcut to switch to the next input method in GNOME is {{ic|Super+space}}; disregard the ''next input method'' shortcut set in ''ibus-setup''.
  
==== Configuration ====
+
== Configuration ==
  
If you want it for another input method, here they are:
+
=== IBus ===
* Luna Pinyin (Standard Mandarin)
+
* Terra Pinyin (with tones)
+
* Bopomofo (Mandarin Phonetic Symbol)
+
* Double Pinyin (Ziranma, MSPY)
+
* Jyutping (Cantonese)
+
* Wugniu (Shanghainese)
+
* Cangjie5
+
* Wubi86
+
  
For example, if you want to be able to type pinyin with tones, you want to use the Terra Pinyin input method.
+
{{Note|You need to have [[Fonts_FAQ#Chinese.2C_Japanese.2C_Korean.2C_Vietnamese|east Asian fonts]] installed if you want to enter Chinese, Japanese, Korean or Vietnamese characters.}}
To do so, you have to first create a directory:
+
The default ''General'' settings should be fine, but go to ''Input Methods'' and select your input method(s) in the drop down box, then press ''Add''. You can use multiple input methods if you wish.
$ mkdir ~/.ibus/rime
+
Once IBus is set up, you can press {{ic|Super+space}} to use it (multiple times to cycle through available input methods). IBus will remember which input method you are using in each window, so you will have to reactivate it for each new window. You can override this behavior by right clicking the system tray icon, selecting ''Preferences'', and going to the ''Advanced'' tab.
  
In this directory, create a file entitled {{Ic|default.custom.yaml}} and add the following lines to it:
+
{{Note|By default, IBus overrides your [[Xmodmap]] setting. You can disable this feature by enabling "Use system keyboard layout" option in Preference -> Advanced.}}
{{hc|default.custom.yaml|
+
patch:
+
  schema_list:
+
    - schema: terra_pinyin
+
}}
+
Note that the indentation level is important. Your file says to Rime to replace the schema list with a list that only contains Terra Pinyin.
+
  
Eventually, if the changes aren't taken automatically, run:
+
=== Ibus-rime ===
rm ~/.config/ibus/rime/default.yaml && ibus-daemon -drx
+
  
Note: Tones are optionals but you can type them to filter the list very well. Here are how to type them:
+
If you have decided to use the great ''ibus-rime'' IME, check out [[Rime IME]] for some help to configure it.
1st tone: -
+
2nd tone: /
+
3rd tone: <
+
4th tone: \
+
  
Example: if one wants to type {{Ic|hǎo}} to display only Chinese characters that are pronounced this way, one must type {{Ic|hao<}} and it will be automatically converted to hǎo.
+
=== Entering Special Characters—The Compose Input Method ===
  
==== Usage ====
+
To type special characters, XKB supports compose key sequences. To fulfil this function, IBus supports an input method that is permanently in Compose mode. Instead of hitting a compose key, then typing out the compose sequence, the user switches to the Compose input method (by default using super-space (a.k.a. win-space)), types the compose sequence, then switches back to the previous method. In Archlinux, the Compose input method is not installed by default. To use it, install {{AUR|ibus-table-others}}{{Broken package link|{{aur-mirror|ibus-table-others}}}} from the AUR, restart IBus, then look for it in the list of input methods under 'other' at the bottom.
Rime provides some great features that allow you to write good Chinese and all its punctuation.
+
  
===== Basic configuration access =====
+
== Tips and tricks ==
At any time, while running Rime, you can access some basic options with {{Ic|F4}}. The displayed options look like this:
+
1. Method name
+
2. 中文 -› 西文
+
3. 全角 -› 半角
+
4. 漢字 -› 汉字
+
etc.
+
  
The first one indicate the name of the method you can select (Ex: 地球拼音 for Terra Pinyin). If you want many methods, you'll have them in this menu.
+
=== Pinyin usage ===
  
The second one lets you select which language you want to type in.
+
When using ''ibus-pinyin'',
 +
* First type the pinyin (sans tones) for the characters you wish to enter.
 +
* Press {{ic|Up}} and {{ic|Down}} repeatedly to select a character (going on to the next page if necessary).
 +
* Press {{ic|Space}} to use a character.
 +
* You can also use {{ic|PageUp}} or {{ic|PageDown}} to scroll pages, and use the number keys 1-5 to select the character you need.
 +
* You can enter multiple characters that form a word or phrase at a time (such as "zhongwen" to enter "中文"). ibus-pinyin will remember which characters you type most frequently and over time make suggestions that are more tuned to your typing profile.
  
The third one lets you select if you want to type the punctuation in full width (全角) or in half width (半角).
+
== Troubleshooting ==
  
The last one allows you to type in traditional Chinese (漢字) or in simplified Chinese (汉字).
+
=== Plasma 5 ===
  
===== Chinese punctuation =====
+
Plasma 5 applications may not accept Japanese (i.e. non-"direct input") text from Mozc using IBus. In order to resolve this problem add
You can access to all the Chinese punctuation thanks to Rime. Here is a little table showing you how to type some of them:
+
[ -> 「 【 〔 [
+
] -> 」 】 〕 ]
+
{ -> 『 〖 {
+
} -> 』 〗 }
+
< -> 《 〈 « ‹
+
> -> 》 〉 » ›
+
@ -> @ @ ☯
+
/ -> / / ÷
+
* -> * * ・ × ※
+
% -> % % ° ℃
+
$ -> ¥ $ € £ ¥
+
| -> ・ | | § ¦
+
_ -> ——
+
\ -> 、 \ \
+
^ -> ……
+
~ -> 〜 ~ ~ 〰
+
  
===== Advanced =====
+
export QT_IM_MODULE=ibus
Rime allows you to change everything you can imagine and more examples are provided on the website of the project: (in Chinese) https://code.google.com/p/rimeime/wiki/CustomizationGuide
+
  
==Tips and tricks==
+
to {{ic|~/.xprofile}} and restart your X user session.
===Pinyin usage===
+
When using ibus-pinyin,
+
* First type the pinyin (sans tones) for the characters you wish to enter.
+
* Press Up and Down repeatedly to select a character (going on to the next page if necessary).
+
* Press Space to use a character.
+
* You can also use PageUp or PageDown to scroll pages, and use the number keys 1-5 to select the character you need.
+
* You can enter multiple characters that form a word or phrase at a time (such as "zhongwen" to enter "中文"). ibus-pinyin will remember which characters you type most frequently and over time make suggestions that are more tuned to your typing profile.
+
  
==Troubleshooting==
+
=== Kimpanel ===
  
===Kimpanel===
+
IBus main interface is currently only available in GTK+, but Kimpanel provides a native Qt/KDE input interface. Kimpanel is bundled with Plasma 5, but IBus needs to be launched as following to be able to communicate with the panel
IBus main interface is currently only available in GTK, but {{Pkg|Kimpanel}} provides a native Qt/KDE input interface. Since kdeplasma-addons-applets-kimpanel version 4.7.95-3, the package is compiled to support ibus. However, ibus needs to be launched as following to be able to communicate with the panel:
+
  
  $ ibus-daemon --xim --panel=/usr/lib/kde4/libexec/kimpanel-ibus-panel
+
  $ ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel
  
To get a menu entry for launching ibus this way, save the following file to ~/.local/share/applications/ibus-kimpanel.desktop
+
To get a menu entry for launching ibus this way, save the following file to {{ic|~/.local/share/applications/ibus-kimpanel.desktop}}:
[Desktop Entry]
+
{{bc|<nowiki>
Encoding=UTF-8
+
[Desktop Entry]
Name=IBus (KIMPanel)
+
Encoding=UTF-8
Name[ar]=IBus (KIMPanel)
+
Name=IBus (KIMPanel)
Name[as]=IBus (KIMPanel)
+
GenericName=Input Method Framework
Name[bn_IN]=IBus (KIMPanel)
+
Comment=Start IBus Input Method Framework
Name[ca]=IBus (KIMPanel)
+
Exec=ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel
Name[da]=IBus (KIMPanel)
+
Icon=ibus
Name[de]=IBus (KIMPanel)
+
Terminal=false
Name[en_GB]=IBus (KIMPanel)
+
Type=Application
Name[es]=IBus (KIMPanel)
+
Categories=System;Utility;
Name[fr]=IBus (KIMPanel)
+
X-GNOME-Autostart-Phase=Applications
Name[gu]=IBus (KIMPanel)
+
X-GNOME-AutoRestart=false
Name[hi]=IBus (KIMPanel)
+
X-GNOME-Autostart-Notify=true
Name[hu]=IBus (KIMPanel)
+
X-KDE-autostart-after=panel
Name[it]=IBus (KIMPanel)
+
</nowiki>}}
Name[ja]=IBus (KIMPanel)
+
Name[kn]=IBus (KIMPanel)
+
Name[ko]=IBus (KIMPanel)
+
Name[ml]=IBus (KIMPanel)
+
Name[mr]=IBus (KIMPanel)
+
Name[nl]=IBus (KIMPanel)
+
Name[or]=IBus (KIMPanel)
+
Name[pa]=IBus (KIMPanel)
+
Name[pl]=iBus (KIMPanel)
+
Name[pt_BR]=IBus (KIMPanel)
+
Name[ru]=IBus (KIMPanel)
+
Name[sr]=IBus (KIMPanel)
+
Name[sr@latin]=IBus (KIMPanel)
+
Name[ta]=IBus (KIMPanel)
+
Name[te]=IBus (KIMPanel)
+
Name[uk]=IBus (KIMPanel)
+
Name[vi]=IBus (KIMPanel)
+
Name[zh_CN]=IBus (KIMPanel)
+
Name[zh_HK]=IBus (KIMPanel)
+
Name[zh_TW]=IBus (KIMPanel)
+
GenericName=Input Method Framework
+
GenericName[as]=ইনপুট পদ্ধতি গাথনি
+
GenericName[bn_IN]=ইনপুট পদ্ধতির পরিকাঠামো
+
GenericName[da]=Framework for inputmetode
+
GenericName[de]=Eingabemethode-Framework
+
GenericName[en_GB]=Input Method Framework
+
GenericName[es]=Marco de trabajo para métodos de entrada
+
GenericName[fr]=Framework de méthode de saisie
+
GenericName[gu]=ઇનપુટ પદ્દતિ ફ્રેમવર્ક
+
GenericName[hi]=IBus विधि फ्रेमवर्क
+
GenericName[it]=Framework del metodo di input
+
GenericName[ja]=インプットメソッドフレームワーク
+
GenericName[kn]=IBus ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್
+
GenericName[ko]=입력 방식 프레임워크
+
GenericName[ml]=ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി
+
GenericName[mr]=इन्पुट पद्धत फ्रेमवर्क
+
GenericName[nl]=Invoer methode kader
+
GenericName[or]=ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କ
+
GenericName[pa]=ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ
+
GenericName[pl]=Struktura metody wprowadzania
+
GenericName[pt_BR]=Framework do método de entrada
+
GenericName[ru]=Система методов ввода
+
GenericName[ta]=உள்ளீடு முறை ஃபிரேம்வொர்க்
+
GenericName[te]=ఇన్‌పుట్ పద్ధతి ఫ్రేమ్‌వర్క్
+
GenericName[uk]=Оболонка способів введення
+
GenericName[zh_CN]=输入法框架
+
GenericName[zh_TW]=輸入法框架
+
Comment=Start IBus Input Method Framework
+
Comment[as]=IBus ইনপুট পদ্ধতি গাথনি আৰম্ভ কৰা
+
Comment[bn_IN]=IBus ইনপুট পদ্ধতির পরিকাঠামো আরম্ভ করা হবে
+
Comment[da]=Start IBus, framework for inputmetode
+
Comment[de]=IBus-Eingabemethode-Framework starten
+
Comment[en_GB]=Start IBus Input Method Framework
+
Comment[es]=Inicie el marco de trabajo para métodos de entrada IBus
+
Comment[fr]=Démarrer le framework de méthode de saisie IBus
+
Comment[gu]=IBus ઇનપુટ પદ્દતિ ફ્રેમવર્કને શરૂ કરો
+
Comment[hi]=IBus इनपुट विधि फ्रेमवर्क आरंभ करें
+
Comment[it]=Avvia il framework del metodo di input di IBus
+
Comment[ja]=IBus インプットメソッドフレームワークを起動
+
Comment[kn]=IBus ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್ ಅನ್ನು ಆರಂಭಿಸು
+
Comment[ko]=IBus 입력 방식 프레임워크 시작
+
Comment[ml]=IBus ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി ആരംഭിയ്ക്കുക
+
Comment[mr]=IBus इन्पुट पद्धती फ्रेमवर्क सुरू करा
+
Comment[nl]=Start IBus invoer methode kader
+
Comment[or]=IBus ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କକୁ ଆରମ୍ଭ କରନ୍ତୁ
+
Comment[pa]=ਆਈਬਸ ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ ਸ਼ੁਰੂ ਕਰੋ
+
Comment[pl]=Uruchomienie struktury metody wprowadzania iBus
+
Comment[pt_BR]=Iniciar Framework do método de entrada IBus
+
Comment[ru]=Запустить систему методов ввода IBus
+
Comment[ta]=IBus உள்ளீடு முறை ஃபிரேம்வொர்க்கை துவக்கு
+
Comment[te]=IBus ఇన్‌పుట్ పద్ధతి ఫ్రేమ్‌వర్కును ప్రారంభించుము
+
Comment[uk]=Запуск оболонки способів введення IBus
+
Comment[zh_CN]=启动IBus 输入法框架
+
Comment[zh_TW]=啟動 IBus 輸入法框架
+
Exec=ibus-daemon --xim --panel=/usr/lib/kde4/libexec/kimpanel-ibus-panel
+
Icon=ibus
+
Terminal=false
+
Type=Application
+
Categories=System;Utility;
+
X-GNOME-Autostart-Phase=Applications
+
X-GNOME-AutoRestart=false
+
X-GNOME-Autostart-Notify=true
+
X-KDE-autostart-after=panel
+
  
 
Then you can either let KDE autostart ibus, or set it as the input method application in Kimpanel, and manually click on the kimpanel icon to start it. In either case, choose Utility/Ibus (Kimpanel) in the Choose Application dialog.
 
Then you can either let KDE autostart ibus, or set it as the input method application in Kimpanel, and manually click on the kimpanel icon to start it. In either case, choose Utility/Ibus (Kimpanel) in the Choose Application dialog.
  
===rxvt-unicode===
+
Finally, add the input panel widget to show the panel.
If anyone has any issues with iBus and rxvt-unicode, the following steps should solve it.
+
  
Add the following to your .Xdefaults (possibly not required -- try first without):
+
=== rxvt-unicode ===
  URxvt.inputMethod: ibus
+
  URxvt.preeditType: OverTheSpot
+
  
And start ibus with:
+
If anyone has any issues with IBus and ''rxvt-unicode'', the following steps should solve it.
  ibus-daemon --xim
+
  
If you start ibus-daemon automatically (e.g. in ~/.xinitrc or ~/.xsession) but used to use `ibus-daemon &' without the `--xim' option, make sure to kill the existing process before testing the new command.
+
Add the following to your {{ic|~/.Xresources}} (possibly not required, first try without):
 +
URxvt.inputMethod: ibus
 +
URxvt.preeditType: OverTheSpot
  
===GTK applications===
+
And start IBus with:
Some users have had problems using Input Methods with GTK applications, because it seems that the gtk.immodules file can't be found. Adding
+
$ ibus-daemon --xim
  (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
+
  
in addition to the three lines above in your $HOME/.bashrc seems to fix the problem.
+
If you start ''ibus-daemon'' automatically (e.g. in {{ic|~/.xinitrc}} or {{ic|~/.xsession}}) but used to use {{ic|ibus-daemon &}} without the {{ic|--xim}} option, make sure to kill the existing process before testing the new command.
  
{{note|If you set it to gtk2, then you can't use gtk3 applications like gedit, if you set it to gtk3, then you can't use gtk2 applications like xfce}}
+
=== GTK+ applications ===
  
===Chinese Input===
+
Some users have had problems using Input Methods with GTK applications, because it seems that the gtk.immodules file cannot be found. Adding:
If you encounter problems when using chinese input, check your locale settting. For example in Hong Kong, export LANG=zh_HK.utf8.
+
export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules
 +
for GTK+ 2, or:
 +
export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache
 +
for GTK+ 3, in addition to the three lines above in your {{ic|$HOME/.bashrc}} seems to fix the problem.
  
{{Note| There are large revisions after ibus1.4, you might not be able to input chinese words with ibus-pinyin or ibus-sunpinyin, which are written in C. So the solution is:
+
{{Note|If you set it to GTK+ 2, then you cannot use GTK+ 3 applications like ''gedit'', if you set it to GTK+ 3, then you cannot use GTK+ 2 applications like Xfce.}}
  
* Recompile ibus-sunpinyin in ABS by yourself. or
+
=== Chinese input ===
* Install ibus-googlepinyin, which is developed in python.
+
}}
+
You can install {{AUR|ibus-googlepinyin}} from the [[AUR]].
+
  
To start ibus with gnome, add this in ~/.profile and restart the gnome.
+
If you encounter problems when using Chinese input, check your locale setting. For example in Hong Kong, export LANG=zh_HK.utf8.
  
    export GTK_IM_MODULE=ibus
+
{{Note|There are large revisions after IBus 1.4, you might not be able to input Chinese words with ''ibus-pinyin'' or ''ibus-sunpinyin'', which are written in C. So the solution is to install {{Pkg|ibus-libpinyin}}.
    export XMODIFIERS=@im=ibus
+
}}
    export QT_IM_MODULE=ibus
+
 
    ibus-daemon -d -x
+
To start ibus with GNOME, add this in {{ic|~/.profile}} and restart the GNOME.
 +
{{bc|<nowiki>
 +
export GTK_IM_MODULE=ibus
 +
export XMODIFIERS=@im=ibus
 +
export QT_IM_MODULE=ibus
 +
ibus-daemon -d -x
 +
</nowiki>}}
  
 
Chinese users can refer to this [http://forum.ubuntu.org.cn/viewtopic.php?f=155&t=346639 page] for detailed solution concerning this bug.
 
Chinese users can refer to this [http://forum.ubuntu.org.cn/viewtopic.php?f=155&t=346639 page] for detailed solution concerning this bug.
  
===LibreOffice===
+
=== LibreOffice ===
If IBus does load but doesn't see LibreOffice as an input window, add this line to ~/.bashrc:
+
 
 +
If IBus does load but does not see LibreOffice as an input window, add this line to {{ic|~/.bashrc}}:
 
  export XMODIFIERS=@im=ibus
 
  export XMODIFIERS=@im=ibus
And then, you need to start ibus with "--xim -d", for example, add this line to ~/.xinitrc:
+
And then, you need to start ibus with {{ic|--xim -d}}, for example, add this line to {{ic|~/.xinitrc}}:
 
  ibus-daemon --xim -d
 
  ibus-daemon --xim -d
 
But the horrible thing is that you need to start LibreOffice in terminal.
 
But the horrible thing is that you need to start LibreOffice in terminal.
  
If you're using KDE and the above doesn't work, install "libreoffice-gnome" and add this line to ~/.xprofile if you don't mind running LibreOffice in GTK2 mode:
+
If you are using KDE and the above does not work, install {{Pkg|libreoffice-still}} and add this line to {{ic|~/.xprofile}} if you do not mind running LibreOffice in GTK+ 2 mode:
 
  export OOO_FORCE_DESKTOP="gnome"
 
  export OOO_FORCE_DESKTOP="gnome"
  
That'll make IBus work with LibreOffice, and you can start LibreOffice from anywhere -- not just the terminal.
+
That will make IBus work with LibreOffice, and you can start LibreOffice from anywhere, not just the terminal.
 +
 
 +
=== Non US keyboards ===
 +
 
 +
{{Accuracy|Undone on package upgrades}}
 +
If [https://code.google.com/p/ibus/issues/detail?id=155 Ibus does not let you write in a given language], let's say Chinese, with a different keyboard layout other than US, then you need to tell it which one to use.
 +
 
 +
You need to change {{ic|/usr/share/ibus/component/<method_name>.xml}} and change the {{ic|<layout>}} tag to the expected keyboard layout.

Latest revision as of 11:07, 22 April 2016

Related articles

IBus (Intelligent Input Bus) is an input method framework, a system for entering foreign characters. IBus functions similarly to Fcitx, SCIM and UIM.

Installation

Install the ibus package from the official repositories.

Additionally, to enable IBus for Qt applications, install the ibus-qt library.

Input method engines

You will need at least one input method, corresponding to the language you wish to type. Available input methods include:

  • ibus-anthy - Japanese IME, based on anthy.
  • ibus-pinyin - Intelligent Chinese Phonetic IME for Hanyu pinyin and Zhuyin (Bopomofo) users. Designed by IBus main author and has many advance features such as English spell checking. Package currently not maintained and partly broken with latest ibus base. Use ibus-libpinyin instead.
  • ibus-rime - Powerful and smart Chinese input method for Chinese (pinyin, zhuyin, with or without tones, double pinyin, Jyutping, Wugniu, Cangjie5 and Wubi 86).
  • ibus-chewing - Intelligent Chinese Phonetic IME for Zhuyin (Bopomofo) users, based on libchewing.
  • ibus-hangul - Korean IME, based on libhangul.
  • ibus-unikey - IME for typing Vietnamese characters.
  • ibus-table - IME that accommodates table-based IMs.
  • ibus-m17n - M17n IME which allows input of many languages using the input methods from m17n-db.
  • ibus-mozcAUR - Japanese IME, based on Mozc.
  • ibus-kkc - Japanese IME, based on libkkc.

To see all available input methods:

$ pacman -Ss ^ibus-*

Others packages are also available in the AUR.

Initial setup

Now, run $ ibus-setup (as the user who will use IBus). It will start the daemon and give you this message:

IBus has been started! If you cannot use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
Note:
  • Although IBus uses a daemon, it is not the sort of daemon managed by systemd: it runs as an ordinary user and will be started for you when you login.
  • If, however, IBus is not autostarted upon login, then move the “export …” lines above to either
    • $HOME/.xprofile instead and append this line to the same file: ibus-daemon -drx, or
    • $HOME/.xinitrc and append this line to the same file: ibus-daemon -drx.
Which works best, depends on your Window manager, see also xprofile and xinitrc.
  • You can also try adding ibus-daemon -drx after the export ... lines in $HOME/.bashrc.

You will then see a configuration screen; you can access this screen whenever IBus is running by right-clicking the icon in the system tray and choosing Preferences. See Configuration.

If IBus does not work in Qt/KDE applications, ensure that the ibus-qt library is installed and define IBus as the default IME in the Qt configuration editor:

$ qtconfig-qt4

In Interface > Default Input Method, select ibus instead of xim.

GNOME

GNOME includes IBus by default, so you should only need to install the package specific to your language. To enable input in your language, add it to the Input Sources section of the Region & Language settings. After you add your input sources (at least 2), GNOME will show the input switcher icon in the tray. If you do not find your appropriate input source when trying to add your input sources, most likely you have not done locale-gen for that locale. The default keyboard shortcut to switch to the next input method in GNOME is Super+space; disregard the next input method shortcut set in ibus-setup.

Configuration

IBus

Note: You need to have east Asian fonts installed if you want to enter Chinese, Japanese, Korean or Vietnamese characters.

The default General settings should be fine, but go to Input Methods and select your input method(s) in the drop down box, then press Add. You can use multiple input methods if you wish. Once IBus is set up, you can press Super+space to use it (multiple times to cycle through available input methods). IBus will remember which input method you are using in each window, so you will have to reactivate it for each new window. You can override this behavior by right clicking the system tray icon, selecting Preferences, and going to the Advanced tab.

Note: By default, IBus overrides your Xmodmap setting. You can disable this feature by enabling "Use system keyboard layout" option in Preference -> Advanced.

Ibus-rime

If you have decided to use the great ibus-rime IME, check out Rime IME for some help to configure it.

Entering Special Characters—The Compose Input Method

To type special characters, XKB supports compose key sequences. To fulfil this function, IBus supports an input method that is permanently in Compose mode. Instead of hitting a compose key, then typing out the compose sequence, the user switches to the Compose input method (by default using super-space (a.k.a. win-space)), types the compose sequence, then switches back to the previous method. In Archlinux, the Compose input method is not installed by default. To use it, install ibus-table-othersAUR[broken link: archived in aur-mirror] from the AUR, restart IBus, then look for it in the list of input methods under 'other' at the bottom.

Tips and tricks

Pinyin usage

When using ibus-pinyin,

  • First type the pinyin (sans tones) for the characters you wish to enter.
  • Press Up and Down repeatedly to select a character (going on to the next page if necessary).
  • Press Space to use a character.
  • You can also use PageUp or PageDown to scroll pages, and use the number keys 1-5 to select the character you need.
  • You can enter multiple characters that form a word or phrase at a time (such as "zhongwen" to enter "中文"). ibus-pinyin will remember which characters you type most frequently and over time make suggestions that are more tuned to your typing profile.

Troubleshooting

Plasma 5

Plasma 5 applications may not accept Japanese (i.e. non-"direct input") text from Mozc using IBus. In order to resolve this problem add

export QT_IM_MODULE=ibus

to ~/.xprofile and restart your X user session.

Kimpanel

IBus main interface is currently only available in GTK+, but Kimpanel provides a native Qt/KDE input interface. Kimpanel is bundled with Plasma 5, but IBus needs to be launched as following to be able to communicate with the panel

$ ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel

To get a menu entry for launching ibus this way, save the following file to ~/.local/share/applications/ibus-kimpanel.desktop:

[Desktop Entry]
Encoding=UTF-8
Name=IBus (KIMPanel)
GenericName=Input Method Framework
Comment=Start IBus Input Method Framework
Exec=ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel
Icon=ibus
Terminal=false
Type=Application
Categories=System;Utility;
X-GNOME-Autostart-Phase=Applications
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=true
X-KDE-autostart-after=panel

Then you can either let KDE autostart ibus, or set it as the input method application in Kimpanel, and manually click on the kimpanel icon to start it. In either case, choose Utility/Ibus (Kimpanel) in the Choose Application dialog.

Finally, add the input panel widget to show the panel.

rxvt-unicode

If anyone has any issues with IBus and rxvt-unicode, the following steps should solve it.

Add the following to your ~/.Xresources (possibly not required, first try without):

URxvt.inputMethod: ibus
URxvt.preeditType: OverTheSpot

And start IBus with:

$ ibus-daemon --xim

If you start ibus-daemon automatically (e.g. in ~/.xinitrc or ~/.xsession) but used to use ibus-daemon & without the --xim option, make sure to kill the existing process before testing the new command.

GTK+ applications

Some users have had problems using Input Methods with GTK applications, because it seems that the gtk.immodules file cannot be found. Adding:

export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules

for GTK+ 2, or:

export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache

for GTK+ 3, in addition to the three lines above in your $HOME/.bashrc seems to fix the problem.

Note: If you set it to GTK+ 2, then you cannot use GTK+ 3 applications like gedit, if you set it to GTK+ 3, then you cannot use GTK+ 2 applications like Xfce.

Chinese input

If you encounter problems when using Chinese input, check your locale setting. For example in Hong Kong, export LANG=zh_HK.utf8.

Note: There are large revisions after IBus 1.4, you might not be able to input Chinese words with ibus-pinyin or ibus-sunpinyin, which are written in C. So the solution is to install ibus-libpinyin.

To start ibus with GNOME, add this in ~/.profile and restart the GNOME.

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -d -x

Chinese users can refer to this page for detailed solution concerning this bug.

LibreOffice

If IBus does load but does not see LibreOffice as an input window, add this line to ~/.bashrc:

export XMODIFIERS=@im=ibus

And then, you need to start ibus with --xim -d, for example, add this line to ~/.xinitrc:

ibus-daemon --xim -d

But the horrible thing is that you need to start LibreOffice in terminal.

If you are using KDE and the above does not work, install libreoffice-still and add this line to ~/.xprofile if you do not mind running LibreOffice in GTK+ 2 mode:

export OOO_FORCE_DESKTOP="gnome"

That will make IBus work with LibreOffice, and you can start LibreOffice from anywhere, not just the terminal.

Non US keyboards

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Undone on package upgrades (Discuss in Talk:IBus#)

If Ibus does not let you write in a given language, let's say Chinese, with a different keyboard layout other than US, then you need to tell it which one to use.

You need to change /usr/share/ibus/component/<method_name>.xml and change the <layout> tag to the expected keyboard layout.