Getting ibus to work for Tamil input

–\> I was trying to get tamil input to work on both my debian and arch
systems, since I wanted to use the tamil
lexicon
to look up
words. There are two ways of doing this.

  1. Use xkb layouts. xkb supports tamil input natively, but they keymaps
    are a little weird. I spent some time trying to figure out the
    keymap it was using, but wasn’t very successful. I’m guessing it’s
    using the Tamil 99 layout, that can be found
    here.
  2. Input methods. This is the more powerful way of doing things,
    especially because there are multiple tamil layouts available and
    it’s easy to switch between them. If you use xkb, you’d typically
    have to restart X to install new layouts.

There are a bunch of input methods

  • scim
  • ibus
  • nimf (korean, chinese)
  • dasom (korean)
  • fcitx (popular in taiwan)
  • uim (japanese)

Of these, the scim and ibus are the most well known, and work well with
the m17n library. They’re largely the same, but ibus is the default in
many desktop environments. This
guy
thinks that ibus’
interface is a little better. I think one can’t go wrong with either
one. I chose ibus.

Install the following packages

ibus-m17n, ibus-gtk, ibus-gtk3, ibus-qt4

There are ibus packages available for clutter too. For Arch Linux, I
followed their wiki.

You need to set a few environment variables:

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

On debian, it’s a bit easier since you first install the im-config
package and then run

im-config -n ibus

which will write an .xinputrc file. Debian has some dbus rules setup
that automatically set the GTK_IM_MODULE and other environment
variables. So it doesn’t appear to be necessary to insert the
environment variables into your .xinputrc. In any case, it doesn’t
seem to hurt whether you do it or not.

The Arch Wiki suggests inserting

ibus-daemon -drx

into my .xinputrc. This doesn’t work so well if you use a login or
display manager like lightdm. This is because the ibus daemon does not
like being started too early
. A symptom of this was that tamil input
worked inside my terminal emulator, but not inside firefox.

I use lightdm and i3, and what works for me is to insert
ibus-daemon -drx into my .i3/config file as

exec --no-startup-id ibus-daemon -drx

For other desktop environments like xfce or cinnamon, use the system
that allows you to specify ibus-daemon as a startup program.

I use phonetic tamil input and it’s absolutely amazing.

Remember to install tamil fonts! See this
page
.

Advertisements