[phenixbb] phenix.refine command line

Ben Eisenbraun bene at hkl.hms.harvard.edu
Tue Jan 29 17:08:59 PST 2013

On Tue, Jan 29, 2013 at 10:54 AM, Kip Guja <kip at pharm.stonybrook.edu> wrote:
> You need to use .profile not .bashrc on a Mac

Actually that's not true.

In the case of bash, a login shell will read /etc/profile,
~/.bash_profile, ~/.bash_login, and ~/.profile in that order. A
subshell, i.e. an interactive shell that is not a login shell, will
read ~/.bashrc.

In the traditional UNIX windowing environment of X11, the X11 session
will invoke a login shell, reading one or all of the various profile
files, and all subsequent shells started via terminal emulators and
the like will usually be subshells, which will read your ~/.bashrc.

If you look at /Applications/Utilities/XQuartz.app/Contents/MacOS/X11,
you'll see that the Xorg ported to OS X does exactly this. A snippet:

case $(basename "${SHELL}") in
    bash)          exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;

Where users get tripped up on OS X is that many of them will use
Terminal.app as their terminal emulator, and since it's not an X11
application, it uses a login shell as the default shell in its

The solution is to just follow the Bash FAQ suggestion to have your
~/.bash_profile contain:

test -f ~/.bashrc && . ~/.bashrc

Which will ensure you always pick up your base shell environment
regardless of how the shell is started.

Hopefully some of that explanation helps you, Simon, but if you're
still stuck, you can run 'bash -x' to put the shell into debug mode as
it interprets your shell start up files. It should give you some clues
as to what's going wrong. Annoyingly that option is not documented in
the manpage on this machine. Here is some additional explanation:



More information about the phenixbb mailing list