LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How to modify the system-wide PATH (https://www.linuxquestions.org/questions/slackware-installation-40/how-to-modify-the-system-wide-path-315552/)

jayhel 04-20-2005 11:26 PM

How to modify the system-wide PATH
 
I would like to modify the system-wide path,
add :/opt/netbeans-4.0/ for example,
and make the change permanent,
so it is effective everytime I reboot the system.
What is the best and most efficient way to do this?

DaHammer 04-20-2005 11:56 PM

Edit /etc/profile

jayhel 04-21-2005 03:05 AM

Easy with Slackware. Thank you.
Same question for Mandrake 10.1...

reddazz 04-21-2005 03:07 AM

Same answer.

jayhel 04-21-2005 10:23 AM

If this method works well and as expected with Slackware, it is not the case--unfortunately and as usual-- with Mandrake.
In Slackware if I modify this line in /etc/profile:
# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games
Then the changes apply to the system-wide path and the users' path as well.
It is not the case with Mandrake!
The definition of the system-wide path is nowhere to be found in Mandrake's /etc/profile

reddazz 04-21-2005 12:03 PM

You could write a script for your new path and put it in /etc/profile.d.

jayhel 04-21-2005 08:31 PM

I think I will get rid of Mandrake once and for all

jayhel 04-22-2005 12:23 AM

I did it.
I put Slackware 10.1 disk1 in the drive. I hit reboot: adios Mandrake...
As you explained, I modified the existing script which sets the path for java in /etc/profile.d
After 5 hours of tweaking I could not have J2SE 5.0 working with Mandrake 10.1. Konqueror's VM didn't work nor Mozilla's. Why? Even with everything chmod 777. Applet loaded > freeze, no picture.
The way Java is installed is insane. It doesn't beat the way the udevs are installed, though: a monument of insanity.
With Slackware I just unlinked the old java directory from jdk1.5.0 and relinked it to the latest jdk1.5.0_02. That's it! That's all there's to do: 10 minute job including the download of Java. And everything is working. Mozilla, Konqueror's VM, etc...

reddazz 04-22-2005 03:00 AM

Thats why I like Slack, its sheer simplicity. Anyway happy Slacking:)


All times are GMT -5. The time now is 03:06 AM.