Friday, May 3, 2013

Slow Startup of Cygwin Bash

When on Windows, I never use another terminal/shell than MinTTY/CygWin Bash. So I was heavily harmed by a problem that started quite some time ago: Suddenly, when I opened MinTTY, it took 10 seconds or so, before the bash prompt became visible. Today, I finally discovered the culprit by reading another post. As you posssibly know, there is a directory /etc/profile.d containing scripts that are executed when a login shell is starting. Now, one of these scripts, called is extremely slow. You can try for yourself:
$ time . /etc/profile.d/

real    0m8.908s
user    0m1.402s
sys     0m7.310s

In other words, solving the issue for me was as simple as renaming this script:
$ mv /etc/profile.d/ /etc/profile.d/
Voila! My MinTTY opens immediately again. Update: The above time command is only slow when the script is being executed for the first time. In other words, if your bash was starting slow due to executing it, then you might see a result like this:
$ time . /etc/profile.d/

real    0m0.000s
user    0m0.000s
sys     0m0.000s


Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

I constantly emailed this blog post page to all my associates, for the reason that
if like to read it then my friends will too.

Feel free to surf to my web page :: Related Site

Anonymous said...

Gooԁ day! This іs my first visіt to your blog!
We are а tеam of volunteers anԁ ѕtагting a new projеct in а community іn the same nichе.
Your blog proѵided us useful informаtion to work on.
You haѵe ԁone a wondеrful јob!

my website ::

Anonymous said...

I'm sorry, i one more question. Which makes the greatest menthol e liquid?

Feel free to visit my web page :: green Smoke official website