Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » Ported Packages   » Using Applications from /usr/local/

UBBFriend: Email this page to someone!    
Author Topic: Using Applications from /usr/local/
apex
Administrator
Member # 1

posted August 06, 2001 01:59 AM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
If you recieve 'command not found' or are tired of typing out the full path to an application update your PATH variable.
Most of our packages install applications into /usr/local/bin. This is not normally in a users PATH. Add a line such as:
code:
export PATH="/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin"

to /etc/profile. Open a new shell for the changes to take effect.

Manual Pages:
man -m /usr/local/man <program name>


Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 14, 2001 04:24 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
Another option is to add the path globally by editing /usr/share/init/tcsh/login.

For example. If your files and binaries for mysql are in /usr/local/mysql/bin and you want to add that to everyones paths then you would do the following

A) change the path globally by editting /usr/share/init/tcsh/loginI)sudo pico /usr/share/init/tcsh/login
II)at the top you will find the path setup

(set path =) after the last declared path
ex:

code:

set path = ( \
~/bin \
/usr/local/bin /usr/bin /bin \
/usr/local/sbin /usr/sbin /sbin
\

you want to insert the path to your mysql binaries. If you followed these instructions the line is

/usr/local/mysql/bin \

add the text on a seperate line after the last entry, but before the closing ). it should then look like this:
set path = ( \
~/bin \
/usr/local/bin /usr/bin /bin \
/usr/local/sbin /usr/sbin /sbin
\ /usr/local/mysql/bin \ )

III) ctrl-x
IV) <return>>


[ August 14, 2001: Message edited by: jasont ]


Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 14, 2001 06:08 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
If you recently installed a command and you aren't getting it try rehash.
Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 18, 2001 01:59 PM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
Oops, step III and IV on the login instructions are from a tutorial I wrote. Everything else works, it just assumes you are using pico to do your editting.
-j

Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
bartX
Junior Member
Member # 26

posted August 20, 2001 04:10 AM      Profile for bartX        Edit/Delete Post  Reply With Quote 
As far as I know, there are two good ways to change the PATH environment variable: put one of the following lines in your .cshrc or .login file (remove the leading #)

#set path = ($path /usr/local/bin)
# or
#setenv PATH "${PATH}:/usr/local/bin"
These make sure you _append_ to your path instead of replacing it, which is generally a bad idea. If you want to use your own versions of default versions of some soft (e.g. use a colorised ls instead of the default one) without replacing the default one, put the new path _before_ the PATH variable:

#set path = (/usr/local/bin $path)
# or
#setenv PATH "/usr/local/bin:${PATH}"

If you have several directories to add, it is generally a good idea to add them in separate lines (so you can easily en/disable one).

An example from my .cshrc file (which is in my home dir BTW):

"
setenv MANPATH "${MANPATH}:/usr/X11R6/man"
setenv PATH "${PATH}:/usr/X11R6/bin"

setenv MANPATH "${MANPATH}:/Software/BSD/share/man"
setenv PATH "${PATH}:/Software/BSD/bin"
"


Posts: 5 | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted September 01, 2001 09:42 PM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
the only problem with your (and there are about 4 other ways to do it for a total of 7+) methods is they don't change the configuration for every user. Neither will editing anything in ~/whatever since that's only loaded on a per user basis. There's nothing wrong at all w/ editing the global code for setting up user environments as long as you know what you're doing. Although, I agree with you in general. Most people should just change their shell resource.

[ September 01, 2001: Message edited by: jasont ]


Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us | macosx.forked.net

Powered by Infopop Corporation
Ultimate Bulletin BoardTM 6.1.0.2