Chop the onions finely and keep aside. You can keep the onions meant for cooking and garnishing separately.
Take a wide pan, add a tablespoon full of ghee, and then add two chopped onions.
Add salt and saute the onions with out sticking to the pan. You don't have to caramelize the onions, but make sure they have started to turn brown. Feel free to add a little more ghee if needed. Keep the sauteed onions aside.
Wash the rice in 3 to 4 waters and then soak in water for about 15 minutes. This will remove excess starch from the rice so that the stickiness will be reduced. After fifteen minutes, make sure you drain the water from the rice. Keep it aside.
Meanwhile gather all spices required for making the ghee rice and keep it aside in a bowl or plate, this will make your work easier.
Heat the rice pan, add 1 tablespoon of ghee and then immediately add all the spices to the ghee. Saute the spices in the ghee for a few seconds.
Add the rice to the same pan, add the ginger garlic paste and add two more tablespoons of ghee and then stir fry for two minutes. Make sure the rice is not changing color.
Add the sauteed onions also to the same pan, mix well and lightly fry for a few seconds so the rice, spices and onions will blend nicely with the ghee. Switch off the stove and keep the pan aside away from heat.
In another vessel, boil the water.
Add the boiled water to the pan with the rice onion mixture, mix well, and keep it back in the stove. Keep it in high heat till the mixture has started to boil.
Once the mixture of rice, spices, ghee, onion and water starts boiling, reduce the heat, close the pan and cook in low flame for about 10 to 12 minutes or until the rice is cooked and water is absorbed.
After the rice is cooked and all the water is absorbed, you can switch off the stove and remove the pan from the stove.
Stir the cooked ghee rice with a fork so that the rice will be fluffy and won't stick together.
It is best to repeat the above step once more after 15 minutes.
Keep the rice closed in a casserole so that it will remain hot.