LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 10-08-2003, 03:56 PM   #1
glock19
Member
 
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510

Rep: Reputation: 31
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.
 
Old 10-08-2003, 06:20 PM   #2
truongsa
LQ Newbie
 
Registered: Oct 2003
Posts: 5

Rep: Reputation: 0
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
 
Old 10-08-2003, 06:26 PM   #3
glock19
Member
 
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510

Original Poster
Rep: Reputation: 31
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?
 
Old 10-08-2003, 11:47 PM   #4
UltimaGuy
Member
 
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840

Rep: Reputation: 31
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.
 
Old 10-10-2003, 02:42 AM   #5
wuck
Member
 
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170

Rep: Reputation: 30
Yeah, just leave the old path and simply add :/your/path to it. Symlinking is also a considerable way.
 
Old 10-17-2003, 11:29 PM   #6
glock19
Member
 
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510

Original Poster
Rep: Reputation: 31
This works when I log in directly via the console, but when I open an xterm window it doesn't work.
 
Old 11-07-2003, 10:58 PM   #7
somebodycr
LQ Newbie
 
Registered: Aug 2003
Location: Costa Rica
Distribution: Slack
Posts: 7

Rep: Reputation: 0
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!
 
Old 11-08-2003, 10:11 AM   #8
wuck
Member
 
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170

Rep: Reputation: 30
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?
 
Old 11-09-2003, 03:25 PM   #9
somebodycr
LQ Newbie
 
Registered: Aug 2003
Location: Costa Rica
Distribution: Slack
Posts: 7

Rep: Reputation: 0
Hi!

Well, it worked fine in console and X...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 01:24 AM
Modifying /etc/hosts globally (All LAN users) for loopbacking. How? ambayah Linux - General 4 08-28-2004 12:08 PM
JAVA_HOME path not set for all users tantric Linux - Software 5 03-29-2004 02:25 PM
Can't modify PATH globally for SOAP interaction... crazybio Linux - Newbie 2 12-03-2003 02:29 PM
removing path variables globally Nevetsmik103081 Linux - General 1 07-05-2003 02:17 PM


All times are GMT -5. The time now is 04:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration