This feels like a faq as google turned up some references to 9.0 and 9.1 but I couldn't find an answer... Extending the path wth a simple export PATH=$PATH:/whatever in the /etc/profile.local extends the path twice? Is there a preferred simple way of adding a path for all users that works cleanly? Regards Matt linux noobie matthurd@acm.org
On Wednesday 20 July 2005 04:06, Matt Hurd wrote:
This feels like a faq as google turned up some references to 9.0 and 9.1 but I couldn't find an answer...
Extending the path wth a simple
export PATH=$PATH:/whatever
in the /etc/profile.local
extends the path twice?
You have your terminal program configured to be a login shell, which means it will behave as though it is the first thing run when logging in, which means it will run /etc/profile, which of course was already read once when you really did log in.
Is there a preferred simple way of adding a path for all users that works cleanly?
Either configure your terminal to not be a login shell (it probably shouldn't be anyway), or do in profile.local what they do in /etc/profile, and enclose your export line in "if -z $PROFILE_READ; then ..... fi"
Thanks Anders that did the trick nicely.
On 20/07/05, Anders Johansson <andjoh@rydsbo.net> wrote: <snip>
Either configure your terminal to not be a login shell (it probably shouldn't be anyway),
Don't know how to do that, it is just "out of the box" SuSE... standard. or do in profile.local what they do in /etc/profile, and enclose
your export line in "if -z $PROFILE_READ; then ..... fi"
That did it nicely, small typo, the full thing for profile.local reads: if test -z "$PROFILEREAD" ; then export PATH=$PATH:/extra_path fi Thanks again, Matt. linux noobie matthurd@acm.org
participants (2)
-
Anders Johansson
-
Matt Hurd