Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-08-2003, 02:56 PM
|
#1
|
Member
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510
Rep:
|
Globally set PATH for all users
How do I make it so that all users have the directory to the java binary in their path?
I am using Red Hat 9. I looked in the /etc/profile file, but it looks like a big scary script file to me, and I'm scared to touch it.
Would anyone help, please? Thanks.
|
|
|
10-08-2003, 05:20 PM
|
#2
|
LQ Newbie
Registered: Oct 2003
Posts: 5
Rep:
|
Hi,
Here is the way I did which seems to work on my Redhat 9 system:
open /etc/profile file
just before the line export PATH USER LOGNAME...., and one line:
PATH=$PATH:/sbin:..... <-- add your path here, separate by ":"
hope it help
|
|
|
10-08-2003, 05:26 PM
|
#3
|
Member
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510
Original Poster
Rep:
|
Quote:
Originally posted by truongsa
just before the line export PATH USER LOGNAME...., and one line:
PATH=$PATH:/sbin:..... <-- add your path here, separate by ":"
|
Do I need to put the entire PATH statement, or just the part that I want to add?
|
|
|
10-08-2003, 10:47 PM
|
#4
|
Member
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840
Rep:
|
Just put the part you have to add, and it will work. You can also try making soft links for the java binaries in your /bin directory.
|
|
|
10-10-2003, 01:42 AM
|
#5
|
Member
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170
Rep:
|
Yeah, just leave the old path and simply add :/your/path to it. Symlinking is also a considerable way.
|
|
|
10-17-2003, 10:29 PM
|
#6
|
Member
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510
Original Poster
Rep:
|
This works when I log in directly via the console, but when I open an xterm window it doesn't work.
|
|
|
11-07-2003, 09:58 PM
|
#7
|
LQ Newbie
Registered: Aug 2003
Location: Costa Rica
Distribution: Slack
Posts: 7
Rep:
|
Hi everybody!
I had the same problem, and what I did to fix it was this:
after this reference to the fist function:
pathmunge /usr/X11R6/bin after
i put this:
PATH= $PATH:/usr/java/j2sdk1.4.1_01/bin
where /usr/java/j2sdk1.4.1_01/bin is the Java path
I hope it can help!
|
|
|
11-08-2003, 09:11 AM
|
#8
|
Member
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170
Rep:
|
Quote:
Originally posted by glock19
This works when I log in directly via the console, but when I open an xterm window it doesn't work.
|
Are the X paths different?
|
|
|
11-09-2003, 02:25 PM
|
#9
|
LQ Newbie
Registered: Aug 2003
Location: Costa Rica
Distribution: Slack
Posts: 7
Rep:
|
Hi!
Well, it worked fine in console and X...
|
|
|
All times are GMT -5. The time now is 09:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|