On Mon, Apr 21, 2014 at 7:22 AM, Martin Brandenburg
<[email protected]> wrote:
...
> I'm going to add that .profile may be read by non-terminal login software
> (xdm, etc.) as well, so it's not a bad idea to limit terminal
> initialization stuff to interactive login sessions:

Hmm, I haven't seen anything like that in many many years.  $ENV used
to be processed by non-interactive scripts, but that was a bug fixed
in 2007.  I would be interested in hearing details of specific cases
where .profile is parsed by non-terminal software.


> # tset on interactive login shells.
> case "$-" in
> *i*)
>         eval `tset -sQ '-munknown:?vt220' $TERM`
>         ;;
> esac

If this really is an issue, then the test should be whether stdin is a
terminal, ala
     [ -t 0 ] && eval `....etc`


> Putting things in the wrong shell init files can result in things not
> working as they should, so please be careful and follow the advice to
> read ksh(1).

...and file bugs against programs passing -l and -i to the shell when
they shouldn't be...


Philip Guenther

Reply via email to