LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2004, 05:44 PM   #1
Beomoss
LQ Newbie
 
Registered: Sep 2004
Location: State College, PA, USA
Distribution: Fedora Core 3
Posts: 7

Rep: Reputation: 0
non-graphic login/command prompt


Hi,

I'm running Debian (woody) on an older laptop, and I was wondering if there were some way to set up my system to boot to a plain text shell login and command prompt rather than the graphical one that Gnome uses. My goal is to have the system boot directly to the shell, and be able to start the window manager/GUI from the command line as needed. Is this something that can be done? Thanks!
 
Old 09-20-2004, 05:46 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Code:
apt-get remove xdm kdm gdm
 
Old 09-20-2004, 05:48 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Sure thing.

Login as root and edit the /etc/inittab file. There is a line
id:5:initdefault:

Change the 5 to a 3. BTW these are called runlevels. Some distributions uses different numbers but there should be a comments preceding this line to indicate what each one means.

Last edited by michaelk; 09-20-2004 at 05:50 PM.
 
Old 09-21-2004, 05:02 PM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Debian uses runlevel 2 as it's default and runlevels 2-5 are identical in their configuration by default.
Changing runlevel from 5->3 applies to other distributions, though.

Other way (other than removing them altogether) to prevent display managers to start automaticly:
edit file /etc/X11/default-display-manager and set contents of it eg. to "/bin/false"
 
Old 09-21-2004, 07:36 PM   #5
Beomoss
LQ Newbie
 
Registered: Sep 2004
Location: State College, PA, USA
Distribution: Fedora Core 3
Posts: 7

Original Poster
Rep: Reputation: 0
I edited /etc/inittab, but it didn't change anything. The line I found read

id:2:initdefault:

initially, then I changed it to 3. That didn't seem to change anything, so I tried inserting a 4, and then a 5, both to no avail. As for comments, the file only mentions that runlevels 2-5 are multi-user runlevels, and doesn't go in to further detail. Runlevel 1 is called single user mode, but it required me to login as root, and didn't allow any other type of login. Further, it allows only one console to be open at a time.

There's a line that reads as follows:

# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

so I took a look at /etc/init.d/rcS, but it's clearly above my level of comprehension. Can anyone tell me what I'm doing wrong, or if I'm anywhere near the right track? Thanks!
 
Old 09-21-2004, 10:50 PM   #6
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Beomoss: You are doing nothing else wrong than that you are not reading very carefully these posts.
As said, the runlevels 2-5 are identical in debian by default and the default runlevel is 2. Changing this won't do what it does in some other distributions.

There are two ways suggested to prevent {x,k,g,}dm from starting:
-Remove them (apt-get remove ...)
-edit /etc/X11/default-display-manager to not contain one of them, but eg. /dev/null

Few more ways:
-chmod -x the display managers
-take symlinks to {x,k,g}dm away from /etc/rcX.d/ (where X is your choice, something between 2 and 5). That way you have setup that runlevel as a runlevel where display managers are not started.
 
Old 09-22-2004, 12:32 PM   #7
Beomoss
LQ Newbie
 
Registered: Sep 2004
Location: State College, PA, USA
Distribution: Fedora Core 3
Posts: 7

Original Poster
Rep: Reputation: 0
Sorry, ToniT, I started writing my previous post and then got called away to other things, came back a few hours later, and finished it without bothering to check if anyone had posted anything new in the meantime. Thanks for the help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Login to Linux from Windows command prompt through ssh sysadmn Linux - Networking 1 03-25-2005 04:13 AM
login prompt - can only login as root mindfriction Linux - Newbie 6 09-03-2004 07:14 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
When i login, there is a command prompt at the top of the screen bcf2 Linux - Newbie 12 07-09-2004 12:05 AM
red hat command prompt at login adamuk Red Hat 3 05-21-2004 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration