$Path. Where can i find where my path is being set.

Discussion in 'Apple' started by Jeremy Kitchen, Jul 8, 2007.

  1. I have checked both my .bash_profile and .profile and neither sets the
    path to what its eventual value is.

    current path

    export PATH=/opt/local/bin:/opt/local/sbin:$PATH


    where is my path actually getting set?
    Jeremy Kitchen, Jul 8, 2007
    1. Advertisements

  2. Jeremy Kitchen

    Warren Oates Guest

    Warren Oates, Jul 8, 2007
    1. Advertisements

  3. Jeremy Kitchen

    Jim Guest

    Jim, Jul 8, 2007
  4. The file is write protected. If i wanted to add something to the
    profile where should I go?

    Thanks for the help so far.
    Jeremy Kitchen, Jul 8, 2007
  5. Jeremy Kitchen

    Bob Harris Guest

    you should add it to $HOME/.bash_profile

    Unless you have some unspoken need.

    Bob Harris
    Bob Harris, Jul 8, 2007
  6. Jeremy Kitchen

    Jim Guest

    sudo vi /etc/profile
    Jim, Jul 8, 2007
  7. Jeremy Kitchen

    Jim Guest

    I hate hitting send before I'm finished.

    Use the above if you want the change to be global for all users.
    Otherwise edit ./.bash_profile
    Jim, Jul 8, 2007
    Jeremy Kitchen, Jul 9, 2007
  9. I suppose I'll try. I was hoping to avoid that. I'm new to the open-
    sourced world and I just want to get GIMP installed.

    I'd still like to figure out what i'm doing wrong though.

    Jeremy Kitchen, Jul 9, 2007
  10. Jeremy Kitchen

    Dave Seaman Guest

    Dave Seaman, Jul 9, 2007
  11. yes they do not show up

    the env file is my poorly worded attempt to say that was the output of
    the env command

    Jeremy Kitchen, Jul 9, 2007
  12. I think the OP's question has been answered, but having been faced
    with the same question many times in the past, I have a more generic

    How can one determine where the path is actually being set?

    By this stage, I know of the existence of /etc/profile, .bashrc, et
    al, but in many circumstances remembering the culprit among various
    scenarios is difficult. For example, non-login shells have a
    different sequence, as do X shells and remote shells. Short of
    reading the various man pages, I wondering if there is a less
    "shotgun" style approach. I'd really love for someone to reveal
    a callstack equivalent for shell scripts.
    Heath Raftery, Jul 9, 2007
  13. Jeremy Kitchen

    Warren Oates Guest

    I'd forgotten about this. I have a .bash_profile that only has this in

    source .bashrc

    and then .bashrc has this (among other stuff):


    which sets stuff up nicely, including X-terms. There are some obscure
    historical reasons for the two files.
    Warren Oates, Jul 9, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.