Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.

link|improve this question

68% accept rate
feedback

4 Answers

For 11.04 and previous versions

If you want to text mode:

Edit /etc/default/grub with your editor,

sudo gedit /etc/default/grub

Find out this line:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text”

Update Grub:

sudo update-grub

Note: Removing quiet splash will show the text then boot to the Desktop.Replacing quiet splash with text will leave you at a login prompt.To start a gnome session, use sudo /etc/init.d/gdm start or startx

To disable GDM:
Install bum Install bum

After installation it will be found under System>>Administration>>Bootup-Manager

Uncheck Gnome Display Manager alt text

link|improve this answer
The GRUB config worked. Out of curiosity, why would I want to disable GDM? – Olivier Lalonde Dec 6 '10 at 3:22
1  
because doing so would accomplish the same thing. – Roland Taylor Dec 6 '10 at 3:27
feedback

For Ubuntu 11.10

Edit /etc/default/grub with your favorite editor,

sudo nano /etc/default/grub

Find out this line:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT=”text”

Update Grub:

sudo update-grub

No need to remove / disable lightdm upstart conf, it already does that for you.

lightdm.conf

# Check kernel command-line for inhibitors, unless we are being called
        # manually
        for ARG in $(cat /proc/cmdline); do
            if [ "$ARG" = "text" ]; then
                plymouth quit || :
                stop
                exit 0
            fi
        done

You will still be able to use X by typing startx after you logged in.

link|improve this answer
feedback

You could use ubuntu server edition.

link|improve this answer
2  
Right, but it would be nice to know nonetheless :) – Olivier Lalonde Dec 6 '10 at 3:15
That doesn't really answer the question. Migrating to Ubuntu Server wouldn't be disabling X11 so much as it would be switching to a system that, by default, doesn't have it. Furthermore, if you install a GUI on Ubuntu Server (which is discouraged, but fully possible), for example by installing the package ubuntu-desktop, then X11 will typically (depending on how you installed it) start up automatically. So using Server doesn't always mean X11 doesn't start as part of the boot process. Generally, X11 will start if install and not reconfigured. – Eliah Kagan Nov 16 '11 at 2:42
Furthermore, if you goal is to have a system that is not a production server, but which doesn't have a GUI at all, then it is preferable to install a command-line only system from the minimal CD or alternate CD, as then you get the desktop kernel rather than the server kernel. (To do this, boot from one of those CD's, press F4 after selecting your language, and on the menu that pops up from the bottom of the screen, select the option to install a command-line only system; then select the option to install Ubuntu in the primary menu at the center of the screen.) – Eliah Kagan Nov 16 '11 at 2:44
With all that said, since Oliver Lalonde is using the system for server purposes, it might be preferable for other reasons to use Ubuntu Server, and either not have a GUI (which would likely be the best choice), or have one but have it disabled. You might want to edit your answer to reflect that, and to explain the reasons that would be preferable. – Eliah Kagan Nov 16 '11 at 2:46
2  
@EliahKagan relax. Honestly. – Roland Taylor Nov 16 '11 at 3:49
show 1 more comment
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 Now restart your machine.

Found at [Disable GUI Boot in Ubuntu 11.10][1]

link|improve this answer
According to lightdm.conf it is not necessary to remove lightdm. – Bruno Pereira Jan 12 at 20:18
if you did not remove it you will get GUI after doing all this. – Vidyadhar Jan 14 at 7:59
Sorry, just tested it in 11.10, this is not true, no need to remove lighdm, step 5 is not necessary. – Bruno Pereira Jan 14 at 8:56
Ok I have removed the 5th step regarding lightdm – Vidyadhar Jan 15 at 8:14
feedback

Your Answer

 
or
required, but never shown

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