MacPorts bash on Big Sur as default shell

Mike Summers msummers at newrelic.com
Thu Feb 11 13:02:17 UTC 2021


Thanks Peter, your note put me on the right track.

What I should have done was set my default shell (with chsh or Users &
Groups) to /bin/bash before installing MacPorts bash. Then the PATH tweaks
from the MacPorts bash installer fix-up the PATH and the MacPorts bash is
always invoked.

--Mike

On Wed, Feb 10, 2021 at 9:10 PM Peter West <pbw at pbw.id.au> wrote:

> I set my default shell to /bin/bash.
>
> I kept the contents of my .profile as they were, making sure to export all
> of the variables I wanted, and bracketed them with tests like so:
>
> eval profile_read=\$${USER}_profile_read
> if [ -n "$profile_read" ]
> then {
>     echo `date` "~/.profile already read" >>/tmp/$USER.init_scripts
>     return
> }
> fi
>
> …and…
>
> eval export ${USER}_profile_read=true
> echo `date` "~/.profile sourced" >>/tmp/$USER.init_scripts
>
> if [ -x "/opt/local/bin/bash" ]; then
>         [ "$BASH" != "/opt/local/bin/bash" ] && exec /opt/local/bin/bash
> fi
>
>
> Peter
>
>
>> Peter West
> pbw at ehealth.id.au
> “Martha, Martha, you are anxious and troubled about many things, but one
> thing is necessary.”
>
>
> > On 11 Feb 2021, at 7:35 am, Mike Summers via macports-users <
> macports-users at lists.macports.org> wrote:
> >
> > I'm not able to get MacPorts bash working in Terminal as the default
> shell.
> >
> > This is fresh install of Big Sur 11.2 on a new machine, fresh install of
> MacPorts. Only bash and bash-autocomplete are installed
> >
> > Setting the shell in either the Terminal preferences or for my user to
> /opt/local/bin/bash always leaves me in /bin/bash
> >
> > The "best" workaround so far is to start in zsh which has the PATH set
> correctly and exec bash from there.
> >
> > My old machine where has been through many upgrades including Big Sur
> "just works",
> >
> > I've run out of ideas, I'd appreciate pointers.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20210211/b7e0f55b/attachment.htm>


More information about the macports-users mailing list