This is the mail archive of the cygwin 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]

Fwd: cygwin tools in context menus


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]