Okay, I have done something strange which prevents my RPi from entering a graphical environment. I was messing around with my Gertboard and was in the process of configuring the ATMEGA 328P microcontroller, and I accidentally deleted the /tmp folder on my RPi, and I rebooted it and didn't notice because I was using SSH, but now when I try to start the Arduino IDE I notice my GUI cannot be instantiated.
Neither can I use the startx command, here is the log.
Maybe it was related to me trying to connect to my desktop with SSH via Cygwin, but it also failed when I tried doing that.
What is the cause of this, and what is a solution without re installing the OS?