Remote Shell Extension
Tue Jul 11 06:42:00 GMT 2000
This is great!
On Tue, 11 Jul 2000, Gunnar Degnbol wrote:
> I assume the location of the xfree libraries (x11.dll and xext.dll) is
> %systemdrive%\usr\x11r6\bin. I am not sure how safe that is, or if there is
> a better way to guess the location ?
While inside a cygwin shell, /usr/X11R6/bin is the correct place for the X
dll's. %systemdrive% is not the right way to find `/', though.
(I could be wrong here...the install location may be more restricted than
I realize. The rest of this message assumes that `/'==`%systemdrive%'
isn't general enough and would be more ontopic at the regular cygwin
Not sure how extensive your cygwin background is. Bear with me if I
assume too little or too much...
The location of cygwin's `/' is stored in the mount table, which is stored
in the registry. One option is to read it out of the registry. Note that
you need to check both local_machine and current_user, and check for
/usr/X11R6 and /usr/X11R6/bin as well as plain `/'.
Or, probably better, is that you can use cygwin's `mount' command to get a
textual description of this info. Advantage here is that you know mount
can parse the registry info, and will still be able to if the format ever
changes. Disadvantage is that you have to be able to find mount.exe in
order to run it...back to the original problem.
Cygwin also has system calls that convert between it's paths and windows'
paths. But, again, you'd need to already know where the cygwin dll is.
And you'd then be restricted under the terms of cygwin's license.
I've dealt with the issue of finding cygwin's root for another
non-cygwin...for NTemacs. My solution there is to simply run emacs from
within a cygwin shell, but that doesn't won't work for you.
Perhaps your best bet is to read the mount table out of the registry? By
doing it this way, people who install cygwin in a non-default place (like
another drive with more free space...common around here) or who switch
between multiple cygwin installations can still use your tool.
hope this helps,
More information about the Cygwin-xfree