Monday, July 8, 2019

How to Type Bangla with Unijoy Layout in Void Linux

Bangla Unijoy layout with ibus-m17n in Void Linux
I installed Void Linux, then GNOME, then m17n-db, but no Bengali entry for Unijoy! After hours of researching, finally, I got it to working. Let's see how...


Void is extremely light and small. I mean it does not have nano or wget by default kinda light! The default CLI install is just ~700mb. It does not have SystemD as its init system. Instead it has runit which is a simple and transparent init system that manages services running in the background. Besides that Void Linux has its own package builds. Which means it does not rely on binary builds from other projects, like Debian, Fedora etc.

I was looking to try a SystemD-free OS just to see how it works and feels for a change. It involves a bit of a learning curve at first, but it leads to a very lightweight and responsive system at the end. So enjoyable! It feels like I am using Linux on a computer from the 2000-ish era. Back then things used to be more responsive than it is now. It is also true even when using a bloat DE like GNOME. It runs faster than I've ever seen. How cool is that?

Writing Bangla in Linux

There are different Bengali/Bangla keyboard layouts out there for Linux. Even Android has Ridmik keyboard which my father loves a lot. On the desktop Linux though, I am a fan of the Unijoy layout made by Ekushey. There are other methods out there, but I like Unijoy better. It is just my personal preference.

To install Unijoy to use with ibus, you just have to install:
ibus (or ibus-gtk and optionally ibus-qt), m17n-db, ibus-m17n

The first 2 were present in the Void default repo (named "current"). But ibus-m17n was not there. So I had to compile the package manually then install in order to make it work.

Screenshots before the ibus-m17n install

Bengali language is not showing up on GNOME Settings Manager - Region & Language
Bengali language is not showing up on
GNOME Settings Manager - Region & Language
ibus-m17n languages are not showing up on GNOME Settings Manager - Region & Language
Other ibus-m17n languages are not also showing
up on GNOME Settings Manage

Bengali language is not showing up on ibus-setup either
Bengali language is not showing up on ibus-setup either



How to build and install ibus-m17n from source

To compile, build, install and apply changes I used these commands:

git clone --depth=1 https://github.com/ibus/ibus-m17n.git

sudo xbps-install gnome-common gettext-devel xz m17n-db m17n-lib ibus-devel m17n-lib-devel

cd ibus-m17n
autoreconf -fi
./configure --prefix=/usr --libexecdir=/usr/lib/ibus
make
sudo make install
ibus restart # not sure if this worked... probably not
ibus-daemon -xdr # not sure if there is a better way to restart the daemon
ibus-setup

Now on ibus-setup I saw Bengali - Unijoy (m17n) appearing without issues.
I think you can remove the m17n-lib, ibus-devel, m17n-lib-devel packages after the build process.

Screenshots after the ibus-m17n install

ibus-setup is showing Bengali entry
(which was not present there before)

Unijoy is also available in ibus-setup

GNOME Settings Manager is showing Unijoy layout

I was able to add it just fine

Tray is showing the Unijoy layout

There you have it! Your very own desktop with your favorite layout ready to use.


Ref:
https://github.com/ibus/ibus-m17n
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ibus-m17n

No comments:

Post a Comment