4

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?

2 Answers 2

8

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.)

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

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.

1
  • In my Cygwin installation, home is /home/myName/, while the Windows 7 home is /Users/myName.
    – bastibe
    Sep 1, 2010 at 6:10

You must log in to answer this question.

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