Start only console on ttys other than 1


Forum: DSL Ideas and Suggestions
Topic: Start only console on ttys other than 1
started by: curaga

Posted by curaga on Feb. 28 2007,17:53
Well, it isn't needed to start x on other ttys, since that's what the workspaces are for. It will only hog resources to have many instances of x running..

It can be done, Knoppix 5 does it, X is on tty5 and ttys 2-4 are console (1 is for messages). I don't know how it's done, so don't ask me, but I think it's somewhere in inittab...

Posted by mikshaw on Feb. 28 2007,18:54
There are a couple of ways to do it in DSL. One way is to set up multiple virtual terminals with a login prompt:
< http://damnsmalllinux.org/cgi-bin....;t=7936 >

Another way is to simply boot into runlevel 2. The drawback of this is that the four available virtual terminals are already logged in as root, so you should su to dsl to do regular non-administrative work (including starting X).

Posted by curaga on Mar. 01 2007,16:38
I have a hd-install, with multiuser, so there is a login prompt on 4 ttys (3 on mine), but after logging in in any tty, it starts x (yes, in runlevel 5) and that's the default behavior I'd like changed
Posted by mikshaw on Mar. 01 2007,20:15
ok...that's an easy one.  Just remove "startx" from /home/dsl/.bash_profile

Or if you still want to have it automatically start x in tty1, you could change it to something like this:
[ `tty` == /dev/tty1 ] && startx

Posted by curaga on Mar. 02 2007,13:11
that worked great. I think adding that line to dsl would improve dsl :;):

Oh, and remember to change /root/.bash_profile
startx line too to that, wouldn't want logging as root in ttys 2 and 3 to start X..

Posted by mikshaw on Mar. 02 2007,16:40
There isn't a /root/.bash_profile, or any files in /root, by default. Files are created there by certain applications in some situations,  but i don't think .bash_profile is one of them.

There is a /.bash_profile file, which might be what your talking about. This file does not start x, however. It switches the root user to user dsl when root logs it. You are right that it should still be modified in a situation like the one we're talking about, but that issue was already addressed in the link posted above.

Posted by curaga on Mar. 03 2007,10:04
?? No I am talking about /root/.bash_profile, it was there by default and also nearly all other files that are in /home/dsl.. I guess hd install is way different..
Posted by mikshaw on Mar. 03 2007,18:37
You're probably right.  I was looking at /KNOPPIX/root, which is empty, so I assumed /root would also be empty until an application creates files there.  I've never used a hd install to say what might be put there during the installation.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.