Enabling Unicode Sinhala in GNU/Linux

UPDATE on 2022.12.29 : This method no longer works. This page has been archived. Please see this page for current information on Sinhala input support for Sinhala in GNU/Linux distributions.

This post shows how to enable Unicode Sinhala support in Trisquel GNU/Linux with SCIM (Smart Common Input Method platform). The same steps should work with Ubuntu, Linux Mint or any other Ubuntu-based distribution. 1) Open a terminal. Then type the following command and hit ENTER (you can simply copy-paste what I have written below):

sudo apt-get install fonts-lklug-sinhala scim scim-gtk-immodule im-switch scim-m17n m17n-db m17n-contrib language-pack-si-base

You will be asked to enter your password, type it and hit ENTER. The password will not be visible you when you type it in the terminal; so don't panic if you don't see any indicator when you type. It will now install all the packages you need when writing and reading Unicode Sinhala. Wait until the installation process is complete.

2) Then type (or copy-paste) the following command into the terminal and hit ENTER:

rm -f ~/.xinput.d/* ; im-switch -z all_ALL -s scim-immodule

3) Log out and log in. There is no need to restart.

4) Configure how to switch to Sinhala: You will now see a new icon on your task bar. Right click on it and open SCIM setup. In the FrontEnd > Global Setup section you can select a key combination to switch between English and Sinhala or to trigger different input methods. In IMEngine > Global setup section you can select Sinhala and disable all the other languages if you prefer. When it comes to typing Sinhala, personal preference is si-wijesekara. But there are several other input methods you can select. This is entirely up to each user's preference.

DISCLAIMER: Sinhala enabling instructions for GNU/Linux on siyabas.lk website are not up-to-date. Some of the packages they mention are no longer available it seems. Even when I managed to find the missing packages and get ibus installed, I didn't find the experience satisfactory. Last time I checked, there was an ugly "highlighted spot" right next to the cursor; the character that is being typed at any given moment appeared to be "selected" or "highlighted". It was extremely disturbing when I had to spend long hours writing or editing texts. After several attempts in resolving this issue, I decided to use SCIM, an older and more user-friendly input method platform to type Sinhala. Several of my friends encountered these problems when they attempted installing Sinhala. So I started recommending the above steps to everyone. I am posting it here for my own convenience.