Mailinglist Archive: opensuse (2700 mails)

< Previous Next >
Re: [SLE] /etc/profile.local twice on 9.3?
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Wed, 20 Jul 2005 04:26:51 +0200
  • Message-id: <200507200426.52269.andjoh@xxxxxxxxxx>
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"

< Previous Next >
Follow Ups