[SATLUG] anyone figure out how to run .profile under X?

Robert Pearson e2eiod at gmail.com
Tue Aug 10 19:04:39 CDT 2010

On Tue, Aug 10, 2010 at 6:51 PM, Robert Pearson <e2eiod at gmail.com> wrote:
> On Tue, Aug 10, 2010 at 6:35 PM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
>> Henry Pugsley wrote:
>>> Put everything in .bashrc then source .bashrc from .profile, then you get
>>> the same for login and normal shells.
>> That causes problems if you have something like:
>>  export PATH=my_special_path:$PATH
>> Generally you don't want to set environment variables in .bashrc
>>  -- Bruce
> Where do you recommend they go?
> Without special checking for already existing "envars" in ~/.bashrc
> then problems can arise.
> In the past I put all "permanent-personal" environmental variables
> either in /etc/profile or in ~/.profile.
> What I can't remember is whether or not the remote logins source
> ~/.profile. It is sourced from /etc/profile by default if it exists so
> it should be.

The "little gray cells" were taking a nap during the first message.
The difference is whether this is being done only for one or all users.
Just for one I would do ~/.profile.
For all users I would put it an /etc/profile_"special" and source it
from /etc/profile.
Don't want /etc/profile to become more of a maintenance issue than it is.
You could add a ~/.profile to the user "skel" for new users but then
it has to be propagated to all existing users. Big pain.

More information about the SATLUG mailing list