Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have a starter in the Windows 7 taskbar that starts Cygwin, then starts mintty and then ideally navigates to /cygdrive/c/Users/myName/

I guess this should be possible using some unholy combination of batch files and shell scripts. Could you help me there?

share|improve this question
up vote 8 down vote accepted

You can just create a mintty shortcut, with these settings:

Target: C:\cygwin\bin\mintty /bin/env CHERE_INVOKING=1 /bin/bash -l
Start in: C:\Users\yourName

No scripts required. Setting CHERE_INVOKING stops /etc/profile from changing directory to $HOME. (That variable comes from the 'chere' package.)

share|improve this answer
    
Good answer. Note, however, that this ignores the shell is defined in /etc/passwd for the current user. – Andreas Spindler Jan 23 '13 at 19:32
    
C:\cygwin64\bin\mintty /bin/env CHERE_INVOKING=1 /bin/bash -l – zzapper Apr 30 '14 at 14:54
    
It might be worth noting that you mintty can be found in /cygwin/bin. – Mike H-R Oct 2 '14 at 16:29

Humm, I do not know what starting Cygwin is.

According to Cygwin FAQ (http://cygwin.com/faq/faq-nochunks.html#faq.setup.home), if you have %HOME% properly setup in Windows (IIRC, in W7 it defaults to \users\%USER_NAME%, UNIX $HOME is set to the same directory. And most shells start with cwd $HOME.

share|improve this answer
    
In my Cygwin installation, home is /home/myName/, while the Windows 7 home is /Users/myName. – bastibe Sep 1 '10 at 6:10

You must log in to answer this question.

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