path adjustment question - Redhat

This is a discussion on path adjustment question - Redhat ; Hi, After installing a new version of Sun JDK, I want to change my $PATH which contains the old version. However, ~/.bashrc, ~/.bash_profile, /etc/bashrc and /etc/profile don't have the path in them. If I remember correctly I could do something ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: path adjustment question

  1. path adjustment question

    Hi,

    After installing a new version of Sun JDK, I want to change my $PATH
    which contains the old version. However, ~/.bashrc, ~/.bash_profile,
    /etc/bashrc and /etc/profile don't have the path in them. If I remember
    correctly I could do something like PATH = $PATH:/... and export PATH
    but I got errors on that and it's something I don't do daily...

    Thanks for helping,

    Huub

  2. Re: path adjustment question

    On Thu, 01 Mar 2007, in the Usenet newsgroup linux.redhat, in article
    <45e6eee5$0$28429$e4fe514c@dreader15.news.xs4all.nl>, Huub wrote:

    >After installing a new version of Sun JDK, I want to change my $PATH
    >which contains the old version. However, ~/.bashrc, ~/.bash_profile,
    >/etc/bashrc and /etc/profile don't have the path in them.


    No indication of release/version - no indication of how you're logging
    in to the system, or what shell you are using.

    Look at the man page for the 'ps' command, and use 'ps afuwx' to find
    out what is your login process. This would show up as the "first"
    process with your username. You are posting using some GUI browser
    instead of a news reader, so I suspect you may be using a GUI login
    (runlevel 5, not 3). If this is the case, look at the man page for the
    appropriate GUI display manager - perhaps kdm, gdm, xdm, or similar.
    These source environmental variables from an .xinitrc and/or .xsession
    file usually, perhaps in /etc/ somewhere, perhaps in your home directory.

    For a command line login (runlevel 3), the correct place depends on
    which of the many shells you are using. For the common bash shell,
    look in /etc/profile and ~/.bash_profile (or if ~/.bash_profile does
    not exist, look in ~/.bash_login, or as a last resort ~/.profile).
    Note that these files may source other files using either the '.'
    directive or the 'source' command. You would NOT use /etc/bashrc or
    the ~/.bashrc files, as these are sourced every time a shell is
    started - resulting in a runway PATH. See the man page for your shell.

    >If I remember correctly I could do something like PATH = $PATH:/... and
    >export PATH but I got errors on that and it's something I don't do daily...


    Using a text login and a bash shell, the PATH is effected by the following
    files here:

    /bin/login sets PATH to '/usr/local/bin:/bin:/usr/bin' for users
    /etc/profile PATH="$PATH:/usr/X11R6/bin"
    ~/.bash_profile PATH=$PATH:$HOME/bin

    The result is

    [compton ~]$ echo $PATH
    /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ibuprofin/bin
    [compton ~]$

    If you are using the GUI login, or are coming in via 'telnet' or 'ssh',
    your PATH will be set in different places.

    Old guy

  3. Re: path adjustment question

    > No indication of release/version - no indication of how you're logging
    > in to the system, or what shell you are using.


    Sorry, you're right..

    Using FC6, fully updated, standard GUI (Gnome), bash shell.





    > /bin/login sets PATH to '/usr/local/bin:/bin:/usr/bin' for users
    > /etc/profile PATH="$PATH:/usr/X11R6/bin"
    > ~/.bash_profile PATH=$PATH:$HOME/bin
    >


    I found that out.

    > If you are using the GUI login, or are coming in via 'telnet' or 'ssh',
    > your PATH will be set in different places.
    >


    If you suspect I'm using runlevel 5, why don't you tell about settings
    for that? Or don't you know?

    Thanks for helping out..

  4. Re: path adjustment question

    Huub <"v.niekerk at hccnet.nl"> wrote:

    >> No indication of release/version - no indication of how you're logging
    >> in to the system, or what shell you are using.

    >
    > Sorry, you're right..
    >
    > Using FC6, fully updated, standard GUI (Gnome), bash shell.




    > Thanks for helping out..


    Review this thread at linuxquestions (my post #6 in the thread):

    http://www.linuxquestions.org/questi...d.php?t=525948


    --
    Contained within the Microsoft EULA;
    This Limited Warranty is void if failure of the Product has resulted
    from accident, abuse, misapplication, abnormal use or a virus.

  5. Re: path adjustment question

    >
    > Review this thread at linuxquestions (my post #6 in the thread):
    >
    > http://www.linuxquestions.org/questi...d.php?t=525948
    >
    >


    Thank you.

  6. Re: path adjustment question

    On Sat, 03 Mar 2007, in the Usenet newsgroup linux.redhat, in article
    <45e914ae$0$6046$e4fe514c@dreader31.news.xs4all.nl>, Huub wrote:

    >If you suspect I'm using runlevel 5, why don't you tell about settings
    >for that? Or don't you know?


    Because unlike the runlevel 3 setup using /bin/login, the files are
    totally non-standardized. There are at least four different display
    managers and each seem to wish to avoid using the same configuration
    filenames - never mind following any POSIX standards. The various
    distributions have gone further and screwed with those configurations.
    Red Hat includes there own tools to further complicate matters.
    Without knowing which distribution and release (RHEL and clones
    apparently are different from Fedora and clones - never mind the
    other 350+ Linux distributions) or if you are actually coming in over
    a network connection (ssh or similar), it's a waste of time and
    bandwidth to try to guess which one might be right for you.

    Old guy

  7. Re: path adjustment question

    > a network connection (ssh or similar), it's a waste of time and
    > bandwidth to try to guess which one might be right for you.
    >
    > Old guy


    Point taken, though the fact that I post in the RedHat ng, should give
    some indication, I'd think.

+ Reply to Thread