This is the mail archive of the cygwin@cygwin.com 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: Bash Here - Start Cygwin from a folders context menu


On Tue, 28 May 2002 09:08:40 -0500 David T-G <davidtg-cygwin@justpickone.org> wrote:

> Michael --
> 
> ...and then Michael Hoffman said...
> % 
> % On Mon, 27 May 2002, Martin Gramatke wrote:
> % 
> ...
> % > The three installation steps, as described at the end of this
> posting,
> % > works but it is not perfect.
> % 
> % You might have better results with the attached registry file. You
> need to
> 
> It sounds quite cool.  I'd like to try it myself.  I'll need to poke at
> it a bit, though; for one thing, I don't have rxvt.
> 
> Unfortunately, I can't read it :-)  Can you repost it in .ini format?

David,

This has come up often enough that a FAQ entry probably would be
worthwhile.

For complete coverage, commands are needed for both Directory and
Drive  The commands also need to be modified if the executable isn't in
c:\cygwin\bin\.  Because of the extra 'exec' call these startups are
slightly slower than some of the other suggestions, but no changes are
needed in cygwin.bat or /etc/profile.

I am not the original source of the command lines, but I no longer recall
who posted them to cygwin@cygwin.com.

I don't use rxvt.exe myself.  I have made sure the commands below actually
start it, but there are probably better options available for rxvt.exe.

=======

How do I add Cygwin to folder context menus?

To have Windows Explorer start a Bash console or rxvt window in any
directory, save the. following lines to a file with a .reg extention,
change the command lines to point to where bash.exe and rxvt.exe are
installed, and run the file.

You can change the string that appears in the context menu by changing
"&Bash This" or "rxvt Here" to your prefered string.  The character after
'&' is the shortcut key for the command.

Run 'man rxvt' to see the options available for customizing the rxvt
window.

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\BashHere]
@="&Bash This"

[HKEY_CLASSES_ROOT\Directory\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

[HKEY_CLASSES_ROOT\Drive\shell\BashHere]
@="&Bash This"

[HKEY_CLASSES_ROOT\Drive\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

[HKEY_CLASSES_ROOT\Directory\shell\rxvt]
@="rxv&t Here"

[HKEY_CLASSES_ROOT\Directory\shell\rxvt\command]
@="C:\\cygwin\\bin\\rxvt.exe -bg black -fg white -sr -sl 1000 -fn \"Fixedsys\" -ls -e /usr/bin/bash --login -c \"cd '%1'; exec /bin/bash -rcfile ~/.bashrc\""

[HKEY_CLASSES_ROOT\Drive\shell\rxvt]
@="rxv&t Here"

[HKEY_CLASSES_ROOT\Drive\shell\rxvt\command]
@="C:\\cygwin\\bin\\rxvt.exe -bg black -fg white -sr -sl 1000 -fn \"Fixedsys\" -ls -e /usr/bin/bash --login -c \"cd '%1'; exec /bin/bash -rcfile ~/.bashrc\""

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]