Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I've installed Ubuntu Server. I'd like to add the GUI with ubuntu-desktop package, but if I do that can I still get the no-gui server interface as the default? What I basically need is the no-gui and the ability to start a gui when needed. Possible?

share|improve this question
On the GDM login screen of 11.04 and earlier, I think there was an xterm session option that would just give you a command line. Alternatively, you may be able to reach something from a recovery option in GRUB, though you probably wouldn't be able to set it as a default that way. – WarriorIng64 Nov 14 '11 at 7:31
you can also watch this post askubuntu.com/questions/2093/… – hhlp Nov 14 '11 at 18:04

marked as duplicate by Jorge Castro, Eric Carvalho, Luis Alvarado Apr 12 at 4:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

up vote 20 down vote accepted

Installing the GUI will probably cause it to start automatically, but it's very easy to boot to text mode in Ubuntu. Just open /etc/default/grub as root and add text to the

GRUB_CMDLINE_LINUX_DEFAULT=

line. Then run:

sudo update-grub

Your system will then always boot to text mode.

If you want to boot to the GUI, just press e in the boot menu and remove text from the kernel line.

If you want to start the GUI after boot, just run:

sudo /etc/init.d/lightdm start

Hope this helps :)

share|improve this answer
ubuntu 11.10 doesn't use gdm as defult login manager – hhlp Nov 14 '11 at 15:44
also watch this -> askubuntu.com/questions/70188/how-do-i-boot-into-console-mode – hhlp Nov 14 '11 at 15:46
2  
@hhlp: Fixed. With the latest Lightdm update, the upstart job respects the text kernel cmdline. – Xiao-Long Chen Nov 14 '11 at 17:13
Is this valid for 12.04 ? – AshRj Feb 27 at 12:42
1  
@AshRj: Yes, it's valid for all versions of Ubuntu using upstart :) – Xiao-Long Chen Feb 27 at 18:42

I did following

Step 1 First update your repository by running

sudo apt-get update

Step 2 There is some bug in old version of lightdm, so we need to upgrade the same. To do so run,

sudo apt-get install lightdm

Step 3 Now we have to modify grub config. Step 3a Open /etc/default/grub with your faviourite editor and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Step 3b Also comment GRUB_HIDDEN_TIMEOUT=0 This line is for unhiding the GRUB menu

Step 4 Now we will upgrade GRUB configuration

sudo update-grub

Step 5 Ubuntu 11.10 Desktop edition use lightdm for GUI. We need to disable the same

sudo update-rc.d -f lightdm remove

Step 6 Now restart your machine.

Found at Disable GUI Boot in Ubuntu 11.10

share|improve this answer

When you install Ubuntu-desktop, it will automatically set lightdm to start with the system. You will have to disable this (probably by editing /etc/rc.local) and use startx to run the graphical interface when you need it.

share|improve this answer

I think it's possible. I've not tried on Ubuntu but on Arch Linux or Gentoo works.

Not letting LightDM or GDM/KDM starting right after booting will help. You'll start with a command line login screen.

share|improve this answer
This answer would be much improved by explaining how to achieve "not letting LightDM or GDM/KDM start" when the system starts up. For example, do you recommend accomplishing this by renaming startup scripts? (If so, you could explain exactly how to do that.) I recommend editing this question to expand it in this way. – Eliah Kagan Jul 19 '12 at 5:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.