From ArchWiki

Some other stuff

This wiki is great, but was insufficient in my case:

Fresh install: (uname -a) Linux portable-schrek 2.6.38-ARCH #1 SMP PREEMPT Tue Jun 7 06:40:04 UTC 2011 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux

XFCE 4.8.0

(pacman -Q ibus) ibus 1.3.9-3

and no gnome at all installed (nor gdm, I use slim instead).

All that was written didn't do it. I had to find an obscure comment from a user in a bug tracker somewhere to understand environment variables were missing. I found trace of this nowhere else, so I post here my ~/.bashrc as it is now (with Ibus working):

[matthieu@portable ~]$ cat ~/.bashrc

# Check for an interactive session
[ -z "$PS1" ] && return

alias ls='ls --color=auto'
alias ll='ls -lFh --color=auto'
alias emacs='mg'
PS1='[\u@\h \W]\$ '
export GDM_LANG=fr_FR.UTF-8
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
export LANGUAGE=fr_FR.UTF-8
export LC_CTYPE=fr_FR.UTF-8
export XMODIFIERS="@im=ibus" 
export XIM=ibus export XIM_ARGS="-d" 
export DEPENDS="ibus" 
export XIM_PROGRAM=/usr/bin/ibus-daemon 
export GTK_IM_MODULE=ibus 
export QT_IM_MODULE=ibus 

#export XMODIFIERS="@im=ibus"
#export GTK_IM_MODULE=ibus
#export QT_IM_MODULE=ibus
export GTK_IM_MODULE_FILE=~/.immodules

I Hope it helps... Have a nice day!

—This unsigned comment is by Matthieu S (talk) 08:53, 13 June 2011 (UTC). Please sign your posts with ~~~~!

IBus setup for Libre Office in KDE Plasma desktop environment

If the configurations in wiki page don't work on KDE, add these following lines to ~/.xprofile . It also makes ibus functional in Libre Office. (this is the perfect workaround for ibus-avro)

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

Tzihad (talk) 16:33, 22 February 2021 (UTC)

'ibus-daemon -d' does not work with libreoffice writer

[jpli@balance ~]$ uname -a

Linux balance 3.0-ARCH #1 SMP PREEMPT Sat Aug 6 16:18:35 CEST 2011 x86_64 AMD Phenom(tm) 9150e Quad-Core Processor AuthenticAMD GNU/Linux

I chose fvwm and slim as my window manager and display manager, no specific desktop environment installed.

My ibus "suite", no other input method installed:

[jpli@balance ~]$ pacman -Qs ibus

local/ibus 1.3.9-3
    Next Generation Input Bus for Linux.
local/ibus-pinyin 1.3.11-2
    The PinYin Engine for IBus Input Framework.
local/ibus-sunpinyin 2.0.3-1
    The SunPinYin Engine for IBus Input Framework. SunPinYin is a Statistical Language Model based pinyin IME by Sun.

I setup ibus in ~/.xinitrc, thought I need not use the extra "--xim" option: [jpli@balance ~]$ cat ~/.xinitrc

# ~/.xinitrc
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  unset f

export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules
ibus-daemon -d

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session fvwm

In ~/.bashrc:

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

Then I found out no Chinese input method can be brought up with Ctrl + space in libreoffice writer When I killed all the ibus processes and restarted ibus using "ibus-daemon --xim -d", the problem was solved.

I suggest to add this "--xim option issue" to wiki once it gets conformed

—This unsigned comment is by Lijpbasin (talk) 15:19, 9 August 2011 (UTC). Please sign your posts with ~~~~!

Input Sources and Gnome 3.5+

