In a medium saute pan, combine red lentils, 2 cups water, half of the chopped onion, green chilies and turmeric. Bring the mixture to a boil. Lower the heat and simmer until the lentils are tender, but not mushy. Drain the lentils, if needed.
Heat oil in a pan, add mustard seeds and cumin seeds; once the seeds start to splutter, add curry leaves and the remaining chopped onions. Cook till the onions are translucent.
Add the cooked dal, red chili powder, salt and grated coconut. Mix well and cook for 3~4 minutes. Serve hot with rice or bread.