Ubuntu – When I start Ubuntu it enters tty[1-6] instead of the desktop (How to get to desktop?)

gnomelampUbuntux-serverxampp

When I start Ubuntu it enters tty[1-6] instead of my desktop. Normally I could get back to the desktop by pressing Ctrl+Alt+F7 but that doesn't work.

I tried sudo apt-get install ubuntu-desktop but it fails.
I tried startx which started the x-server or x-window (not sure what it's called) but it just brought up a black screen with my mouse cursor. If I press printscreen, a dialog box would open up.

This is a fresh install of the latest version. It's dual booting with Windows 7 – but I doubt that matters. Before this happened, I installed lamp-server but realized it wasn't what I wanted. I then installed xampp and uninstalled lamp-server with sudo tasksel remove lamp-server. I restarted with sudo shutdown -r now because it would not shut down using the graphical interface.

I can't get back to my desktop. Any ideas how I can?

Best Answer

It sounds like you might have managed to uninstall your desktop environment. (Unless Karmic has replaced GDM, which I doubt.)

If you were using GNOME, you probably installed Karmic with the ubuntu-desktop. You'll want to reinstall that:

sudo apt-get install ubuntu-desktop

...or possibly

sudo apt-get --reinstall install ubuntu-desktop

That should pull in any missing packages. Once you've reinstalled, you should be able to run

sudo /etc/init.d/gdm restart

... and get back to the GDM login screen.

Related Question