Cook the mustard seeds over medium-high heat. After they start spluttering, turn the heat down to medium, then add the curry leaves and asafetida (hing) if using.
Cook the onions until softened, then add the green chili, desiccated coconut (if using fresh coconut, add at the end), turmeric, cumin, and ground Kashmiri chili. Stir for several minutes, adding more oil or water in 1 T increments, if needed.
Cook the cabbage over low heat with 1/4 tsp salt; stir for a 1 minute, then cover. Stirring occasionally, cook for 7 to 10 minutes until wilted but still with some texture. Remove the lid and sauté until any moisture drys off. Add the coconut now, if using fresh coconut, and cook for a minute to heat through.
Serve with steamed rice or as a perfect side to any curry.
One of the tricks of this dish is to not overcook the cabbage.
Shortcut: If I had an Indian Aunty they would be horrified at the suggestion, but I am going to go there anyway: if you want to buy shredded cabbage, go for it. It won't be uniformly shredded or as thin as you might cut it. Resulting in a variety of textures you may find pleasing.
If using fresh coconut, add it at the end. Desiccated coconut needs the benefit of a longer cook time.
Feel free to make this cabbage stir-fry spicier by adding more dried red chili and/or green chiles.
If you are avoiding onions, add another good pinch of asafetida with the curry leaves.