Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 7 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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.