"Screen" prgram: New shells won't read /etc/profile or ~/.profile?

"Screen" prgram: New shells won't read /etc/profile or ~/.profile?

Post by Tony Gonzale » Sat, 21 Jun 1997 04:00:00

Whenever I start a new shell in screen it won't read /etc/profile or
~/.profile.  My xterms are okay, but not even starting the shell on
the command line works I type 'bash -login -i' and I get another
shell, but still .profile isn't read.  If I type "set", among other things,
I get ENV=/etc/ENV.  Any ideas how I might go about tracking the problem?  



.   .   .   .  . . . . . . . . ._______________________________________.

                               |_____________|___ Southern California _|


"Screen" prgram: New shells won't read /etc/profile or ~/.profile?

Post by Tony Gonzale » Fri, 27 Jun 1997 04:00:00

I still don't know why "bash -login -i" won't read any of
the profiles but putting everything I need, like aliases,
in /etc/ENV  instead of ~/.profile seems to have done the trick....it now
executes the alias commands in ENV at every shell & subshell
whereas before it didn't because neither ~/.profile nor ~/.bashrc
get read.

I don't think ENV is the normal places for alias's,
Does anyone know if this will cause any problems...

Anyway here's what is in ENV....this may give someone a clue as to
why none of my profiles are being read - some of the symbols here are
cryptic to me:

Quote:># /etc/ENV: Posix conformant startup script for /bin/sh
># We try to emulate the standard shell behaviour: if it is an interactive
># login shell, read /etc/profile first, then ~/.profile.
># A Posix conformant shell will read this file if environment variable ENV
># is set to /etc/ENV (see /etc/ENVIRONMENT).
>case "${--}" in *i*)
>        # Shell is interactive
>        case "${0##*/}" in -*)
>                # Shell is a login shell (-sh)
>                if [ -f "/etc/profile" ]; then
>                        # source /etc/profile
>                        . /etc/profile
>                fi
>                if [ -n "${HOME-}" ] && [ -f "$HOME/.profile" ]; then
>                        # source ~/.profile
>                        . "$HOME/.profile"
>                fi
>        ;; esac
>;; esac




1. KDE won't start if my .profile or /etc/profile has stty commands

.. or any other commands that write to the tty.  Its strange.  I'm
running SuSE 7.2, and I've written an istty program in C which simply
calls isattty(fd), and exits with 0 if it is a tty.  Even with this in my
.profile or /etc/profile, kde wont start (x does start).  I'm removing my
remaining hair, so hurry!


2. etherchannel on an F80

3. ksh not reading /.profile or /etc/profile

4. Matrox v Diamond Stealth

5. Not reading /etc/profile or .profile

6. IBM PCI Token Ring

7. Does select return "read ready" or "won't block" status?

8. HELP!!!!!!!!

9. Telnet login doesn't run /etc/profile or $HOME/.profile

10. cmdtool doesn't source /.profile or /etc/profile

11. user shell doesn't read /etc/profile

12. why CDE does not process ".profile" after modified a shell configuration

13. Getting bash to read ".profile"