91

I've installed Ubuntu 12.04 32-bit on my machine. But when I switch on the computer, I get command line:

Ubuntu 12.04 LTS COMP-1245 tty1

And it prompts for username and password. Once I provide my username and password, it authenticates login and then displays a link to documentation.

Now, how can I start GUI? I'm stuck at command line.

Kulfy
  • 17,416
  • 26
  • 64
  • 103
Sushan Ghimire
  • 1,035
  • 1
  • 8
  • 9

3 Answers3

103

If you tried the command startx, but the error command not found was returned, then to install a graphical desktop, in case it is not installed, you would type this:

sudo apt-get install ubuntu-desktop
Mitch
  • 106,657
  • 24
  • 210
  • 268
  • 1
    Thanks that did it. But why was it not installed while installing the OS itself? – Sushan Ghimire Jul 27 '12 at 08:59
  • 2
    @MrGhimire It should've been. Are you sure you didn't install with the minimal or server CD? You did say you used the desktop CD, but I don't see how that could've installed Ubuntu without gnome. – geirha Jul 27 '12 at 10:42
  • @MrGhimire The minimal CD has a menu that asks if you'd like to install extra packages. Among these are ubuntu-desktop, as well a couple other desktops. Select it and make sure to press space on it, then enter to continue. If you just press enter, it'll skip it. – JVE999 May 08 '14 at 02:04
  • 1
    (On my VMware player) Is said `ubuntu-desktop is already the newest version.` after reboot it is again opening in command line. – Zameer Ansari Jun 18 '15 at 08:49
31

Try to use startx in your tty , if it does not work on one terminal try Ctrl+Alt+F1 to F6 in order to switch a new tty

Kulfy
  • 17,416
  • 26
  • 64
  • 103
Malika Queen
  • 469
  • 3
  • 4
  • 1
    This brings up a background image, and if I right click I get a menu containing "New Folder" , "New Document" etc but nothing useful. I don't get any kind of usable desktop, no dock, not menu bar, nothing. – Michael Jun 18 '15 at 18:55
  • I get a Background Image, a green bird in Lubuntu 20_04. – Timo Nov 01 '20 at 17:13
9

I have had the same problem. The solution is to install X.org and the Ubuntu Desktop. Also, don't forget the build-essential packages:

sudo apt-get install ubuntu-desktop

You might have to install X.org separately, but also take advantage of this command line because (for my situation) Ubuntu kept trying to use my display port.

David
  • 3,317
  • 11
  • 34
  • 56
paxsonsa
  • 99
  • 3
  • 4
    Why is `build-essential` needed? It is a tool helping the compilation of programs. While it is, for a developer, useful to have installed - I don't see any compiling in the solution. Unless you want to *compile* `ubuntu-desktop`? –  Mar 20 '16 at 17:02
  • It's required for stuff like DKMS too – Suici Doga Dec 29 '17 at 14:53
  • @SuiciDoga: The DKMS package already depends on the necessary build tools. – David Foerster Jun 21 '18 at 13:48