DSL Ideas and Suggestions :: boot option: runlevel 5 without startx



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.

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.

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)

Nope.

Runlevel 5 is usually for graphical login

Runlevel 3 is usually for "normal" user login but without automatically starting up the graphical interface.

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
Next Page...
original here.