Ubuntu 12.04 boots to TTY1

or try to use this command:

startx

I have had the same problem, and you can install the ubuntu again by typing.

 Sudo apt-get update
 Sudo apt-get install --reinstall ubuntu-desktop
 startx

And it should work.

EDIT: line 2 should install ubuntu-desktop (with a dash), not ubuntu desktop.


You could use this command to turn the Xserver back on.

sudo systemctl set-default graphical.target

Just for future problems.


I did this:

sudo apt-get update  
sudo apt-get install --reinstall ubuntu-desktop  
startx