To summarize:

 * When configuring your shell dot files, make sure you DON'T write
   anything to stdout, unless you have verified that stdout is a
   terminal.  Otherwise, it can mess up ssh sessions and other things.

 * Likewise, DON'T run stty, or other terminal manipulation commands,
   unless you've verified that stdin is a terminal.  Otherwise, it
   can cause errors, which may have unpredictable results in some
   situations.

 * If you feel that this doesn't apply to you, fine.

 * For the rest of us, Debian has compiled its bash package with the
   option that causes it to read .bashrc when run under sshd, even
   when a command is given.

 * Also, some operating systems, such as SuSE, have historically
   configured their shells to read EVERY dot file regardless of
   invocation mode.  So, thinking "but it shouldn't read .bashrc because
   I'm doing X, Y, or Z" may not necessarily be correct on such systems.

 * Also, some operating systems read your shell dot files during an X
   session startup, during which there is no terminal.

Reply via email to