Re: /etc/profile not being run


Subject: Re: /etc/profile not being run
From: Hollis R Blanchard (hollis+@andrew.cmu.edu)
Date: Sun Feb 25 2001 - 11:27:10 MST


On Sun, 25 Feb 2001, Conrad M. Hirano wrote:

> I have a B&W G3 running CS 1.2.1, updated to XF 4.0.1 using Hollis's .rpms.
> I'm in run level 5, and when I log in at the console, /etc/profile doesn't
> get executed.

/etc/profile is executed by bash when it is run as a login shell. In runlevel
5, bash is never executed as a login shell, since all terminals you bring up
in X are (correctly) non-login shells.

I don't know how to resolve this aside from not using runlevel 5. The hackish
approach would be to add your terminal's --login switch (ie 'rxvt -ls'), which
will cause *every* terminal you load to be a login shell. This will be
annoying in the case of runlevel 3 however, since if you have something like
the following in your .bash_profile (or /etc/profile):
        export PATH=$PATH:/usr/local/bin
then /usr/local/bin will be appended to your path twice - once on console
login, and again when you start a terminal in X (environment variables are
inherited).

-Hollis



This archive was generated by hypermail 2a24 : Sun Feb 25 2001 - 11:28:33 MST