[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xfree86 and Knoppix



On Tue, Aug 13, 2002 at 02:18:09PM -0400, Patrick Wiseman wrote:
> On Tue, 13 Aug 2002, Eric G. Miller wrote:
> 
> [in response to what I wrote > > below]
> 
> > > I must be doing something wrong when I launch X, but whenever I do
> > > Ctrl-Alt-F1, it takes me to the console I logged in from, OK, but no
> > > prompt, just the most recent message from the X server.  Ctl-Alt-F2 gets
> > > me an open console to which I can login.  But if you've installed xdm (as
> > > I suspect Brian means he's done) then every console presents the xdm login
> > > screen, because (at least as it installed on my box) S??xdm was in _every_
> > > rc?.d directory.  RH behavior is better here, imo, because it makes
> > > runlevel 5 the xdm runlevel, so you can switch runlevels and escape
> > > xdm.  But this may just be me not understanding something basic!
> > 
> > Unless something has drastically changed with XDM, that doesn't sound
> > right.  Having XDM run under most runlevels should not also translate to
> > it running on every open terminal.  Debian's default init scripts should
> > have six "consoles" with any X display manager running on a seventh.
> > Therefore Ctrl-Alt-F[1..6] should get you a console login in all regular
> > run levels (i.e. not singular user or shutdown).
> 
> Except that /etc/inittab defines the runlevels so:
> 
> # Runlevel 0 is halt.
> # Runlevel 1 is single-user.
> # Runlevels 2-5 are multi-user.
> # Runlevel 6 is reboot.
> 
> l0:0:wait:/etc/init.d/rc 0
> l1:1:wait:/etc/init.d/rc 1
> l2:2:wait:/etc/init.d/rc 2
> l3:3:wait:/etc/init.d/rc 3
> l4:4:wait:/etc/init.d/rc 4
> l5:5:wait:/etc/init.d/rc 5
> l6:6:wait:/etc/init.d/rc 6
> 
> and runlevels 2-5, the multi-user levels, all had, in their respective
> rc?.d directories, the S..xdm script and thus spawned xdm on entry of
> _each_ of those runlevels.

No no. The system is in and only one runlevel at a given moment. That
a start script for xdm exists in runlevels 2-5 only means that
regardless of which of the multiuser runlevels you go to (or set as
the default) xdm will be running. In Debian all runlevels are equal by
default.

> Combine that with these console/tty definitions:
> 
> # Format:
> #  <id>:<runlevels>:<action>:<process>
> #
> # Note that on most Debian systems tty7 is used by the X Window System,
> # so if you want to add more getty's go ahead but skip tty7 if you run X.
> #
> 1:2345:respawn:/sbin/getty 38400 tty1
> 2:23:respawn:/sbin/getty 38400 tty2
> 3:23:respawn:/sbin/getty 38400 tty3
> 4:23:respawn:/sbin/getty 38400 tty4
> 5:23:respawn:/sbin/getty 38400 tty5
> 6:23:respawn:/sbin/getty 38400 tty6
> 
> Note that _consoles_ 2-6 all allow (require? I'm not sure what the
> significance is of specifying these runlevels is) runlevels 2, 3 - well,
> _they_ both spawn xdm as defined above.

Yes, and since xdm only uses vt7 (by default) vt 1-6 will be there for you.

> Moreover, the default runlevel is
> 
> # The default runlevel.
> id:2:initdefault:
> 
> So, when Colin said in another post that runlevel and consoles are
> unrelated, I don't think that's quite right.  It seems to me that they are
> made to be related by these definitions in the inittab.

True. I was actually surprised that only vt1 was spawned in runlevels 4
and 5.

> So, when I said earlier that the RH default is better in this respect,
> that's all I meant.  RH spawns xdm only in runlevel 5.  You can make
> runlevel 5 your default and so boot into an xdm prompt, but you can then
> escape it by Ctl-Alt-F2 to F4 or F6.  You can't do that on a standard
> Debian box (as now defined in /etc/inittab) without some
> reconfiguration.

Yes you can, at least I can, and you should be able to do that too.
However, if you set the default runlevel to 5, then vt 2-6 will not
be available. (This means that "in Debian runlevels 2-5 are equal by
default" should be interpreted as "in Debian /etc/rc2.d - rc5.d is
equal by default). But vt1 should be there.

> So, it's not that xdm is doing something weird, it's that these
> definitions in inittab cause xdm to be spawned in every console.

xdm starts xservers on vt defined in /etc/X/xdm/Xservers it has
nothing to do with /etc/inittab

> I'm making these claims largely from memory because I'm d*mned if I'm
> going to reinstall xdm to confirm it and be stuck with it everywhere I go
> again!  I was frankly surprised to find that the S..xdm script was in all
> the regular rc?.d directories.

If you want to understand rc?.d directories and runlevels see the
manpage of init.

-- 
Note that I use Debian version 3.0
Linux emac140 2.4.17 #1 sön feb 10 20:21:22 CET 2002 i686 unknown

Hans Ekbrand

Attachment: pgp1Q84LXIyY_.pgp
Description: PGP signature


Reply to: