1. Soak the rice for 30 mins in 1 1/2 cups water and soak the coconut for 30 mins in 2 cups water.
2. Drain the rice and set aside. Keep the water.
3. Blend the coconut with the water it was soaked in. Strain and reserve the coconut milk.
4. Heat butter in a skillet. Add the onions and saute until golden.
5. Add rice and fry a few minutes.
6. Add coconut milk and water from the rice. Bring to a boil.
7. Season with salt to taste and cardamom. Lower heat and simmer until the rice is cooked.