delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/24/07:22:47

X-Spam-Check-By: sourceware.org
Message-ID: <a6cc33f0511240422l6231c13ex969447648613a72c@mail.gmail.com>
Date: Thu, 24 Nov 2005 07:22:38 -0500
From: Rupert Brooks <rupe DOT brooks AT gmail DOT com>
Reply-To: rbrooks AT cyberus DOT ca
To: cygwin AT cygwin DOT com
Subject: Fwd: cygwin tools in context menus
In-Reply-To: <a6cc33f0511231356o7c7e5cacm138159ee97875a95@mail.gmail.com>
MIME-Version: 1.0
References: <a6cc33f0511231356o7c7e5cacm138159ee97875a95 AT mail DOT gmail DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019