Write Bengali (and other Indic languages) in debian squeeze

By
Joydeep Bakshi

24-APR-2010



The system on which this guide has been developed

This guide has been written using a debian squeeze box having icewm as the window manager.  This box has only 128 MB RAM and AMD DURON CPU. Also successfully tested within xfce4 in this same box. This guide should valid for KDE and GNOME also though not tested

How Linux supports multilingual input

Linux is armed with Intelligent Input Bus (IBus) now. This is an input method (IM) framework for multilingual input in *nix like operating systems. Having a bus like architecture it is called I"Bus"

IBus is developed in C and Python, thus avoiding the C++ ABI transition problem of SCIM

IBus component

Two major components of IBus are Input method engine (IME) and ibus-daemon. ibus-daemon provides a system tray configuration utility to select the Input method engine (IME) and then the language.

IBus uses D-Bus to communication between the ibus-daemon and clients (engines, panel, config tools)

Input method engine (IME) and library  required to support Bengali (and other Indic languages)

m17n or IBus-m17n is an IME for multiple languages and helps IBus to input many non-Latin characters from the keyboard  using m17n library.

m17n library is a multilingual text processing library for the C language

m17n database which has the keymap layout and used by m17 library

GTK+ client of ibus,  ibus-gtk is the GTK+ client of ibus, it provides a gtk-immodule for ibus
 
Required packages in debian to support Bengali (and other Indic languages)

[1] m17n IME package:        ibus-m17n

[2] m17n library package:    libm17n-0 - a multilingual text processing library - runtime
                                                m17n-lib-bin - a multilingual text processing library - utilities


[3 ] m17 database:                 m17n-db
This m17n database provides the following Bengali keyboard layout
[4] m17n database files contributed by the community and  used by m17n-lib:
        m17n-contrib
This package provides the following Bengali keyboard layout

[5] GTK+ client of ibus:        ibus-gtk

NOTE: ibus-qt4 - qt-immodule for ibus (QT4)

Installation

As root execute

#apt-get install ibus ibus-m17n m17n-db m17n-contrib ibus-gtk

required dependencies will be installed automatically by apt.
Confirm the system now have Bengali input method

#dpkg -L m17n-db | grep bn

/usr/share/m17n/icons/bn-itrans.png
/usr/share/m17n/icons/bn-unijoy.png
/usr/share/m17n/bn-itrans.mim
/usr/share/m17n/bn-unijoy.mim
/usr/share/m17n/bn.lnm

#dpkg -L m17n-contrib | grep bn

/usr/share/m17n/bn-inscript.mim
/usr/share/m17n/bn-probhat.mim
/usr/share/m17n/icons/bn-inscript.png
/usr/share/m17n/icons/bn-probhat.png

.mim file is the file whre the input method of the keymap layout of the concerened language is defined

Setup

I am using icewm Window manager and no Desktop manager at all. Your setup may differ. But the following should be valid for all. Tested with xfce4

Use any xterminal of your choice and execute

ibus-daemon -xdr

-d makes ibus-daemon actually run as a daemon.

-x starts the ibus xim server so that applications that only use xim can use it. You can skip this based on your aplication

-r this is important. It re-starts ibus. If you don't have this, ibus will work OK the first time you log in. However when you log out ibus might still be running unless you kill the instance or some other arrangement to do the same. When you log in again, "ibus-daemon -dx" will be called and  does nothing if it is already running. The problem is that the running version of ibus expects a different session (the one you logged out of) and as a result you won't see the IBus applet at systray. It's still usable in this state, but missing the applet where you can control/configure IBus.

Confirm that the daemon is running

#ps -e | grep ibus

18175 ? 00:00:01 ibus-daemon
18177 ? 00:00:00 ibus-gconf
18181 ? 00:00:00 ibus-x11
18183 ? 00:00:00 ibus-engine-m17

You can see the ibus applet at the system tray area. Right click on it --> preferences
If you can't get the system tray applet then execute equivalent command  ibus-setup

im        select         selected


more



So you are done now.

If you left-click on the applet you see "No Input window". Don't be panic. It is saying there is no application where IBus can write.

Testing

Open leafpad editor ; keeping the mouse there ( so that ibus can detect its input area )  press [ctrl]+[space]. This enables ( unless you change the key combination ) the IME.  You can see the system tray applet has been changed to indicate the selected Input Method.

systray

Enter some Bengali text now

example

How to auto start ibus-daemon

You can put "ibus-daemon -xrd" at the autostart section of your Desktop manager / window manager. It is .icewm/startup for icewm

or you can put it at .xinitrc

# avoid race condition
sleep 3
ibus-daemon -xrd

icewm-session



Special Thanks

Dipankar Das for his technical support

Feedback

Comments, corrections and suggestions are always welcome. email.gif

Copyright and License

Copyright©2010 by Joydeep Bakshi. This material may be distributed only subject to the terms and conditions set forth in the Open Content License, v1.0 or later (the latest version is presently available at opencontent.org ).

INDEX | HOME
Copyright© 2010, Joydeep Bakshi