On Gnome 3.6, I was able to install ibus with limited success, but I was unable to get the IME to reliably turn on. The issue might have to do with the integrating of Ibus into recent versions of Gnome ( Part of this integration has a grand vision that adding input methods (or "input sources") is no different than adding keyboard layouts, and that it will be easy and intuitive. Of course, the current implementation falls short of this goal. I got Japanese input working by adding "Japanese (anthy)" as a keyboard, but it also defaulted to a Japanese keyboard layout (so Shift-2 is ", not @, etc.), but one can choose another layout in Anthy's configuration menu. Chinese input was less successful, as there is no compatible modules for the Rime IME, but there may be for other Chinese IMEs. There is an added benefit that adding IMEs this way includes an indicator applet in the gnome-shell panel, whereas I saw none when using ibus without adding the input-source.

Goodmami (talk) 07:21, 1 March 2013 (UTC)

Using it working with XFCE

It work with XFCE, with the following line in both .xprofile and at the end of .bashrc (need to figure out which one is not necessary):

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

Need to restart the session after setting this.

—This unsigned comment is by Popolon (talk) 14:28, 14 June 2019 (UTC). Please sign your posts with ~~~~!

Launching and configuration in Wayland

Hello, under wayland on plasma, the whole .xinitrc and .profile stuff doesn't work. Even when the daemon is started and .bashrc modified with the IM configured as ibus, the applications won't use ibus. Is it supposed to work on wayland? Is it worth mentioning it in this wiki? Thanks

-- Ivanoff 13:08, 5 July 2019‎ (UTC)

I got ibus working on wayland + plasma with following snippet:
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
The result:
  • Super+space to switch IME does not work. Need to click IME icon on tray to switch
  • Text selection window position is weird. Seems ibus cannot find where the text box is
  • Rime and mozc works
  • Firefox with wayland environment variable, telegram desktop and vscode (xwayland application) works. Intellij and alacritty does not. But neither one of them works in X anyway
I would say ibus is at least usable under wayland plasma. Maybe we should add that to the wiki page.
-- Holi0317 (talk) 07:44, 19 November 2020 (UTC)

General Page Overhaul

As part of a personal, COVID19-fueled initiative to try and overhaul the Arch Wiki's pages that have to do with localization, I have just edited this IBus page somewhat extensively, in order to fix the IMHO many mistakes and omissions currently present in its content. Some of the radical changes I've done so far (besides generally overhauling the content):

1) Contrary to what has previously been reported, I have tested Firefox, Chromium, Libreoffice and other supposedly problematic applications in both GTK-based (GNOME & Xfce) and Qt-based (KDE) environments, and I have not found any issue with the default set of variables as documented by upstream IBus.

2) I have also tested and found that exporting these variables through /etc/environment or ~/.bashrc is enough, and there is no need for specifically exporting them through ~/.xinitrc, ~./xprofile or whatever else. These files are valid choices, of course, but there is no need to specifically mention them and unnecessarily complicate things.

3) I have chosen /etc/environment as the one file to mention in the main page, because exporting the variables there makes things work across the system, no matter which user logs in, and no matter if it logs in at all or if it starts in a non-login way. This solves any issues with e.g. Wine right out of the box. Disclaimer: I've been using IBus this way for a long time (and Fcitx before that) and I've always been able to enter CJK text in Windows apps.

4) I have removed the small subsection about GNOME in the installation section, because I believe that IBus not autostarting under GNOME means there is something wrong with either the system configuration or with GNOME itself (i.e. a bug). Unless I'm extremely mistaken, there should never be a need to explicitly set IBus to autostart under GNOME. The rest of the subsection has been removed as well because its content describes IBus functionality and thus will fit better in the later sections of this wiki page.

5) I have removed the info about running IBus with ibus-daemon -drx --panel /usr/lib/ibus/ibus-ui-gtk3, because I'm almost certain that the gtk3 panel is the default if the --panel option is not used. But feel free to correct me if I'm wrong.

If there are any real issues that I may have missed or overlooked, please report them here so we can properly investigate them and if needed re-add them to the main page.

Thanks for reading!

-- Nocifer (talk) 00:06, 7 December 2020 (UTC)

