I'm working with Solaris 9 (X86, but I think the situation is the same in SPARC), and it appears that /usr/bin is always the first directory in the default PATH, and I would like to configure things so that another directory (/opt/csw/bin) is at the front of the PATH, before /usr/bin. What I mean by "default PATH" is the path that the system uses to start processes before a user logs in.
The reason that I want to do this is that I am trying to upgrade some software (the Metacity window manager, etc.) and am using pkg-get from http://www.blastwave.org
. When I do the pkg-get, it puts the new software in /opt/csw/bin, so when I boot the system or login, instead of starting the new Metacity (and it's associated processes) from /opt/csw/bin, the versions in /usr/bin are always started.
I've been working at this for a number of days and have tried all kinds of things, including enabling the "PATH" and "SUPATH" lines in /etc/default/login, adding to the PATH in /etc/profile, etc., and regardless of what I do, /usr/bin always seems to be at the beginning of PATH.
My understanding is that /usr/bin is hard-coded into the Solaris code somewhere, but that if the "PATH" line in /etc/default/login is uncommented, then that should override the hard-coded PATH, but it doesn't seem to work this way, at least in Solaris 9 X86.
Can anyone here tell me how I can do this?