I take it you are at a tty and the xserver has crashed.
Log in as normal from the prompt and try sudo apt-get update
then sudo apt-get install -f. I just fixed a friend of my son's
laptop that was in a similar position last night. The culprit turned
out to be amarok in his case in the end I had to sudo apt-get remove
amarok and then run sudo apt-get update and sudo apt-get dist-upgrade
and everything was back to normal.