Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hi, everyone. New to the forum and new to Debian. Can someone please tell me what to set to enable me to login to the command prompt and not start ...
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Posts
    1

    How to login without using X?

    Hi, everyone. New to the forum and new to Debian.

    Can someone please tell me what to set to enable me to login to the command prompt and not start X?

    I am running Debian Sarge, 2.6 kernel, booting with Grub.

    I thought that it was /etc/inittab but setting the runtime there isn't preventing X from starting.

    Any help is greatly appreciated!

    Thanks

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    There are several ways to do this,
    i presume you are using gdm, if not replace gdm by kdm in the answers.

    * take the x bit off -> chmod -x /etc/init.d/gdm
    * remove gdm -> apt-get --purge remove gdm
    * comment the gdm line in /etc/X11/default-display-manager

    option 1 and 3 are very usefull if you want to leave gdm on your system.
    with option 3 you will get a notice that gdm was unable to start (weird )
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  3. #3
    Linux Engineer
    Join Date
    Jan 2005
    Location
    Chicago (USA)
    Posts
    1,028
    su
    cd /etc/init.d
    mkdir ../init.d.backup
    ls (locate all display managers like kdm, gdm and xdm)
    mv kdm ../init.d.backup
    mv gdm ../init.d.backup........

  4. #4
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    You can append a 3 to the end of the line that says "kernel..." in your grub.conf file or when you boot up

  5. #5
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    You could use those methods, but an easier way would be to edit /etc/inittab You just need to change the section where it says default runlevel from 5 to 3.
    Code:
    # /etc/inittab: init(8) configuration.
    # $Id: inittab,v 1.9 2001/05/31 10:37:50 knopper Exp $
    
    # The default runlevel.
    id:5:initdefault:
    
    # Boot-time system configuration/initialization script.
    # This is run first except when booting in emergency (-b) mode.
    si::sysinit:/etc/init.d/rcS
    ...........## inittab continues on - trimmed for brevity
    So edit
    Code:
    id:5:initdefault
    to be
    Code:
    id:3:initdefault
    You will still have multi user functionality and full networking.

  6. #6
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110

    Re: How to login without using X?

    Quote Originally Posted by lilohatea
    I thought that it was /etc/inittab but setting the runtime there isn't preventing X from starting.
    Sorry I completely missed that. Did you edit it as above when you "modified the runtime" ? Ubuntu has the nasty habit of having x at all runlevels, but I see you're using Sarge. Can you post your /etc/inittab please.

  7. #7
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104
    What you really need to do is remove gdm (or kdm or xdm, which ever you use) from your start up sequence.

    you do so like this, as root:

    # update-rc.d -f gdm remove

    This is the correct way to this.
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

  8. #8
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104
    ...by the way, whn you want to start X afterwards you can do so,
    as root you can start gdm to log in like so:
    # gdm
    or
    # /etc/init.d/gdm start

    alternatively when logged in as any user you can just
    # startx

    to take you straight into your desktop environment.

    If you ever want to reenable gdm then:

    # update-rc.d gdm defaults
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

  9. #9
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Location
    Knee deep in Grand Rapids, Michigan
    Posts
    3,242
    Quote Originally Posted by bigtomrodney
    You could use those methods, but an easier way would be to edit /etc/inittab You just need to change the section where it says default runlevel from 5 to 3.
    Code:
    # /etc/inittab: init(8) configuration.
    # $Id: inittab,v 1.9 2001/05/31 10:37:50 knopper Exp $
    
    # The default runlevel.
    id:5:initdefault:
    
    # Boot-time system configuration/initialization script.
    # This is run first except when booting in emergency (-b) mode.
    si::sysinit:/etc/init.d/rcS
    ...........## inittab continues on - trimmed for brevity
    So edit
    Code:
    id:5:initdefault
    to be
    Code:
    id:3:initdefault
    You will still have multi user functionality and full networking.
    This would work on alny distro with the exception of Debian. I just tried this with my /etc/inittab in Debian Sarge.
    Code:
    id:3:initdefault:
    
    # Boot-time system configuration/initialization script.
    # This is run first except when booting in emergency (-b) mode.
    si::sysinit:/etc/init.d/rcS
    
    # What to do in single-user mode.
    ~~:S:wait:/sbin/sulogin
    
    # /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.
    As you can see, I am at level 3. But when I booted up, the Gnome Display manager came up, not CLI. Which should have come up.
    How to know if you are a geek.
    when you respond to "get a life!" with "what's the URL?"
    - Birger

    New users read The FAQ

  10. #10
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    That's mad! I have to know why now. Does anyone know what Debian does that's different in this regard?
    As you can see I was running Knoppix at the time, which is obviously Debian based. Though I admit I only pulled the file I did not make the change. If anyone has any more info on this I would be interested to know!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •