Boot without starting Gnome

Posted on 2006-05-14
Last Modified: 2012-06-27
How do I set my ubuntu server to boot without automatically starting Gnome?

I tried changing the runlevel in /etc/inittab from id:2:initdefault: to id:3:initdefault:, but that didn't work.

Question by:msibley
    LVL 19

    Expert Comment

    Do you mean that you don't wan the graphical login on boot but just want text?

    I'm not really sure whats up here, you shouldnt have gnome running at runlevel 2.

    If you type `runlevel` at the command prompt what do you get?

    stupid question....did you reboot?

    LVL 20

    Expert Comment

    Make sure when editing    /etc/inittab   file  you're doing that as root and also make sure to press <ENTER> key right after  initdefault:  ( line break) so the line has terminated properly.
    # Default runlevel. (Do not set to 0 or 6 !)

    good luck'
    LVL 20

    Expert Comment

    Linux runlevels :

    # 0 = halt
    # 1 = single user mode : minimum HW
    # 2 = multiuser text desktop : network
    # 3 = multiuser text server  : network, servers
    # 4 = multiuser GUI desktop  : network, X-window
    # 5 = multiuser GUI server   : network, servers, X-window
    # 6 = reboot

    LVL 19

    Expert Comment

    nedvis: I thought the question was asking how to boot WITHOUT starting gnome, surely a graphical boot will boot with gnome...

    That is of course if it's what msiblev wanted, or perhaps he wants KDE instead! :-)

    Author Comment

    Yep, I rebooted.

    "runlevel" returns "N 3"

    Doesn't make sense to me.  Is something else starting the desktop?

    I want the default boot up to go directly to the command line.  Then I can start the desktop from there, because I will only use it occasionally.

    Below is the inittab file


    # /etc/inittab: init(8) configuration.
    # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

    # The default runlevel.

    # Boot-time system configuration/initialization script.
    # This is run first except when booting in emergency (-b) mode.

    # What to do in single-user mode.

    # /etc/init.d executes the S and K scripts upon change
    # of runlevel.
    # Runlevel 0 is halt.
    # Runlevel 1 is single-user.
    # Runlevels 2-5 are multi-user.
    # Runlevel 6 is reboot.

    l0:0:wait:/etc/init.d/rc 0
    l1:1:wait:/etc/init.d/rc 1
    l2:2:wait:/etc/init.d/rc 2
    l3:3:wait:/etc/init.d/rc 3
    l4:4:wait:/etc/init.d/rc 4
    l5:5:wait:/etc/init.d/rc 5
    l6:6:wait:/etc/init.d/rc 6
    # Normally not reached, but fallthrough in case of emergency.

    # What to do when CTRL-ALT-DEL is pressed.
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    # Action on special keypress (ALT-UpArrow).
    #kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

    # What to do when the power fails/returns.
    pf::powerwait:/etc/init.d/powerfail start
    pn::powerfailnow:/etc/init.d/powerfail now
    po::powerokwait:/etc/init.d/powerfail stop

    # /sbin/getty invocations for the runlevels.
    # The "id" field MUST be the same as the last
    # characters of the device (after "tty").
    # Format:
    #  <id>:<runlevels>:<action>:<process>
    # Note that on most Debian systems tty7 is used by the X Window System,
    # so if you want to add more getty's go ahead but skip tty7 if you run X.
    1:2345:respawn:/sbin/getty 38400 tty1
    2:23:respawn:/sbin/getty 38400 tty2
    3:23:respawn:/sbin/getty 38400 tty3
    4:23:respawn:/sbin/getty 38400 tty4
    5:23:respawn:/sbin/getty 38400 tty5
    6:23:respawn:/sbin/getty 38400 tty6

    # Example how to put a getty on a serial line (for a terminal)
    #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
    #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

    # Example how to put a getty on a modem line.
    #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3

    LVL 23

    Accepted Solution


    is what you want.

    But by default  Ubuntu   has an annoying configuration, with gdm active in all runlevels.

    As root, run:

    update-rc.d -f gdm remove

    To turn gdm off on all runlevels.

    And should you ever want to turn it back on at boot....

    update-rc.d -f gdm defaults
    LVL 23

    Expert Comment

    Correction, there's no reason to change
     the initdefault from   id:2:initdefault        to id:3:initdefault

    On  Debian-based distributions; 2 is ordinarily the default runlevel.
    You might as well change that back to 2, as IMO, it could only lead to
    future complications.

    Runlevels 4 and 5 as described above are really Redhat runlevels, not Linux runlevels.
    The fact you think they're Linux runlevels, really just shows how influential the
    conventions taken by just a distribution and its descendants can be.

    On  Redhat, runlevel 4  means enable network and graphics, and level 5 means
    run everything; however, both of these are really customized runlevels, for use
    and customization by specific distributions.

    For what it's worth; I would prefer every distribution use the same set of runlevels, for the
    sake of consistency, but they don't.

    Author Comment

    Mysidia, that did the trick.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now