Where to set environment variables

Martin Pitt martin.pitt at canonical.com
Wed Oct 20 14:10:35 UTC 2004


Hi!

Martin Pitt [2004-10-20 15:48 +0200]:
> > This might sound stupid, but did you reboot after you made the
> > changes to the files (or run "source ~/.bash_profile" in stead of
> > rebooting)?   What happens to PATH when you type "export
> > PATH=$PATH:/usr/local/java/bin" in the console, does it change to
> > what you expected?
> > 
> > You're on the right track in changing ~/.bash_profile and
> > /etc/profile, it should work (or else I'm missing something simple
> > here)
> 
> I also experience this problem. Setting $PATH as usual in
> ~/.bash_profile / ~/.bashrc works great on the text consoles; this
> also works fine in other window managers, but some stupid thing just
> ignores PATH changes after .bashrc finishes in a Gnome terminal (also
> X terminal).
> 
> So this is obviously _not_ the right track :-(

Sorry, it _is_ the right track. I just found the stupid reason why it
does not work for me: I set the PATH in the first line of my
~/.bashrc, but somewhere in the middle of the file I included
/etc/profile (under certain conditions), which overwrote $PATH.

/me wears a brown paperbag now.

Martin


-- 
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20041020/ecce5801/attachment.sig>


More information about the ubuntu-users mailing list