Only recently, when I launch Terminal in Mavericks, the system becomes unresponsive temporarily: the spinning wheel appears; I can still move the mouse pointer but nothing responds; if Activity Monitor is running, it doesn't update any activity; the seconds indicator of the digital clock on the menu bar stops ticking. Terminal displays 'login' on the title bar. After 5 minutes, Terminal displays 'Log in timed out after 300 seconds' and the system becomes responsive again.

I have tried the following to no avail:

  • Deleted the plist file (~/Library/Preferences/com.apple.Terminal.plist) and restarted the system. This tells me it is not due to the corrupt plist file.
  • Used another user to log-in to the system and launched Terminal. This tells me the problem is not user-specific.

I enabled Remote Login in System Preferences and logged in from another computer using SSH. I get the password prompt immediately. However, only after about five minutes, do I get a command prompt. Again, during this time, if I go back to the computer, the system is unresponsive. When I get the command prompt, I can browse and navigate the files without any delay (discarding the network latency). I am trying to use the terminal to run git commands. Perhaps, the the following is related: if I run ssh-add to add my github key, it says: Could not open a connection to your authentication agent. Before, I was able to run ssh-add without any problems.

Any idea what is going on and how to fix this?

  • Do you have anything listed in your startup scripts that might need time to run? Check the .bash_profile or .bashrc (or any other profile file for that matter) in your home directory. You said you encounter this problem with multiple users. Did you also encounter it with the guest profile? – Vincent Sep 24 '14 at 13:52
  • 1
    The problem can't be within .bashrc or .bash_profile since user3104465 checked this problem isn't user-specific. – daniel Azuelos Sep 24 '14 at 14:29
  • 1
    I have just double-checked the .bashrc and bash_profile. The former used to have ssh-add command and the latter sourced a rvm file for Ruby. I have removed those but that didn't make a difference. I have also enabled the guest login. Launching Terminal under the guest account causes the same freeze. Another thing I have noticed is the same amount of delay occurs when logging in through the log-in screen after the reboot. My guess is there is something that is causing severe delays in the log-in process. While Terminal times out, but SSH and the log-in screen don't. – user3104465 Sep 24 '14 at 14:50

After Googling and trying a few things, I have got this resolved. As described here http://hints.macworld.com/article.php?story=20100623054627388 and elsewhere, there are a lot of log files accumulated in the the /private/var/log/asl directory. I downloaded Onyx http://www.macupdate.com/app/mac/11582/onyx and used it to delete the system logs and cache files. After restarting the computer, Terminal launches quickly. There are no delays when logging in from SSH or from the log-in screen either.

The error message from ssh-add seems to be a different problem.

  • Please split the ssh-add error off into a separate question if you need it answered. – Harv Sep 24 '14 at 18:43
  • I have found a workaround for that, so I'll leave it for the time being. – user3104465 Sep 25 '14 at 22:03
  • I'd prefer a link to original Onyx webpage: titanium-software.fr/en/onyx.html – Victor Sergienko Mar 8 '18 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .