Can I disable Mac sleep mode even when lid is closed? Possible Duplicate:
  Is there any way to set a MacBook Pro to not sleep when you close the lid?  




I have a Macbook Pro (early 2011) with Mountain Lion installed. 

Is there a way to prevent my Mac from going to sleep even on lid close?
If you have an external monitor plugged in, it will happen automatically.

Otherwise, you can use InsomniaX.