Do you find that opening a new tab in Terminal
, or iTerm
takes a long time? Maybe 5 to 10 seconds, instead of being nearly instant?
If so, you may want to take a look at Apple’s syslog
replacement called ASL
.
ASL
stores its logs on OSX Lion, under /var/log/asl/
.
When Terminal
or iTerm
open, by default the execute:
login -fp <username>
This (for whatever reason) seems to read all of the log files under that directory. If like me you have 300Mb of rotated log files in there since your last reboot, opening a new shell can take quite a while.
I don’t know what the impact of deleting the files is, but given that they’re log files I deleted the rotated ones anyway. So far, so good! Shells open quickly again!
Thanks a lot, this was killing me. I had some AppleScrips for starting iTerm and open some tabs with webserver/db/test etc. and they failed just because iTerm was so slow starting a new session. Works like a charm again, so thank you!
You’re welcome!
Perhaps a more permanent way is this (obtained from http://superuser.com/questions/31403/how-can-i-speed-up-terminal-app-or-iterm-on-mac-osx)
For Terminal: Preferences → Startup: Change from “Default login shell” to “Command: /bin/bash -l”
For iTerm2: Preperences → General → Command: Change from “Login Shell” to “Command: /bin/bash -l”
Thanks, works like a charm!
It’s a while later – but the behavior continues.
In order to find the place to put the change in iTerm2 look in:
Preferences -> Profiles -> Command : Change from “Login Shell†to “Command: /bin/bash -lâ€