I've only a few seconds right now--have to trot off--but I'm afraid you don't
quite have it.
On Sun, Dec 30, 2001 at 02:33:14PM -0500, John P Verel wrote:
> When init invokes getty, getty forks and creates (at level 5), consoles
> 1 through 6 and, for X, console 7.
Well, no. Actually, init spawns a separate instantiation of getty for each
line in the inittab file.
> login, which is invoked by getty, resets the default path for root
> and for normal users.
Not resets--creates. I haven't looked lately, but under Unix, getty
actually issued the initial "login:" prompt, then spawned the login
program with the returned user name. Hmm...a 'strings' on getty shows this
is likely still true.
> If one logs in under X, apparently login and X BOTH start login shells.
> I say this because what I see happening is that the path appendices from
> my /etc/profile and my ~/.bash_profile are added twice. This does not >
> happen if I log into a console, which would be a login only under login.
Well, it's been a while since I went through this, but no, I don't
believe so. Rather, it runs through the 'X' initialization, and IIRC,
there's a piece of script that is either conditional or commented out
that will then go through your normal shell initialization. You don't
get two login shells, though.
> Also, if I log in under X using gdm, the default path gets reset in
> gdm.conf, with the same double sourcing discussed above.
Again, almost certainly chaining the initialization files, not multiple
execution.
> So, the net of this is that, under X, one is running two login bash
> shells, apparently one for X and one for the user.
I really don't think so--do you see two login shells from an xterm window
when you do a 'ps'?
> At a minimum, this makes setting environment variables such as $PATH
> to be...um...a bit opaque, no?
No matter the mechanism, you're certainly correct about THIS.
Cheers,
--
Dave Ihnat
[EMAIL PROTECTED]
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list