How to type Pali Language in Ubuntu 12.04

Instructions how to prepare your computer to type Pali and how to use your keyboard to do so.

Step 1: 
Enable iBus

From Menu, System -> Administration -> Language Support Under "Keyboard input method system" choose ibus

Ubuntu enable iBus
Step 2: 
Create a new input method file for transliteration

Open the terminal and execute the following command to create a new file called sa-translit.mim

gksudo gedit /usr/share/m17n/sa-translit.mim

Copy and paste the following content into the file and save it, before closing:

;;; sa-translit.mim
;;;
;;; Input method for Sanskrit transliteration using the ITRANS scheme.

(input-method t sa-translit)

(title "sa-translit")

(map
(trans

("aa" "ā")
("AA" "Ā")
("ii" "ī")
("II" "Ī")
("uu" "ū")
("UU" "Ū")
(".r" "ṛ")
(".R" "Ṛ")
(".rr" "ṝ")
(".RR" "Ṝ")
(".l" "ḷ")
(".L" "Ḷ")
(".ll" "ḹ")
(".LL" "Ḹ")
(".M" "ṁ")
(".m" "ṃ")
(".h" "ḥ")
(".H" "Ḥ")
(";n" "ṅ")
(";N" "Ṅ")
("~n" "ñ")
("~N" "Ñ")
(".t" "ṭ")
(".T" "Ṭ")
(".d" "ḍ")
(".D" "Ḍ")
(".n" "ṇ")
(".N" "Ṇ")
(";s" "ś")
(";S" "Ś")
(".s" "ṣ")
(".S" "Ṣ")
))

(state
(init
(trans)))

Step 3: 
Add Sa-translit to IBus

Select System > Preferences > IBus Preferences from the Menu Choose the "Input method" tab, select the "Other" category and choose "sa-translit". Click " Add" and then "Close"

Add Sa-translit to IBus
Step 4: 
Typing Pali

If you want to type in Pali switch to "Other - sa-translit (m17n)" (keyboard sign, typically on top right) and use the following key combinations:

ITRANS Method

aa = ā
AA = Ā
ii = ī
II = Ī
uu = ū
UU = Ū
.r = ṛ
.R = Ṛ
.rr = ṝ
.RR = Ṝ
.l = ḷ
.L = Ḷ
.ll = ḹ
.LL = Ḹ
.M = ṁ
.m = ṃ
.h = ḥ
.H = Ḥ
;n = ṅ
;N = Ṅ
~n = ñ
~N = Ñ
.t = ṭ
.T = Ṭ
.d = ḍ
.D = Ḍ
.n = ṇ
.N = Ṇ
;s = ś
;S = Ś
.s = ṣ
.S = Ṣ

Typing Pali using sa-translit