Find the answer to your Linux question:
Results 1 to 5 of 5
I'm having difficulties adding stuff to my path. I've edited /etc/profile and added these lines: Code: JAVA_HOME=/usr/java/j2sdk1.4.2_08 CATALINA_HOME=/usr/local/tomcat OX_HOME=/usr/local/ox export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH export HISTCONTROL ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274

    PATH Problems


    I'm having difficulties adding stuff to my path.

    I've edited /etc/profile and added these lines:

    Code:
    JAVA_HOME=/usr/java/j2sdk1.4.2_08
    CATALINA_HOME=/usr/local/tomcat
    OX_HOME=/usr/local/ox
    
    export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
    export HISTCONTROL HISTSIZE
    export JAVA_HOME CATALINA_HOME PATH OX_HOME
    
    PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$OX_HOME/bin:$OX_HOME/sbin
    I know the first bit is working because I can go echo $CALATINA_HOME from a konsole and it shows the path.

    However, I can't start applications in /usr/local/ox simply by typing the name of the application from any directory. I still have to type /usr/local/ox/---application name.

    What's wrong with my path?

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    I'm not realy sure what you are doing exactly, but if I want to add anything to my $PATH I
    Code:
    PATH=$PATH:/new/path
    and if I want to keep it I put it into my ~/.bashrc file.

    Why can't you just
    Code:
    PATH=$PATH:/usr/java/j2sdk1.4.2_08/bin/:/usr/local/tomcat/bin/:/usr/local/ox/bin/:/usr/local/ox/sbin/
    and then save that in your ~/.bashrc file ?
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274
    Perfect, thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2004
    Location
    Nottinghamshire
    Posts
    2
    The PATH=$PATH:....... comes after the export PATH bit.
    Therefore the newly set PATH is not being exported.


    Or have I missed something there ?

  6. #5
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Quote Originally Posted by Boney
    The PATH=$PATH:....... comes after the export PATH bit.
    Therefore the newly set PATH is not being exported.


    Or have I missed something there ?
    Both seem to work, with or without the export.
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •