MacOSXLoginShell

From CARMA
Revision as of 17:40, 24 June 2011 by Teuben (Talk | contribs)

Jump to: navigation, search

On standard Unix a login shell is choosen from a valid set of shells, listed in /etc/shells. And there is a standard unix command called chsh to change your shell, but some linux distribution use a GUI frontend to change that as well. You can also find your shell in the standard file /etc/passwd, but the Mac doesn't use that file (normally). Go figure.

But the Mac doesn't seem to work this way. Not unlike Linux,there is more than one way to login or what kind of terminal program to use. But I believe that all use the same shell from /etc/passwd. Most common are the X11 xterm, and the Terminal. By default /bin/bash is your login shell, and some complex choice of .bashrc, .profile, .bashrc_profile and .bashrc_login (see the man page) will determine which one(s) are read. But whatever we tried in one situation, even using the BASH_ENV environment variable, we could NOT get matlab to have miriad available in it's login shell (/bin/bash).

Switching to /bin/tcsh caused several challenges,but at least got us around the matlab issue:

  • for X11 xterm you had to use the chsh command, but a reboot was required to really activate it. Not even kill X11, really a reboot.
  • for Terminal there's a preference option where you need to pick /bin/tcsh as the login shell. After killing Terminal, restarting did show the tcsh prompt, but despite that, $SHELL would still show /bin/bash, even after a reboot.
Personal tools