I have spent the day installing and setting up my Pi the way I wanted it. I am running Raspbian and have setup apache2, PHP and mySQL so that I can use it as a web server to test the web applications I am working on in my Uni course. This afternoon I also installed XBMC. This was working just fine, the keyboard and mouse was working in XMBC and I was able to stream a video from my NAS, until I selected Exit from the XBMC menu and was left with a black screen that stayed. After half an hour the black screen was still there and remote logging in via ssh I could see that there were 4 xbmc.bin processes running and consuming lots of CPU. At this point I forced a reboot.
After the reboot my desktop came back and everything else appeared to be working fine.
I was about to shutdown but decided to select logout instead. This brought up a login screen with an option menu to select environment to login. I noticed that XBMC was a new option at the login screen so I thought I would try that. Initially I was excited to see that this logged me in straight to XBMC. My excitement was short lived when I discovered that my keyboard and mouse no longer worked. I had to remote login via ssh to shut the system down.
Now whenever I boot my Pi it boots straight into XBMC.
Can someone please tell me how I get my desktop back (i.e. boot to the desktop and not XBMC)?
Also, once I start XBMC from the desktop is there a way to exit it normally?