Getting the right executable

Bob McClure Jr robertmcclure at earthlink.net
Fri Mar 4 23:28:55 UTC 2005


On Fri, Mar 04, 2005 at 01:58:31PM -0800, Bone Randy wrote:
> My Red Hat Linux comes with version 8.3 of the wish
> interpreter in /usr/bin.
> 
> I downloaded version 8.4, which I really need. Version
> 8.4 ended up in /usr/local/ActiveTcl/bin.
> 
> My question: How do I set it up so the user gets
> version 8.4 when he types wish at the command line.
> 
> Thanks,
> Randy

There are several ways.  Probably the simplest is to put the path to
the desired one before /usr/bin in the PATH.

In your /etc/profile, there are several adjustments to the path.  Then
it sources all the applicable shell scripts in /etc/profile.d/.  For
all bash users, add this file, let's call it new_wish.sh, to
/etc/profile.d/:

------ snip 8< here ------
# Add /usr/local/ActiveTcl/bin to the PATH so that wish users
# get that one before the stock one in /usr/bin.
pathmunge /usr/local/ActiveTcl/bin
------ snip 8< here ------

Be sure to "chmod +x new_wish.sh".

Dealing with (t)csh users is left as an exercise for those who grok
(t)csh.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure at earthlink.net  http://www.bobcatos.com
Worry is a waste of the imagination.




More information about the Redhat-install-list mailing list