Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 27 Sep 2004 22:02:28 -0400 From: Jean-Sebastien Trottier To: cygwin AT cygwin DOT com Subject: Re: [INFO] Adding "cygwin here" to Windows Explorer Message-ID: <20040928020228.GA588@mc> References: <20040927154204 DOT GG7015 AT trixie DOT casa DOT cgf DOT cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040927154204.GG7015@trixie.casa.cgf.cx> User-Agent: Mutt/1.4.1i X-IsSubscribed: yes Note-from-DJ: This may be spam Hi guys, Just to add my 2 dimes, here's what I use: Registry: [HKEY_CLASSES_ROOT\Folder\shell\cygshell] @="Cygwin Shell Here" [HKEY_CLASSES_ROOT\Folder\shell\cygshell\command] @="c:\\cygwin\\usr\\x11r6\\bin\\run.exe /usr/bin/sh.exe /usr/local/bin/cygwin-shell-here \"%l\"" Add content of /usr/local/bin/cygwin-shell-here: #!/bin/sh cd "$(/usr/bin/cygpath --unix "$1")" shift if [ -z "$DISPLAY" ]; then exec /usr/bin/rxvt $* else exec /usr/bin/uxterm $* fi I always have DISPLAY set to :0.0 by default in the windows registry since I start the X server on boot. Also, I never use rxvt, always xterm/uxterm so I added the logic above as an example. Of course, the $* argument passing is totally wrong since rxvt and uxterm do not take the same arguments... but again, that's just an example. Since it will always start uxterm for me, that means that my preferred shell (/bin/tcsh) is used instead of bash. Cheers, Sebastien Christopher Faylor wrote: > Hughes, Bill wrote: > >Reini Urban wrote: > >> Henry S. Thompson schrieb: > >>> 1) In the registry entry: > >>> > >>> C:\cygwin\bin\rxvt.exe -fn 'Lucida Console-11' -geometry > >> 80x48 -sl 300 -cr '#8b4513' -bg '#fffff0' -e /usr/bin/bash -c > >> "XXX=\"%1\" bash --login -i" > >>> > >>> 2) In my .bash_profile > >>> > >>> if [[ "x$XXX" != "x" ]] > >>> then > >>> cd "$XXX" > >>> unset XXX > >>> fi > >>> > >>> This is a moderately embarassing/messy hack -- can anyone do better? > >> > >> I use a similar scheme since the good old b20 days. > >> Just not with the XXX name and not with a subshell. > >> (I put the $PWD arg into a temp file in the cygwin.bat > >> starter, which I > >> pickup at .profile) > >> And not for the Explorer (which I don't use), but for a > >> TotalCmd button. > >> To open some shell like bash, rxvt, ksh, 4nt in the current dir > >> (optinally specified by some dir arg). > >> A keyboard shortcut is also useful. > > > >I don't want to risk cgfs ire but, what's wrong with > > > >[HKEY_CLASSES_ROOT\Directory\shell\rxvt] > >@="rxvt" > >[HKEY_CLASSES_ROOT\Directory\shell\rxvt\command] > >@="D:\\cygwin\\bin\\run.exe rxvt -name rxvt0 -e /usr/bin/bash --login -c > >\"cd > >'%1' ; exec /bin/bash -rcfile ~/.bashrc\"" > > > >(obviously with a rxvt0 section in .Xdefaults) > > > >Which doesn't require any changes to scripts? > > > >For what it's worth (not much, I know) I think this is probably better in a > >FAQ once a canonical answer has been agreed. > > You're saying that it is better for a user to have to read: > > [HKEY_CLASSES_ROOT\Directory\shell\rxvt] > @="rxvt" > [HKEY_CLASSES_ROOT\Directory\shell\rxvt\command] > @="D:\\cygwin\\bin\\run.exe rxvt -name rxvt0 -e /usr/bin/bash --login -c > \"cd > '%1' ; exec /bin/bash -rcfile ~/.bashrc\"" > > and follow detailed instructions rather than just install a package. > > It's hard to see why. > > But, regardless, I don't see any reason to debate this. I would like a > package and would appreciate it if someone would provide one. > > cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/