This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How to set default startup directory for cygwin


On 18 February 2008 14:34, Glen Mazza wrote:

> Hello,
> 
> I looked in the FAQ and could not find the answer to this question, so
> am asking here.  Whenever I start cygwin, I need to cd several levels
> down to the only directory that I care about when using cygwin.  How
> can I get cygwin to start in this particular directory by
> default...i.e., each time I start Cygwin it will be in that directory
> already?  Cygwin seems to ignore the "Start In: " option in the
> Windows Preferences for this application.

  Well not exactly, the problem is twofold:

1.  When you double-click the cygwin icon, you're invoking a batch file,
Cygwin.bat, which has the job of starting up bash, and the first thing it does
is change directory.  So cygwin doesn't "ignore" the "start in" option, but
straight away changes to somewhere else (the /bin dir) anyway.

2.  When your bash shell is launched, it changes to your $HOME dir anyway.



  Your simplest bet is probably to add "cd <whereever>" as the last line of
~/.bashrc.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]