Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Adding a PATH
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Wed May 29, 2002 10:33 am    Post subject: Adding a PATH Reply with quote

This is a really simple thing yet I've forgotten how to do it.

How do I add a directory to my PATH? :oops:

Thanks in advance.
_________________
Postcount ++
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Wed May 29, 2002 10:39 am    Post subject: Reply with quote

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
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Wed May 29, 2002 10:42 am    Post subject: Reply with quote

I always thought that you had to do "export PATH=(dir)" at the command line. :oops:
_________________
Postcount ++
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16108
Location: Colorado

PostPosted: Wed May 29, 2002 3:17 pm    Post subject: Reply with quote

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.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
kcsduke
n00b
n00b


Joined: 25 May 2002
Posts: 40
Location: Cambridge, MA

PostPosted: Wed May 29, 2002 9:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Wed May 29, 2002 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Wed May 29, 2002 11:37 pm    Post subject: Reply with quote

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 :D 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 :D
Back to top
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Thu May 30, 2002 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum