I’ve had this problem sporadically with iTerm on my Mac, and I seem to remember this happening recently on my Linux machines as well. If you have this problem, try this:
$ export TERM=linux
If this works, on a Mac you can set it in your .profile:
if [ "${TERM_PROGRAM}" == "iTerm.app" ]
then
export TERM=linux
fi
On Linux, you can do the same, but leave out the if and just do the export line.
I also noticed that when I started Terminal or iTerm, it took forever. First it took forever for the window to even appear, and then when it did the “last login” line would appear, pause, and then about 30 seconds or more later, the prompt would finally appear and you could use the terminal normally.
I searched the web all over for help on this and did a few maintenance things, but nothing helped. One person online found the solution to their problem by running ‘top’ and watching the login process, but nothing out of the ordinary was happening on my machine.
Then it dawned on me: The exact same thing happens on my Linux machines when the LDAP settings aren’t working correctly, because the LDAP timeout defaults to around 30 seconds.
So I started Directory Access, and sure enough, there was an LDAP server listed under the Authentication tab. I had recently added the same server for the Contacts tab, but I didn’t expect or want to use it for authentication.
Removing the LDAP server cleared up my slow logins and terminal starts, so make sure you check Directory Access if you are having a similar problem.