Tommy Kelly wrote:

> > I know this is probably a dumb question, but how do you add a directory to the
> > path....  For instance, instead of going to /root/mozilla/ to run ./mozzila,
> > I would like to be able to type ./mozilla in any directory.
>
> To add the directory to your path, add the following to your
> .bashrc file, in your home directory:
>
>         PATH="/root/mozilla:$PATH" ; export PATH
>
> Then, at your shell prompt type:
>
>         . ~/.bashrc

That's not always a good idea, depending on what's in ~/.bashrc.  If there are only
aliases and other benign defintions, then this isn't a problem; however, some
people use this startup script for things which could potentially cause problems if
resourced, sometimes.  One way around that is to use conditional programming, but
this should be rarely needed for this file.

However, why would a program like mozilla be installed under root's home directory,
instead of one of the system bin directories?  I'm not familiar with mozilla,
except for what I believe is some relationship with netscape; therefore, I'm asking
for myself, but also to help this knowledge or the answer to be understood by other
people new to mozilla.

Is mozilla a separate rpm, or does it come with the netscape RPM(s), or what?
Usually, RPMs aren't installed under any  user's home directory; although,
configuration files and directories often go there, like for the ~/.netscape,
~/.kde, ~/.seyon and other directories.  These are only for individual
configuration, though.

I'm not prepared to deal with mozilla yet and still use netscape 4.05, until
finishing the upgrade of my system, or somewhere along this path, but because of
the odd nature of installing such executables under home directories, this question
may be worthwhile for many newbies.  Of course, I'ld also be learning in advance
(have definitely fair memory).

mike


>
>
> (You only have to do this second step once, and even then only
> in the xterm or session in which you change the .bashrc file.
> Any new xterms or logins will do it automatically.)
>
> You can then run:
>
>         mozilla
>
> from anywhere.
>
> Note that I have removed the inital "./" from the command.
> If you do type:
>
>         ./mozilla
>
> then your $PATH variable is ignored and you will attempt
> to run the "mozilla" command from directory "./", that is
> your current directory.  And if no executable of that name
> can be found in that directory you'll get something like:
>
>         ./mozilla: Command not found.
>
> t



Reply via email to