View previous topic :: View next topic |
Author |
Message |
craftyc Guru
Joined: 23 May 2002 Posts: 443 Location: Behind You.
|
Posted: Wed May 29, 2002 10:33 am Post subject: Adding a PATH |
|
|
This is a really simple thing yet I've forgotten how to do it.
How do I add a directory to my PATH?
Thanks in advance. _________________ Postcount ++ |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Wed May 29, 2002 10:39 am Post subject: |
|
|
You should edit a file in /etc/env.d which is used on startup to configure the environment settings. I think it's in 00basic or something.
Cya, lX _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
craftyc Guru
Joined: 23 May 2002 Posts: 443 Location: Behind You.
|
Posted: Wed May 29, 2002 10:42 am Post subject: |
|
|
I always thought that you had to do "export PATH=(dir)" at the command line. _________________ Postcount ++ |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20099
|
Posted: Wed May 29, 2002 3:17 pm Post subject: |
|
|
lx wrote: | You should edit a file in /etc/env.d which is used on startup to configure the environment settings. I think it's in 00basic or something.
Cya, lX | Isn't that only for global settings? What about modding the path for individual users? Amazing how you forget simple things.
I've just been typing the path to what I want to run in my ~ dir (translation = too lazy to figure it out). I've gone a month or so
this way and its not really that big of a deal for me (yet). Just thought I'd ask in case someone else searched for the answer. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
kcsduke n00b
Joined: 25 May 2002 Posts: 40 Location: Cambridge, MA
|
Posted: Wed May 29, 2002 9:57 pm Post subject: |
|
|
You can add a directory to your PATH by modifying your ~/.bashrc file.
Here's an excerpt of relevant lines from mine:
Code: |
PATH="/bin:/usr/bin:/usr/bin/X11:/usr/X11R6/bin/:/usr/kde/3/bin:/usr/kde/2/bin/:/opt/blackdown-jdk-1.3.1/bin/: /opt/blackdown-jdk-1.3.1/jre/bin/:/usr/qt/2/bin:/usr/qt/3/bin:/opt/Acrobat5/"
export HISTSIZE HISTFILESIZE PATH PS1
|
Separate each directory by a colon. BTW, that last quotation mark should be on the same line as everything else. |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Wed May 29, 2002 10:53 pm Post subject: |
|
|
You can include the environment path with ${PATH}:...... , yep just stating the obvious. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
Guest
|
Posted: Wed May 29, 2002 11:37 pm Post subject: |
|
|
So if I was trying to install Limewire which needs to know java is installed I would just type "export PATH=/opt/ibm-jdk-1.3.1/bin/java sh ./LimeWireLinux.bin" at the # line? Or is there more to it. For instalnce if I type "java -version" bash cannot find java. It should be able to right? Is there a file that I need to add the path to the java exe to in order for bash to know where java is? I though I posted this question earlier but I can't seem to find that post anywhere I tried adding the path to the bash_profile file like this "PATH=$PATH:/opt/xxx/xxx/xxx" and then one line down "export PATH" and that did not help at all. If I am running as root would I need to replace $ with # when I add the path? I knew how to do this in Mandrake but gentoo seems to handle calss paths way different or something. The files are not the same and are not in the same places. NE help is appreciated muchly |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Thu May 30, 2002 11:44 am Post subject: |
|
|
I have the file /etc/env.d/20java which contains the following:
Quote: | # Autogenerated by java-config 0.2.0
# Cmd: /usr/bin/java-config --set-system-vm=blackdown-jre-1.3.1
JAVA_HOME=/opt/blackdown-jre-1.3.1
CLASSPATH=/opt/blackdown-jre-1.3.1/lib/rt.jar
JRE_HOME=/opt/blackdown-jre-1.3.1
PATH=/opt/blackdown-jre-1.3.1/bin
ROOTPATH=/opt/blackdown-jre-1.3.1/bin
LDPATH=/opt/blackdown-jre-1.3.1/lib/ |
as you can see it's generated by java-config --set-system-vm=/opt/blackdown-jre-1.3.1
Ooopsss JDK????? read read read.....
Well make a file in /etc/env.d yourself. This should take care of the java paths. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
|