[Wlug] newbie question: path
Brett Russ
bruss at alum.wpi.edu
Sun Sep 24 11:24:12 EDT 2006
On 9/23/06, d.maly at ieee.org <d_maly at charter.net> wrote:
> Should be able to figure this out with a little homework, but can't!
>
> Can't figure out where I define my "default paths." That is, if I check
> the properties of my 'Evolution' icon on my desktop, the Launcher gives
> this for the command: "evolution-2.6"
>
> Presumably, the path for this application is defined in a list of
> 'default paths.' How do I change my default paths?
Here's how to find out. First, figure out what shell you're using
with this cmd from a console or shell window:
grep `whoami` /etc/passwd
The rightmost executable is the shell you're using. Mine says
/bin/bash. So next use this command, substituting your shell:
man bash
And search for "path" by using the '/' key. What you'll find is that
the shell reads system wide default config files located in /etc and
then reads config files in your home directory, if present, which can
override the system wide settings.
In bash, you could override the PATH environment variable by adding a
line like this to your ~/.bash_profile file:
PATH="$PATH:/my/custom/directory"
to add /my/custom/directory to the search path. Note that I put it
*after* the system default path. Putting non-standard directories
before standard directories is a security risk because a
non-priviledged user could put a malicious program in the non-standard
directory and it would be found before a legitimate program of the
same name in a standard directory.
Hope this makes sense,
BR
More information about the Wlug
mailing list