On Tue, Jan 08, 2002 at 09:35:47PM -0500, Brenda J. Butler wrote: > On Wed, Jan 09, 2002 at 11:01:39AM +0800, Patrick Hsieh wrote: > > I have set some aliases in /etc/profile, but > > when I enter "screen" and create a new "screen" session, > > it does not work, I am afraid screen will not read /etc/profile. > > Idea? > > Screen doesn't read profile or .bashrc, bash does. > Screen causes a shell (bash) to be run, and then bash is > failing to read your /etc/profile. > > This is because you have already logged in, and you are > running a bash that only reads bashrc (not a "login" bash). > > According to the man page (bash(1)), if you run a login bash, > it will execute /etc/profile, if it exists, then it will
You can tell screen to exec a login shell. From screen's manpage shell command Set the command to be used to create a new shell. This overrides the value of the environment variable $SHELL. This is useful if you'd like to run a tty-enhancer which is expecting to execute the program specified in $SHELL. If the command begins with a '-' character, the shell will be started as a login-shell. -- He who fights and runs away lives to fight another day.