Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: boot option: runlevel 5 without startx, textmode as user dsl< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 15 2005,05:35 QUOTE

DSL has the "dsl 2" boot option that gives you text only as root.  This is useful sometimes, but if a regular user just wants a console it might be handy to have this as an option that does not first require the presence of a backup.
Not too long ago the default was to log in user dsl into text mode in runlevel 5.  Would it be unreasonable to suggest that the user has an option to enter a boot parameter that would give him this same setup automatically?  The "noicons" parameter is used in this way...when xinit runs, it checks for that parameter before deciding whether to launch xtdesk.  The same principle could be applied to .bash_profile...instead of automatically starting x, it could check to see if there is a "textmode" or similar parameter, and then startx if that parameter is not present.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Dec. 15 2005,17:45 QUOTE

If you want a more traditional Linux startup behavior, you would pass the init runlevel via a boot parameter and then do the following:

runlevel 1 (IE: dsl 1)
Minimal console mode boot as "root" with no virtual terminals
ALREADY WORKS THIS WAY

Runlevel 2  (IE: dsl 2)
Boot to console text mode as root user + 3 more virtual text terminals
ALREADY WORKS THIS WAY

Runlevel 3 (IE: dsl 3)
Boot to console text mode as user dsl + 3 more virtual text terminals

Runlevel 5 (Is assumed by default, no dsl 5 is needed)
Boot to graphical mode as user dsl
ALREADY WORKS THIS WAY

You can do checks for bootparameter "3" (proc/cmdline) in .bash_profile or you can even check the runlevel itself directly if you prefer.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 15 2005,21:10 QUOTE

ohh....I had no idea that runlevel 3 was what I was looking for.  I assumed that runlevel 5 was textmode in debian distros, but that DSL just added "startx".  I'll look into that, thank you.

EDIT:  Sorry, but using runlevel 3 produces exactly the same results as runlevel 2....you get 4 terminals all logged in as root.
My suggestion is to "checkbootparam nox|text|nostartx|whatever" or some such thing from .bash_profile before startx is run.  This would result in the same thing you'd get if you started as normal and then shut down X, except that you wouldn't have to be forced into X to begin with in case your machine can't handle it.
I know this can be done easily enough with backup/restore, but i figure it would be even easier to just add a few bytes to .bash_profile =o)


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Dec. 17 2005,03:49 QUOTE

Nope.

Runlevel 5 is usually for graphical login

Runlevel 3 is usually for "normal" user login but without automatically starting up the graphical interface.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 17 2005,04:25 QUOTE

have you tried it?  Put "3" in your boot parameters and tell me what you get.  The only reason runlevel 5 starts x in DSL is because the startx command is in /home/dsl/.bash_profile

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
9 replies since Dec. 15 2005,05:35 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: boot option: runlevel 5 without startx

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code