|
|
#1 |
|
Triple-A Player
Join Date: Nov 2002
Posts: 136
|
Adding new commands
I recently installed the ncurses aim client pork. I didn't pay attention to the INSTALL manual and it installed in in /usr/local/bin/ rather than uninstall in and reinstall in in /sw/bin/. How do I add a comand so I can launch pork by typing pork rather than /usr/local/bin/pork.
Thanks in advance.
__________________
-- Ed Lynch-Bell |
|
|
|
|
|
#2 |
|
Prospect
Join Date: Jul 2003
Posts: 24
|
If you're running bash, add this line (or modify as needed...) to your $HOME/.bash_profile:
export PATH=$PATH:/usr/local/bin Similar statement for tcsh but I'm not a csh-er so consult your friendly man pages... |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
In tcsh, create a .login file in your home directory and put in something to the effect of:
Code:
setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:" Code:
source ~/.login Last edited by yellow; 01-17-2004 at 07:02 PM. |
|
|
|
|
|
#4 |
|
Triple-A Player
Join Date: Nov 2002
Posts: 136
|
how do I do that for all users? By the way I'm using tcsh not bash it that helps.
Also why shouldn't I add Code:
setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:"
__________________
-- Ed Lynch-Bell Last edited by gsdali; 01-17-2004 at 07:16 PM. |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
There is a reason, I just cannot come up with it right now.
Traditionally, that goes into the .login, I'm sure there's a valid reason for it.For all users, add it to the /etc/csh.login |
|
|
|
|
|
#6 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
because the .tcshrc file is also read/loaded for subshells. subshells inherit environment from the parent shell, so it is undesirable to reset the path for subshells. e.g., if you augment the path in the shell's rc file: setenv PATH "${HOME} $PATH" the result would be to prepend the value of $HOME for each subshell. certainly not what is wanted. the shell's login file is read once for each login (window) in the terminal.app |
|||||||||||||||||||
|
|
|
|
|
#7 |
|
Triple-A Player
Join Date: Nov 2002
Posts: 136
|
ta very much.
I really ought to sit down and dig deeper into thew hows and whys of some of this stuff. Anyone recommend a good book/primer site?
__________________
-- Ed Lynch-Bell |
|
|
|
|
|
#8 |
|
Triple-A Player
Join Date: Nov 2002
Posts: 136
|
I appear to have hosed all of my fink commands. I can't launch a single fink installed application now. I tried reinstating things as the were. the applications installed in /usr/local/bin work. When I run setenv, the path line reads:
Code:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:
__________________
-- Ed Lynch-Bell |
|
|
|
|
|
#9 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
basic fink installation instructions state to put the following in your login startup, after path is defined...
Code:
source /sw/bin/init.csh |
|
|
|
![]() |
|
|