View previous topic :: View next topic |
Author |
Message |
Arakiel n00b
Joined: 15 Mar 2003 Posts: 16
|
Posted: Mon Mar 17, 2003 6:03 pm Post subject: .bashrc and su not sourcing /etc/profile.env |
|
|
OK I think I narrowed down my earlier problem with the DCOPServer errors but that thread is sort of way off base from the actual problem so I thought I would start a new one...hope you don't mind
It seems that when I su in as root from a terminal it does not execute the /etc/profile ... or at the very least, it doesnt source /etc/profile.env because the PATH variable is way outa whack which causes iceauth to not be found and subsequently all the errors im seeing. Now I think I can get around this by modifying root's .bashrc to force the source /etc/profile.env but I'd rather find the cause of this problem since it wasn't happening a few days ago. So my question is, does anyone know why a terminal wouldn't source /etc/profile.env but logging in as root or logging in as root from ssh DOES source it?
I won't be able to test out my theory until I get back home from work since im on a windows machine here and limited to ssh logins (which work fine) but if anyone has any ideas as to why this might happen please let me know. In case you haven't figured it out by my bad lingo i'm not very knowledgable about linux, i only know enough to be a danger to myself ...so I'll take any help I can get lol.
Thanks in advance!
-Mark |
|
Back to top |
|
|
Esben Apprentice
Joined: 29 Jun 2002 Posts: 244 Location: Copenhagen/Denmark
|
Posted: Mon Mar 17, 2003 6:47 pm Post subject: man is your friend.. |
|
|
It's because it' is not a login shell when you invoke by su. Try reading the man pages (man bash) under "INVOCATION". _________________ regards, Esben
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war. |
|
Back to top |
|
|
Arakiel n00b
Joined: 15 Mar 2003 Posts: 16
|
Posted: Mon Mar 17, 2003 7:08 pm Post subject: |
|
|
Aha! I see...so because i was using su instead of su - it wasnt sourcing /etc/profile at all. I see, I guess it must be my deranged imagination that thinks I did this before...or probably I didnt run any apps out of the standard paths...could have sworn otherwise though.
Thanks for the point in the right direction Esben! _________________ -Mark
The three most dangerous things are:
a programmer with a soldering iron,
a manager who codes,
and a user who gets ideas. |
|
Back to top |
|
|
mmealman Guru
Joined: 02 Nov 2002 Posts: 348 Location: Florida
|
Posted: Mon Mar 17, 2003 9:37 pm Post subject: |
|
|
I just created an alias for su that's 'su -'. It works pretty well.
My only complaint is that now when I su I end up in root's home dir instead of the dir I issued su from. |
|
Back to top |
|
|
Esben Apprentice
Joined: 29 Jun 2002 Posts: 244 Location: Copenhagen/Denmark
|
Posted: Mon Mar 17, 2003 9:49 pm Post subject: something is.... changed. |
|
|
Arakiel wrote: | Aha! I see...so because i was using su instead of su - it wasnt sourcing /etc/profile at all. I see, I guess it must be my deranged imagination that thinks I did this before...or probably I didnt run any apps out of the standard paths...could have sworn otherwise though.
Thanks for the point in the right direction Esben! |
Something was changed in some upgrade to gcc, about the some time that gcc-config was introduced. I /think/ that some change was introduced to one of those default read-in scripts (again, see man bash) so the /etc/profile no longer gets sourced. Hard to tell now, though. Wish I knew the reason, if any.
And you're welcome Man really is your friend, even if it is quite a chatterbox _________________ regards, Esben
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war. |
|
Back to top |
|
|
|