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?

link|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
feedback

4 Answers

up vote 11 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 :)

link|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. – Chen Xiao-Long Nov 14 '11 at 17:13
feedback

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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