Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've had some issues with my terminal being extremely slow while starting up (both new windows and new tabs), from 10 seconds and up. I've tried deleting the Apple System Logs, but it doesn't help.

Today I hit Ctrl+C while it was starting and the following was output:

/usr/local/Library/Homebrew/global.rb:65:in ``': Interrupt
from /usr/local/Library/Homebrew/global.rb:65
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10

This obviously makes me think homebrew is doing something fishy that makes things slow down. I get the same message whenever I hit Ctrl+C during startup, whether it's after 1 second or 14, so I'm assuming it's the same process that's running for the whole time.

My google searches on this issue came up empty, so I'm throwing it out there and hoping for the best.

Does anyone know how to remedy this?

share|improve this question
    
The great question would be why homebrew gets started with terminal in first place. –  bdecaf Sep 18 '12 at 11:59
    
Start Terminal, enter cd;open .profile you will get (hopefully) the TextEdit.app, add set -x to the top of the file. Save and open an new Terminal window - you will get what is bash doing at the startup... –  kobame Sep 18 '12 at 12:06
    
I've added "set -x" to my .profile, but I can't see anything different when I'm starting my terminal. –  Oskar Eriksson Sep 18 '12 at 21:02

2 Answers 2

up vote 1 down vote accepted

Finally figured it out. My .bash_profile had about 100 lines like this one:

source "`brew --prefix grc`/etc/grc.bashrc"

I removed all but one and it's fast and snappy again.

share|improve this answer

Make sure you do not have this line in you bash profile

echo 'source "`brew --prefix grc`/etc/grc.bashrc"' >> ~/.bash_profile

It adds that line every time you open a terminal window.

share|improve this answer
1  
Welcome to Super User! Your post needs to be expanded. A good answer includes specific instructions (not just links to them) and an explanation as to how or why the answer addresses the OPs question. Please edit your post to adequately address both of these elements. –  Twisty Jun 5 at 19:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.