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

Re: bash startup scripts - what is an "interactive login" ??

Chris F.A. Johnson wrote:
> Mark D. Hansen wrote:
> > Can anyone clarify for me when the ~/.bash_rc and /etc/bash.bashrc
> > scripts get sourced?
>      ~/.bash_rc is not a standard file; do you mean ~/.bashrc?

I am sure that is the case.

>      /etc/bash.bashrc is usually sourced in /etc/profile.

Not on Debian.  I think you must be thinking of a different system. :-)

> > If I create a new xterm do these scripts get sourced or is it only
> > if I do an rlogin, ssh, login ,etc?
>       If you call xterm with the -ls option, it opens a login shell,
>       i.e., one which sources /etc/profile and ~/.bash_profile.
>       If the shell is interactive, but not a login shell (e.g., xterm
>       without -ls), it sources ~/.bashrc.

You are probably confused by the fact that Debian's xdm, kdm, gdm
login does not start the user shell as a login shell and so the
~/.bash_profile is not sourced at login the same as a text console
login.  Create a ~/.xsession as a login shell as already described
several times this week on this list and it will source your
~/.bash_profile at login.


Attachment: signature.asc
Description: Digital signature

Reply to: