Re: Terminal versus xterm anomaly
Re: Terminal versus xterm anomaly
- Subject: Re: Terminal versus xterm anomaly
- From: Kevin Geiss <email@hidden>
- Date: Thu, 7 Apr 2005 21:19:21 -0700
point taken about the log entries.
interesting, I didn't realize it doesn't run the .bashrc in a login
shell.
I typically run zsh, which runs the .zshrc for any interactive shell,
login or not.
I see the philosophy though; the bash interpreting your .xinitrc file
would be a login shell, and non-interactive; then all other bashes
would be non-login, inherit environment variables set in .bash_profile
by the parent login shell, then run .bashrc to set themselves up for
interactive use. cool.
On Apr 7, 2005, at 3:52 PM, Nick Phillips wrote:
On 08/04/2005, at 10:19 AM, Kevin Geiss wrote:
what's the downside to making every xterm a login shell? I've been
doing that for nearly 15 years.
Screws with logging. A login shell should have an associated wtmp
entry,
and having loads of them screws with how the logging is supposed to
work.
When using a GUI, xdm or gdm should be making those entries for you,
not
every individual shell you start.
If you are on a desktop machine and never look at your logs anyway,
then
maybe that won't bother you -- but still...
if instead you want your .bashrc to source your .bash_profile, why
not just put all the stuff from your .bash_profile into your .bashrc
in the first place, and rm your .bash_profile?
Because then when you *do* have a login shell, it won't get run.
.profile, .bash_profile, .login and the like are supposed to be for
things
that you want to run once per session.
Bash and tcsh have differing opinions on how to deal with rc files
(.bashrc,
.cshrc, .tcshrc etc.) -- bash *will not* use them when starting a login
shell, while tcsh will. Basically they're for things to be run for
every
shell.
I guess that the philosophy behind bash doing it that way is that it's
much easier to source your .bashrc from your .bash_profile if you do
want
it than it would be to stop .bashrc from being used if it did use it by
default but you didn't want it.
Cheers,
Nick
--
Nick Phillips / +64 3 479 4195 / email@hidden
# these statements are my own, not those of the University of Otago
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden