Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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"
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!
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.