[CentOS] system environment variables

Johnny Hughes mailing-lists at hughesjr.com
Wed Jun 15 08:57:24 UTC 2005


On Tue, 2005-06-14 at 21:18 -0700, Ken Godee wrote:
> CentOS 3.x
> 
> Don't know how this got by me, but for
> years I've been previously using /etc/profile
> to set system wide environment variables and now
> I just noticed it doesn't work any more (sort of).
> 
> If you log in via console it works,
> log in via gdm, it does not, but use to work.
> 
> Now I noticed if I create script files
> for the vars I want exported and include them
> in /etc/profile.d/ the vars get set either way.
> 
> Is this now the correct way to set system
> environment variables by using script files
> in the /etc/profile.d/ ?????
> 
> Sorry, I couldn't find info on this, most
> info says to use /etc/profile
> 

/etc/profile.d/ is the new way :)  ... but either way should work.

/etc/profile.d is called by /etc/profile, so either way, they get loaded
via /etc/profile.

(Unless your specific window manager looks somewhere else)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20050615/34a2cc25/attachment.sig>


More information about the CentOS mailing list