Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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-10-2004, 12:31 AM
|
#1
|
Member
Registered: Nov 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora
Posts: 67
Rep:
|
Modifying the PATH environment variable
Hi all!
I'd like to know how can I change the value of the PATH environment variable in a way when I close the terminal it keeps the value assigned by me? I thought if I change the previous value and then export it, it would be ready to be used whenever and wherever I want (even rebooting the system). But what really happens is that it only works in the current terminal session.
And how can I add a string to the PATH of all users?
Appreciate all your help and attention!
Regards,
Brunno
|
|
|
10-10-2004, 12:37 AM
|
#2
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
export an environment variable only sets it for that process and child-processes. One way to get it to work for ALL terminals is to export it every time. There is a file that gets run every time you open a xterm and that's the ~/.bash_profile or ~/.bashrc file. Just add your commands to set and export your PATH there.
Thought I'll rant a bit more today.... Feeling a little long winded.
eg
Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
export PATH=/somebin
Last edited by mirradric; 10-10-2004 at 12:55 AM.
|
|
|
10-10-2004, 12:41 AM
|
#3
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
oh... for all users...
add it to /etc/profile or /etc/bash.bashrc instead
|
|
|
10-10-2004, 12:52 AM
|
#4
|
Member
Registered: Nov 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora
Posts: 67
Original Poster
Rep:
|
Tks a lot, mirradric, for your so helpful info!
But and if I want to change the PATH value just by double clicking an icon in the KDE desktop. Let me make myself clear: the problem is that I would like to run the java's Eclipse IDE, so I installed the Java SDK. When I tried to start Eclipse by double clicking its icon, it shows me a message saying it was not possible to find the java sdk bin directory in the PATH.
As you can see, I am not supposed to use the xterm everytime I want to run Eclipse... or I do have to?
Tks again!
Brunno
|
|
|
10-10-2004, 01:00 AM
|
#5
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Have you tried exporting your path in /etc/profile? You might have to log out an log in. See if it works. Haven't used kde for a long time and never had to do custom path for kde. (i'm used to the cli...) Don't have KDE installed so can't test.
|
|
|
10-10-2004, 01:02 AM
|
#6
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Oh... another way i to create links to the java executables (java, javac ....) in your path (eg. /usr/local/bin ) In fact you might want to do the same for the java manpages as well.
|
|
|
10-10-2004, 01:31 AM
|
#7
|
Member
Registered: Nov 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora
Posts: 67
Original Poster
Rep:
|
mirradric,
I exported the JDK bin path in /etc/profile and it works perfectly!
I also like the idea of creating links in the /usr/local/bin directory!
Tks again!!!
Brunno
Last edited by brunnopessoa; 10-10-2004 at 01:37 AM.
|
|
|
10-10-2004, 11:01 AM
|
#8
|
Member
Registered: Nov 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora
Posts: 67
Original Poster
Rep:
|
Sorry, but what do you mean by saying "in fact, you might want to do the same for the java manpages", when you cited the creation of links in /usr/local/bin? The java sdk contains manpages? Could you give a tip on it? Generally, what are the names of these manpages files?
Tks!
|
|
|
10-10-2004, 11:35 AM
|
#9
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Yes, if I didn't remember wrongly sun's sdk come with manpages for the tools.
I meant that you can create the links for the manpages in /usr/local/man/man1 .
|
|
|
10-11-2004, 10:46 PM
|
#10
|
Member
Registered: Nov 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora
Posts: 67
Original Poster
Rep:
|
Thank you very much, mirradric! I set the java man pages links and seem to be working very well!
|
|
|
11-03-2004, 04:36 PM
|
#11
|
Member
Registered: Oct 2004
Location: Costa Rica
Distribution: Mandrake 9.1
Posts: 30
Rep:
|
Hi there, as you can tell, i just started using linux. My disto's mandrake 9.1. Y have tried installing limewire but it tells me this:
[rafa@00e0295c9f23 Installers]$ sh ./LimeWireLinux.bin
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
No Java virtual machine could be found from your PATH
environment variable. You must install a VM prior to
running this program.
[rafa@00e0295c9f23 Installers]$
Now, i have installed java and linked mozilla with java. Applets now run in my browser. I've checked it. How do i tell the limewire installer that java is installed? I've read something about the bashrc file that i had to modify in order to get java working. Here is the text inside this file:
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:/usr/java/j2sdk1.4.2_01/jre/bin:
JAVA_HOME=/usr/java/j2sdk1.4.2_01/jre/bin
export PATH
export JAVA_HOME
What am i missing? Or is this bashrc file wrong?
Last edited by sheds; 11-03-2004 at 04:38 PM.
|
|
|
11-03-2004, 10:23 PM
|
#12
|
LQ Newbie
Registered: Oct 2004
Location: East Bound and Down
Distribution: mdk
Posts: 7
Rep:
|
I actually got it all working Limewire and all, but found lime to do some crazy stuff to my network, bandwidth hogging. It does it with all OS's so be careful. I can't recall how I got it to install and work sorry.
|
|
|
All times are GMT -5. The time now is 01:19 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
|
|