X-Spam-Check-By: sourceware.org Message-ID: Date: Thu, 24 Nov 2005 07:22:38 -0500 From: Rupert Brooks Reply-To: rbrooks AT cyberus DOT ca To: cygwin AT cygwin DOT com Subject: Fwd: cygwin tools in context menus In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jAOCMkTW019078 Hello, What i would like to do, is be able to right click on a file in Windows explorer and have a cygwin tool be avaiable either for the open, or the open with command. I've tried quite a variety of things, and i've gotten close... but so far no cigar. Heres a description of what i tried and the problems that result As an example, im trying to add gv.exe as a viewer for postscript files. 1. The straightforward approach associate gv with postscript files Problem - we get a command prompt window on the screen - if there are spaces in the path, it works, but with an x11 error message popping up. Its very wierd to me that it works at all. With text files and emacs, it does not work. 2. The seems like it should work approach - copy run.exe to rungv.exe, then associate rungv.exe with .ps files - this gets rid of the command window, as it should the problem - if there are spaces in the path, same problem as before 3. the brute force, hacked on it for an hour approach. In regedit, change the open command key to: c:\cygwin\bin\bash.exe -c "cd \"`dirname \"%1\"`\";run gv \"`basename \"%1\"`\";exit" (note that it seems to be gv, or emacs that does not like the filenames with spaces, even when quoted. Also note all the quotes to protect things against multiple layers of parsing.) Now it works on paths with spaces, but we have the stupid command window again. I needed bash because i cant figure out a way to backquote in the dos shell. (theres a bq.exe out there, but it seems broken) This seems much harder than it ought to be, andi cant escape the feeling im missing the obvious. Ive tried a few other variations on this theme too, with similar results. Has anyone got this working, or have suggestions? Any help much appreciated. Please reply directly, as i am not subscribed to the list. Rupert -- -------------------------------------------------------------- Rupert Brooks McGill Centre for Intelligent Machines (www.cim.mcgill.ca) Ph.D Program in Intelligent Systems http://www.cyberus.ca/~rbrooks -- -------------------------------------------------------------- Rupert Brooks McGill Centre for Intelligent Machines (www.cim.mcgill.ca) Ph.D Program in Intelligent Systems http://www.cyberus.ca/~rbrooks -- 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/