Second round of changes includes the following:
1) Removed subsection in "Tips and Tricks" about ibus-pinyin usage. I think generic instructions how to use an IME don't really belong on this page, especially when it's only done for a limited subset of them (i.e. only the one in this case), and even if they were included they certainly shouldn't be considered as "tips and tricks". This section should IMHO be reserved only for describing either little-known built-in functionalities of IBus (like the emoji/unicode input support), tips for better integration (like the subsection about changing the tray icon color or the layout switcher delay) or weird quirks in the usage of specific IMEs that are buit-in or part of the IBus upstream project (e.g. how to make broken shortcuts to work and stuff like that).
2) In section "Troubleshooting" I removed:
  • Plasma 5 (because the information is just a needless rehash of what has already been covered in the "Configuration" section)
  • Kimpanel (for the same reason)
  • GTK applications (seems more like a remnant of the past, especially with the mention of GTK2 on equal terms with GKT3; and anyway, Xfce has finally been upgraded to GTK3 since last year or so, so let's let GTK2 to R.I.P.; but if I'm wrong and there are cases where users really do encounter these kinds of issues, I'll stand corrected and re-add this subsection)
  • Chinese input (again, the information is redundant and also locale settings are universal and so belong to a dedicated section/page, not scattered around in subsections; also, I especially loved the description of trying to type in Chinese without having enabled a Chinese locale as a "bug" - that's exactly why we need good wiki articles for l10n/i18n)
  • LibreOffice (again, the information is redundant and LibreOffice has no issue at all with IMFs)
  • Non US keyboards (the bug report this subsection was based on dates from 2008 (!) and also, IMEs not supporting text composition with non-English characters is a universal "bug", i.e. an expected behaviour)
  • Use xinitrc to export (Starting a subsection with "If you still cannot get it to work..." reads like someone was really frustrated that their system was stubbornly refusing to work even though they'd followed all the instructions to a T, and so decided to throw in their 2 cents in case they could help the next lost soul that would surely come wandering at some point; a kind touch, but ultimatelly unneeded :P)
  • Rescue from an iBus crash (if IBus is crashing you should be reporting it upstream, not writing instructions on the Arch wiki for how to manually relaunch an application that has crashed)
  • WINE (because yet again, the information is redundant)
3) Merged the remaining stuff of "Troubleshooting" into "Tips and tricks" and removed "Troubleshooting".
-- Nocifer (talk) 17:29, 7 December 2020 (UTC)
Integration->Tip: KDE appears to cause shortcut problems.
While tip works quite well, after loading ibus there seems to be no way to use keyboard shortcuts.
  • Ibus preference set keyboard shortcuts don't seem to register in kde when using this method.
  • Kimpanel widget has a shortcut in the config, but it doesn't seem to register in kde.
    • shortcut is supposed to have same effect as clicking on the icon, but that just displays list of inputs to choose, not switching input.
  • Couldn't find a way to set it up using system settings->shortcuts configuration, maybe dbus calls ? no idea.
  • just launching ibus daemon, skipping kimpanel seems to get rid of all this problem (at the cost of integration and having a widget in one place)
Ashton (talk) 14:44, 19 April 2021 (UTC)
I've removed the Firejail section you had flagged, since no one answered you. --Erus Iluvatar (talk) 08:36, 20 February 2022 (UTC)

IBus and Qt applications under GNOME 40

Although IBus is integrated in GNOME 40, sometimes it does not work with Qt applications such as WPS Office and Zoom. The problem is that in order to get ibus working correctly, you have to pass --xim to the ibus-daemon call (I don't really know why, but it is stated in the wiki page at the moment I'm writing this). We don't really know what parameters does GNOME pass to ibus-daemon, so the solution is to "overwrite" GNOME's ibus initialization command by creating ~/.config/autostart/ibus.desktop with the following content:

[Desktop Entry]
Exec=ibus-daemon -drx

This is useful when one uses GDM to start GNOME, or is using Wayland (and thus placing commands in ~/.xinitrc generally does not help). Also don't forget to set the environment variables as mentioned in the wiki page.

The above configuration works perfectly with ibus-bamboo and ibus-mozc.

--Hiraki01 (talk) 04:47, 2 October 2021 (UTC)