Re: Where is PATH stored these days ? Why isn't .bash_profile executed in F35 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11Jan2022 15:32, linux guy <linuxguy123@xxxxxxxxx> wrote:
>Comments below.  Thanks for such a comprehensive answer.
>- when you start a terminal it may or may not run a login shell; this
>>   can be controlled with the settings for your terminal emulator. What
>>   are you using?
>
>Konsole.  According to its settings, it runs /bin/bash when it starts up.

If that setting is a command string, try changing it to:

    /bin/bash --login

>OK, so there is my issue.   ~/ does not have a .bashrc.   I has
>.bash_profile only.

I would put env settings in .bash_profile myself.

>> These days you can often get away with making every new terminal run 
>> a
>> login shell. Look into that setting first up - it is the easiest fix.
>
>Doesn't appear to be editable in Konsole, though maybe I could specify it
>as a parameter to /bin/bash that gets executed at startup.  Haven't tried
>that yet.

See above.

>Here is my .bashrc:

Thought you didn't have one of these?

>#########################################################################
># .bashrc
[... stock presupplied .bashrc, seems reasonable ...]

>Here is my .bash_profile:
>
># .bash_profile
># Get the aliases and functions
>if [ -f ~/.bashrc ]; then
>       . ~/.bashrc
>fi

This is because bash runs the .bash_profile xor .bashrc (login vs 
interactive, not both). So having your .bash_profile source .bashrc is 
usually sensible. I do that last, at the bottom. Given that .bashrc is 
for the "interactive" stuff I test $- (the shell mode options). My 
~/rc/shell/rc mentioned earlier goes:

    #!/bin/sh
    : ${SHDIR:=$HOME/rc/shell}
    case "$-" in
      *i*)▸ . "$SHDIR/rc.real" ;;
    esac

i.e. only both with all that stuff (and there's a _lot_ of stuff :-) for 
an interactive shell (has the "i" option).

>> If your terminals run login shells, opening a new terminal will do. 
>> For
>> that terminal, of course.
>>
>> Or you can source your .profile (or separate script):
>>
>>     . ~/.bash_profile
>>
>
>Right.  This doesn't seem to be working for me.

Odd. Try this:

    set -x; . ~/.bash_profile; set +x

should show what's happening, or not happening.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux