title: Converting from rxvt login batch to mintty in cygwin
body: <p>Here is my cygwin.bat file for starting a cygwin terminal window via rxvt.</p>
  
  <pre><code>@echo off
  
  C:
  
  set PATH=%PATH%;C:\cygwin\bin
  
  REM SHELL needed for any screen instances started from bash
  set SHELL=/bin/bash
  set HOME=C:\cygwin\home\Dragos
  set HOMEDRIVE=C:
  set HOMEPATH=\cygwin\home\Dragos
  
  REM This part is for chere generated context menu item "Open Bash shell here"
  REM 
  if not [%1]==[] (
    C:\cygwin\bin\cygpath %1 &gt; tmpFile
    set /p startingpath= &lt; tmpFile
    del tmpFile
  )
  
  if "%startingpath%"=="" C:\cygwin\bin\rxvt --loginShell -sr
  if not "%startingpath%"=="" start C:\cygwin\bin\rxvt --loginShell -e /bin/bash --login -c "cd '%startingpath%'; exec /bin/bash -rcfile ~/.bashrc"
  exit
  </code></pre>
  
  <p>I would like to switch from rxvt to mintty but I do not want to lose the ability to open a cygwin terminal cd'd to that path when right-clicking on a folder and selecting "Open Bash shell here". The default mintty command out of the box is</p>
  
  <pre><code>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
  </code></pre>
  
  <p>I did </p>
  
  <pre><code>man mintty 
  </code></pre>
  
  <p>but all I see that is the equivalent of rxvt --loginShell -e option in mintty is --exec.</p>
  
  <p>Is there a way to pass my preferred login shell (bash) and some additional params to mintty the same way I passed them to rxvt above?</p>