http://www.siyabas.lk/sinhala_how_to_install.html#lin
1. Open terminal and log as root. To log as root in terminal type below command
sudo -i
2. After providing password for sudo user you can log as root. Then type below command in terminal
apt-get install ttf-sinhala-lklug ibus im-switch ibus-m17n m17n-db m17n-contrib language-pack-si-base
3. From your user account (i.e. not root) run:
rm -f ~/.xinput.d/* ; im-switch -z all_ALL -s ibus
4. Logout and login again. Environment variables need to be set/updated (NO NEED TO REBOOT)
5. From your user account (i.e. not root) select your keyboard layouts by running:
ibus-setup