Announcement

Collapse
No announcement yet.

bash & /etc/profile

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    bash & /etc/profile

    Had to re-install 12.04.

    Copied the /etc/profile file from the backup made just prior to re-installing.

    For some unknown (to me) reason, bash doesn't seem to have executed the complete file.

    I have appended the following lines to the end of /etc/profile for many years and they have always been picked up by bash. Now they are not being executed for some reason:

    export PATH="${PATH}":/usr/local/share/QTAwk
    export QTAWK=/usr/local/share/QTAwk
    export TZ="EST5EDT"
    export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}":/usr/lib64/

    When i execute 'echo $PATH' on the xterm command line I get:

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    i.e., the PATH without '/usr/local/share/QTAwk' appended on the end. The other variables I set are also not present.

    Have I forgotten something??

    #2
    What wrong with just using

    export PATH=$PATH:/usr/local/share/QTAwk

    i.e., leave out the quotes and braces.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Originally posted by GreyGeek View Post
      What wrong with just using

      export PATH=$PATH:/usr/local/share/QTAwk

      i.e., leave out the quotes and braces.
      It works with and wthout the quotes and braces when I issue the command on the terminal. So ther's nothing wrong without them I guess.

      But what is then puzzling is why the "export QTAWK=/usr/local/share/QTAwk" does not work in /etc/profile, but again does when I Iissue it on the xterminal command line by pasting from the editor. No quotes or braces.

      I can paste all of the lines from the editor, as is, and they work fine in the xterminal. Just not in /etc/profile. ?.?.?.?.?.?

      It would seem that /etc/profile is not being read by bash when bash is booted.

      Comment


        #4
        Does it work from ~/.profile? or ~/.bashrc?

        Did you logout and back in after coping the file? As far as I know /etc/profile and ~/.profile are only read at login and not when an interactive shell is started (such as konsole).

        Comment


          #5
          Problem fixed.

          Switched to a login terminal with "Ctrl-Alt-F3" and got an error message from bash about an unexpected 'fi'.

          sudo kate

          and found an extra 'fi' line in /etc/profile

          Deleted the line, saved the file and all works now. Cleaned up the backup files also.

          Thanks for the suggestions.

          Comment

          Working...
          X