I recently made changes to my /etc/profile, and afterwards when I open a new tab in iTerm or Terminal I don’t get a prompt. I tried reverting the changes in /etc/profile to the way I thought they were before – using Vim’s undo – but I still don’t get a login prompt, I just get a blank screen with a blinking cursor in the top left corner. I tried logging in as a different user, and the other user has the same problem, so I think the error is in the global bash login. /etc/motd doesn’t run, but I’m not sure about the other files. Normally I would restart the computer but I have one shell that works and I’m hesitant to lose it by restarting the computer. Is there anywhere where an error would be logged? Thanks for your help,
Kevin
Here’s my /etc/profile:
#put this in to try and debug, but does not show on the screen
echo "hello"
export PYTHONPATH=/Library/Python/2.6/site-packages:$PYTHONPATH
# System-wide .profile for sh(1)
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
fortune
I accidentally closed the window, and after I did I tried restarting the computer. When I logged back in the prompt displayed properly. Thanks for the help in the meantime.