Re: Using multiple download mirrors in Cygwin setup.exe

2014-02-28 Thread carolus

On 2/22/2014 9:32 AM, carolus wrote:

When multiple mirrors are selected in setup.exe, if a server becomes
unresponsive should the program automatically roll over to another
server and continue? When it does, should it avoid repeating previous
downloads?





answered: http://cygwin.com/ml/cygwin/2014-02/msg00730.html


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: new setup.exe - another problem, or is this behavior expected?

2014-02-28 Thread carolus

On 2/27/2014 5:36 PM, Larry Hall (Cygwin) wrote:
, if you start one session of setup, select a

package, download it, and don't install it (for whatever reason), then
start another setup session and do the same thing with a with a different
mirror, you'll get the same package again under a different directory tree
(the root of that tree being loosely named after the mirror you chose).


Does this mean that install-from-internet is a better choice than 
download-without-installing when the connection is apt to be broken? Or 
for combining several overnight runs to cope with a slow connection? 
Currently I'm downloading to an external USB drive which I then use to 
reinstall Cygwin on several machines.


And thanks for the explanation.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



new setup.exe - another problem, or is this behavior expected?

2014-02-27 Thread carolus
On my last download, a few days ago, when the initial server became 
unresponsive, the setup process simply hung up even though I had 
selected several alternate servers.  After waiting a while, I terminated 
and restarted the process but again the process hung up.  I had to 
remove the offending server from the selected list to get the download 
to proceed.  However, when I did so, it downloaded a lot of duplicates 
of files already downloaded from the failed server.


This is not what I expected on the basis of past experience, but the 
installation instructions simply state: You can select multiple mirrors 
by holding down CTRL and clicking on each one. with no explanation of 
the expected consequences.


I asked for an explanation but have gotten no response: 
http://cygwin.com/ml/cygwin/2014-02/msg00596.html



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Using multiple download mirrors in Cygwin setup.exe

2014-02-22 Thread carolus
When multiple mirrors are selected in setup.exe, if a server becomes 
unresponsive should the program automatically roll over to another 
server and continue? When it does, should it avoid repeating previous 
downloads?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: g77 on cygwin64

2014-02-12 Thread carolus

On 2/12/2014 9:07 AM, Scott T. Marshall wrote:

My colleagues have no interest in fixing it since they have g77 on their
unix machines, and to them, it isn't broken.


Perhaps your colleagues would be willing to look at your results and 
tell you whether there is a trivial fix for your problem.  gfortran is 
quite compatible with g77, and since g77 is no longer maintained, your 
colleagues will also have to replace it sooner or later.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-10 Thread carolus

On 2/10/2014 10:14 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

My suggestion was not an exact recipe, it was just a scheme.

Here the exact step-by-step procedure.  I've checked it works on my Windows 7 
box.

 From the Windows Start menu, in the Search box at the bottom
(formerly called Run) enter (substituteYourUserName  with whatever
ID you are going by on that Windows system):

C:\Users\YourUserName\AppData\Roaming\Microsoft\Windows\SendTo

In the opened Explorer window, right click on unoccupied space on the right hand
pane, select New-Shortcut.

As prompted for Location, enter (I assume your Cygwin installation is
at C:\cygwin):

C:\cygwin\bin\mintty.exe -e C:\cygwin\bin\bash.exe -l /bin/vim.sh

click Next, when prompted for the name, enter Vim,
close the dialog with Finish.

In Cygwin's window:


cd /bin
catEOF

#! /bin/sh
exec vim -- `cygpath -u $1`
EOF

chmod a+x vim.sh


Now you can check whether it work by going to C:\cygwin\ in Windows
Explorer, right-clicking Cygwin.bat, and using Send To with Vim.

HTH,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


Now working correctly except that it requires an administrative password 
to run mintty. The message looks like the one you get when installing 
new software.


I think permissions on vim.sh are OK:
-rwxr-xr-x 1 cdr None 36 Feb  9 22:22 vim.sh*



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-10 Thread carolus

On 2/10/2014 11:41 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

an administrative password to run minty


That's new to me.  My PC at work (despite being secured with tons and tons
of Gov't restrictive policies) does not require any additional permissions
to run a command incorporated in the shortcut file...



On this computer the default is the old cygwin console, and I find now 
that any attempt to run mintty requires an administrative password. So 
that is a different problem.  Thanks for solving the original problem.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-10 Thread carolus

On 2/10/2014 8:34 PM, Andrey Repin wrote:

Just

C:\Programs\CygWin\bin\mintty.exe --exec /bin/vi.exe

is enough.



or in my case

C:\cygwin\bin\mintty.exe --exec /bin/vim-nox.exe

Thanks



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-10 Thread carolus

On 2/10/2014 8:41 PM, Andrey Repin wrote:


@carolus, navigate to your Cygwin installation /bin, locate mintty.exe, bring
up it's properties and remove the Requires admin powers checkbox on
Compatibility tab.
Confirm your changes, and it should work fine from now on.



Done, works OK now. This is not a problem on my other computer, which 
has a more recent installation of Cygwin.  Thanks.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/8/2014 11:09 PM, Andrey Repin wrote:

Greetings, carolus!


Is there some configuration that will let me open a text file in Cygwin
vim by clicking on the file in an Explorer window?


There's like 5 ways to do it.
What you've tried already and what your results so far?



I don't know how to pass the filename and directory from an Explorer 
left-click to a Cygwin shell script. (I'm not a programmer, just a dumb 
engineer.)





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 8:37 AM, Andrey Repin wrote:

Greetings, carolus!


Is there some configuration that will let me open a text file in Cygwin
vim by clicking on the file in an Explorer window?


There's like 5 ways to do it.
What you've tried already and what your results so far?




I don't know how to pass the filename and directory from an Explorer
left-click to a Cygwin shell script. (I'm not a programmer, just a dumb
engineer.)


So, vim or shell script?...


If there is no simple answer, let's just drop the subject.  I'll 
continue to open cygwin and cd to the target directory whenever I want 
to open a file in vim and happen to be in Explorer.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 11:35 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

If there is no simple answer,


Maybe not as simple, but...

What about adding a Vim destination to your Send To... folder
under your Windows profile?


Thanks, but maybe not simple enough for me.  I find a SendTo shortcut 
under my username, but can't open it.  Right clicking does not give me 
an administrator option.  As you can see, I don't know much about 
Windows, which is why I like Cygwin.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 2:07 PM, Andrey Repin wrote:

Greetings, carolus!


Is there some configuration that will let me open a text file in Cygwin
vim by clicking on the file in an Explorer window?




If there is no simple answer, let's just drop the subject.  I'll
continue to open cygwin and cd to the target directory whenever I want
to open a file in vim and happen to be in Explorer.


As I said, there's like five different answers. Depends on what you actually
want to do.


  To clarify:  In Cygwin folders I routinely use vim for all text 
files, and in Windows folders I routinely use Wordpad for only those 
text files with extension .txt.  For files in a Windows folder that have 
extension .f or .sh or no extension at all, I would like to open those 
with vim in a Cygwin terminal. Currently I'm doing this by going into 
cygwin and manually changing directories, but there must be a better way.


 The suggestion by Anton Lavrentiev appears to accomplish this, but 
without enough detail for me to implement given my limited understanding 
of Windows.




I.e. just make an association to open a file with vi(m). In a usual Windows way.


The only usual Windows way I know is for windows executables.  I want 
to use the Cygwin console application, which I am used to, and not to 
install the native Windows gvim. Googling shows lots of discussion of 
how to use the windows native executable with Cygwin, but not the reverse.



But since you're changing subject back and forth, it's hard to help you.


Well, I can see one change: originally I failed to state that I wanted 
the selection of vim to be optional. Lavrentiev's proposal, which would 
do exactly that, reminded me.





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 4:16 PM, Andrey Repin wrote:


Just create a shell link in your personal Send To... folder with specified
command. On Windows XP, it is in %USERPROFILE%/SendTo. Dunno about other,
This way, even though a bit convoluted, allow you to edit ANY file with your
chosen program. Regardless of extension, and even in absence of it, as it is
the case for many traditional shell scripts.


  On Windows 7, %USERPROFILE$ points to my user folder.  But I get an 
access forbidden message if I try to open the SendTo subdirectory from 
Explorer. There is no option to right-click and elevate, and I get the 
same access forbidden message even if I switch to an administrator 
account. Strangely, I can open that directory from the command line, but 
the only way I know how to create a Windows link is by right-click 
dragdrop from the GUI.





  I.e. just make an association to open a file with vi(m). In a usual Windows 
way.

  The only usual Windows way I know is for windows executables.

Cygwin applications are (surprize!) windows executables


But not normal executables in the sense that they run when you click 
on them from Explorer. Somehow you have to get into cmd.exe first.  And 
then you need to get the path and filename into vim.  This is getting 
too complicated for a nonprogrammer like myself.


Probably the subject is best dropped.  It is more a Windows problem than 
a Cygwin one, and I have been getting by with the clumsy method for the 
last ten years.  I just thought there might be an easy fix. Thanks for 
the help.





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 12:49 PM, carolus wrote:

On 2/9/2014 11:35 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

If there is no simple answer,


Maybe not as simple, but...

What about adding a Vim destination to your Send To... folder
under your Windows profile?


Thanks, but maybe not simple enough for me. I find a SendTo shortcut
under my username, but can't open it. Right clicking does not give me an
administrator option. As you can see, I don't know much about Windows,
which is why I like Cygwin.



I discovered that I can get into that directory from the command line 
even though it is forbidden from the GUI!  But there are no simple files 
in it that I could use as syntax examples.  So what more do I have to 
add to the line


C:\cygwin\bin\mintty.exe -e c:\cygwin\bin\bash.exe -c C:\cygwin\bin\vim.sh

to make sendto work?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 7:49 PM, Andrey Repin wrote:

Greetings, carolus!


Just create a shell link in your personal Send To... folder with specified
command. On Windows XP, it is in %USERPROFILE%/SendTo.



On Windows 7, %USERPROFILE$ points to my user folder.  But I get an
access forbidden message if I try to open the SendTo subdirectory from
Explorer.


It's likely a symlink... Let me find my netbook.

It's in %AppData%/Microsoft/Windows/SendTo


I've finally tracked it down on my Windows 7 computer to

/cygdrive/c/Users/cdr/AppData/Roaming/Microsoft/Windows/SendTo


. Just make a copy of default Cygwin shortcut in SendTo, and edit it's

command line to suit your needs.


Did that.  In the shortcut properties, I followed Anton (with slight 
modification, since I routinely put my own stuff in /usr/local) to enter 
in the target field


C:\cygwin\bin\mintty.exe -e c:\cygwin\bin\bash.exe -c 
C:\cygwin\usr\local\bin\vim.sh


with the vim.sh that he suggests.

Right-click and Send To now briefly flashes a Cygwin console but then 
immediately closes it.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 10:44 PM, carolus wrote:



Right-click and Send To now briefly flashes a Cygwin console but then
immediately closes it.


More exactly, it requests an administrative password to run mintty, and 
only after supplying the password does the Cygwin window flash on the 
screen.


I had forgotten chmod +x for vim.sh, but fixing that did not change 
anything.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Invoking Cygwin vim from Windows Explorer

2014-02-09 Thread carolus

On 2/9/2014 5:54 PM, Lee wrote:


I'm surprised this worked, but
right click on a .txt file in explorer, select open with, choose program
click on browse, navigate to c:\cygwin\bin (or wherever you
installed cygwin), double-click on vi.exe


Hot dog!  It really works.  (But on my system it is vim-nox.exe, not vi.exe)

This solves the problem, but it would still be nice to get the SendTo 
method working to provide an option for when the default association is 
not appropriate.




have you tried http://www.vim.org/download.php
installs a windows version of vi that you can put in your path  no
nasty cygwin/windows permissions or line endings issues.


Some lines in my configuration file go back 20 years and I'd rather not 
monkey with my habitual environment. (I still use .exrc, from old vi 
days, rather than .vimrc) I also prefer to use a vim version that is 
ubiquitous on linux and even present on my wife's Mac.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Invoking Cygwin vim from Windows Explorer

2014-02-08 Thread carolus
Is there some configuration that will let me open a text file in Cygwin 
vim by clicking on the file in an Explorer window?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



How to remount hotplugged USB drive as noacl (for use with rsync)?

2014-02-04 Thread carolus
How can one remount a hotplugged NTFS external USB drive as noacl?  (I 
take it this is necessary to get sensible Windows permissions when using 
rsync for backup.  If not, please correct me.)



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to remount hotplugged USB drive as noacl (for use with rsync)?

2014-02-04 Thread carolus

On 2/4/2014 9:10 AM, Andrey Repin wrote:

  How can one remount a hotplugged NTFS external USB drive as noacl?  (I
  take it this is necessary to get sensible Windows permissions when using
  rsync for backup.  If not, please correct me.)

Change the /cygdrive entry in /etc/fstab
Then you'll get normal Windows permissions everywhere, except, perhaps, the
Cygwin root.


Is this what you mean?

none /cygdrive cygdrive binary,posix=0,user,noacl,override 0 0

Is this a good thing to do?  I find the following advice from the FAQ 
intimidating:


 Therefore, the root directory evaluated by Cygwin itself is treated as 
an immutable mount point and can't be overridden in /etc/fstab... unless 
you think you really know what you're doing. In this case, use the 
override flag in the options field in the /etc/fstab file. Since this is 
a dangerous thing to do, do so at your own risk.


Will this affect my permission-dependent stuff like ssh authentication?




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to remount hotplugged USB drive as noacl (for use with rsync)?

2014-02-04 Thread carolus

On 2/4/2014 10:27 AM, Larry Hall (Cygwin) wrote:

On 2/4/2014 11:09 AM, carolus wrote:

On 2/4/2014 9:10 AM, Andrey Repin wrote:

 How can one remount a hotplugged NTFS external USB drive as noacl? (I
 take it this is necessary to get sensible Windows permissions when
using
 rsync for backup. If not, please correct me.)

Change the /cygdrive entry in /etc/fstab
Then you'll get normal Windows permissions everywhere, except,
perhaps, the
Cygwin root.


Is this what you mean?

none /cygdrive cygdrive binary,posix=0,user,noacl,override 0 0

Is this a good thing to do? I find the following advice from the FAQ
intimidating:

Therefore, the root directory evaluated by Cygwin itself is treated as an
immutable mount point and can't be overridden in /etc/fstab... unless you
think you really know what you're doing. In this case, use the
override flag
in the options field in the /etc/fstab file. Since this is a dangerous
thing
to do, do so at your own risk.


This is talking about the root directory (/) for Cygwin, not the cygdrive
directory.

I'm a bit fuzzy about the distinction and haven't time at the moment to 
think about it.

Will the line proposed above for /etc/fstab do the right thing?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to remount hotplugged USB drive as noacl (for use with rsync)?

2014-02-04 Thread carolus

On 2/4/2014 10:50 AM, Andrey Repin wrote:

  How can one remount a hotplugged NTFS external USB drive as noacl?  (I
  take it this is necessary to get sensible Windows permissions when 
using
  rsync for backup.  If not, please correct me.)

  Change the /cygdrive entry in /etc/fstab
  Then you'll get normal Windows permissions everywhere, except, perhaps, the
  Cygwin root.

  Is this what you mean?
  none /cygdrive cygdrive binary,posix=0,user,noacl,override 0 0

No need for override. This is how I have it set (I prefer just /drive_letter
over/cygdrive/...):

none/   cygdrivebinary,posix=0,noacl0   0



Thanks.  I've done that.  Presumably it solves my problem, though I 
haven't yet tried an external backup. Nothing seems changed as viewed 
from within Cygwin, and ssh still works.



You're not remounting the Cygwin root.


I'm confused by this statement. Isn't /cygdrive/c/cygwin/ the same as 
Cygwin root?  Won't it inherit the noacl property?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



installing rsyncd

2012-06-05 Thread carolus

The Cygwin README for rsync says:

2) to install service: (cygrunsrv --help for help)
   cygrunsrv -I rsyncd -p /usr/bin/rsync -a '--daemon --no-detach'

This command seems to run OK with no messages, but then ps does not show 
rsyncd or rsync.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time.  The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin 
users without having to include cygwin1.dll (which I think is not 
exactly legal).




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 1:51 PM, Tim Prince wrote:

On 2/6/2012 2:29 PM, Charles D. Russell wrote:


i686-w64-mingw32-gfortran.exe hello.f -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory



The cygwin distribution of mingw puts the support dlls in their own
directories. You must act yourself to get them on PATH. This is a
consequence of their not being cygwin compilers and giving you a mongrel
combination of cygwin and Windows setup. However, cygwin provides useful
tools like find and export:
export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH


The old -mno-cygwin yielded a standalone executable that I could give to 
a colleague and it would just work  on a Windows machine without 
cygwin.  It appears that now one must bundle at least one dll.  From a 
licensing standpoint, are these dll's any different from cygwin1.dll? 
Can they be distributed freely without bundling the source code?  If 
not, I might as well forget about mingw and just supply cygwin1.dll.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 2:26 PM, Tim Prince wrote:
 How about the recent suggestion of -static?



That solves my problem.  It took a while for the suggestion to sink in.

Thanks



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 1:44 PM, Chris Sutcliffe wrote:

On 6 February 2012 14:29, Charles D. Russell wrote:

cdr@dell03 ~/mingtest
$ make hello
i686-w64-mingw32-gfortran.exehello.f   -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory


Likely because /usr/i686-w64-mingw32/sys-root/mingw/bin is not in your
$PATH.  You can either compile it statically (so the shared library is
not required), add the path I mentioned to your $PATH, or copy
libgfortran-3.dll to the same path as hello.exe.

Chris


Yes, -static serves my purpose.  Thanks


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 10:42 AM, marco atzeri wrote:

On 2/7/2012 5:13 PM, carolus wrote:

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time. The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin
users without having to include cygwin1.dll (which I think is not
exactly legal).



define
CC=i686-pc-mingw32-gcc.exe
FC=i686-pc-mingw32-gfortran.exe

if you want to use mingw-gcc compilers.

similar
CC=i686-w64-mingw32-gcc.exe
FC=i686-w64-mingw32-gfortran.exe

for the mingw64-i686-gcc compilers

Regards
Marco



Thanks.  I also added:
FFLAGS=-static
to duplicate the behavior I used to get with -mno-cygwin.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 3:12 PM, Corinna Vinschen wrote:


There's the usual misconception about the GPL.  If you create an
application which is linked against the Cygwin DLL (or any other GPLed
library), but you only use the application in-house, there's no reason
at all to distribute the source code to your collegues.  If one of them
really wants it, he can always ask you, right?  Only if you provide the
binaries to customers or to the world in some way, you are supposed to
provide the sources codes as well in a GPL-compatible way.



In a publication I have offered to furnish on request the source code 
and windows executable for a program that I personally run under cygwin. 
 Don't I have to use mingw for the publicly distributed version, or 
else bundle the executable with cygwin source code?   As I understand, 
simply providing a link to the cygwin web site does not satisfy the license.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 5:14 PM, Jesse Ziser wrote:



Well, if you don't want them to have to install Cygwin, then that's a
bigger issue than just licensing. Think of Cygwin like an OS. If you
want to create something that can run under Windows, not Cygwin, then
you have to build it for Windows, not Cygwin. I don't know that it is
even possible to simply bundle Cygwin with your application. Cygwin
isn't just some little collection of libraries or something. It's a
whole system that must be correctly installed on someone's computer.

If you really want Mingw (a free compiler and development environment
for Windows), maybe what you should do is just download and install
Mingw, and use that, instead of doing it through the Cygwin compiler
using a barely-supported option. (Then you should get help with any
problems you have over at Mingw's website instead of here.)



Building with mingw used to be as simple as adding the -mno-cygwin 
compiler flag.  I know mingw is a separate application, but cygwin's 
setup.exe took care of the installation, and -mno-cygwin took care of 
the invocation.  From the standpoint of the dumb engineer, it was just a 
matter of a compiler option in a standard cygwin installation.


It appears that all of that is still possible, not quite as easy but 
still easy enough, as Marco Atzeri explained.






--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 11:58 PM, Christopher Faylor wrote:


Actually, you can easily bundle a program with the Cygwin DLL and have
it work fine.


I confess to doing that for a while, until I learned about -mno-cygwin, 
but is that not a license violation?  My understanding is that in order 
to conform to the license you must include the cygwin source code in the 
bundle.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Searching manpages for option codes, e.g. --all

2011-11-30 Thread carolus

On 11/29/2011 8:29 PM, carolus wrote:


Then maybe I just need to update my Cygwin installation, which is about
a year old.


Yes, that fixes the problem.  Thanks, everyone.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Searching manpages for option codes, e.g. --all

2011-11-29 Thread carolus

After opening man ls, trying to search for --all leads to
Pattern not found (press RETURN).

Inquiring on comp.unix.shell, I was told that for this kind of search to 
work properly in linux , one must set PAGER=less. However, that does not 
seem to work in Cygwin, at least using the old default terminal. Is 
there a workaround?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Searching manpages for option codes, e.g. --all

2011-11-29 Thread carolus

On 11/29/2011 3:56 PM, Tim McDaniel wrote:

On Tue, 29 Nov 2011, carolus wrote:

After opening man ls, trying to search for --all leads to
Pattern not found (press RETURN).


My experiment agrees with that. Do you know why that happens -- what
is it doing so /--all doesn't work?



No idea.  Apparently man invokes $PAGER, and in linux, less works as 
desired and more does not.  If you look at the .1 file, the option 
codes are scrambled with a lot of formatting codes that must be stripped 
out or ignored for search to work.




Whether in an older default terminal or the new one, I've never had a
problem with
PAGER=/usr/bin/less
export PAGER


You can set it, but that doesn't help.


Further, on my system with little customization, the default man pager
is less anyway, so (for example)
man ls
invokes less anyway.


Which explains why setting PAGER doesn't help in Cygwin.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Searching manpages for option codes, e.g. --all

2011-11-29 Thread carolus

On 11/29/2011 5:13 PM, Gary Johnson wrote:
 Man pages were being formatted with some sort of Unicode

hyphen or dash character in place of the ASCII hyphen.


Not sure that is the same problem.  What happens if you search for --all 
in man ls? For me, the display looks OK, but the search doesn't work.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Searching manpages for option codes, e.g. --all

2011-11-29 Thread carolus

On 11/29/2011 5:49 PM, Gary Johnson wrote:



The display scrolls so that the line

 -a, --all

is at the top of the screen and the string --a is highlighted in
reverse video in that line


Then maybe I just need to update my Cygwin installation, which is about 
a year old.  Are you using the old default windows terminal like me, or 
rxvt, mintty, xterm, or maybe something else?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



midnight commander does not see external USB hard drives on remote machine

2011-11-20 Thread carolus
Midnight commander does not see USB storage devices on a remote machine 
using an ssh connection.  cd /cygdrive/f gives the message no such file 
or directory from within mc, but the same command works as expected 
from ssh.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: midnight commander does not see external USB hard drives on remote machine

2011-11-20 Thread carolus

On 11/20/2011 3:55 PM, marco atzeri wrote:

On 11/20/2011 3:59 PM, carolus wrote:

Midnight commander does not see USB storage devices on a remote machine
using an ssh connection. cd /cygdrive/f gives the message no such file
or directory from within mc, but the same command works as expected
from ssh.


could you clarify a bit ?

cygwin can not mount remote filesystem, so mc on cygwin lack also
such feature.

I succeeded to explore a remote filesystem through the shell link,
but I suspect any options like copy and view are problematic,


To copy is not a big problem.  For example,

scp junk.f $DELL
(where DELL=dell03:/cygdrive/f/transit_ext)

will copy junk.f to a directory on a USB hard drive on remote host 
dell03.  Here I put the target directory in an environment variable so 
that I don't have to retype it.  I would like to be able to navigate to 
the target directory on the remote filesystem without having to type 
exact long pathnames (sftp allows no wildcards in the remote cd 
command). I can do that with midnight commander on the remote system 
drive /cygdrive/c, but not on the remote USB HDD /cygdrive/f





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ssh public key authentication problem using curl

2011-11-04 Thread carolus

On 11/4/2011 2:33 PM, Andrey Repin wrote:


You didn't supplied a username to the remote host at all.
Quite predictable, you got a name mismatch...


Thanks.  That was the clue.  The following all work, connecting to my 
cygwin home directory on the server:


ssh dell03
sftp dell03
lftp sftp://dell03

but curl requires a more explicit syntax: curl sftp://cdr@dell03

I had tried curl -u cdr, but that asks for a password.  Since I want to 
use curl in a script, I did not want to have to enter a password.

I did not think of trying a different syntax until reading your suggestion.





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ssh public key authentication problem using curl

2011-11-03 Thread carolus

On 11/3/2011 10:51 AM, Andrey Repin wrote:



What was exact command?



curl  -v -O sftp://dell03/cygdrive/f/transit_ext/this_is_external_drive.txt

(without the newline. I can't get rid of it using the Thunderbird 
newsreader to write this reply.)



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ssh public key authentication problem using curl

2011-11-03 Thread carolus

On 11/3/2011 6:08 PM, Yaakov (Cygwin/X) wrote:



Look at the output:  You're using the wrong keys with the curl
command.


How do I get them right?  Why does curl insist on using
the DSA key, when ssh is quite happy with the RSA key?  I tried
appending the public DSA key from the client to known_hosts on the
server, but that didn't change anything.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ssh public key authentication problem using curl

2011-11-03 Thread carolus

On 11/3/2011 6:57 PM, carolus wrote:
 I tried

appending the public DSA key from the client to known_hosts on the
server, but that didn't change anything.


Correction: What I did was to append id_dsa.pub from the client to 
authorized_keys on the server, and to delete known_hosts on the server 
in case there was a conflict with prior data. There was no change in the 
behavior of either ssh -v host or curl -v -O sftp://host/path;.





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



ssh public key authentication problem using curl

2011-11-01 Thread carolus
After setup with ssh-host-config, ssh-user-config, and ssh-copy-id, 
public key authentication works with ssh but fails with curl. (Password 
authentication works with curl -u, but is less convenient.)


curl -v shows:

 SSH authentication methods available: 
publickey,password,keyboard-interactive

 Using ssh public key file /home/cdr/.ssh/id_dsa.pub
 Using ssh private key file /home/cdr/.ssh/id_dsa
 SSH public key authentication failed: Username/PublicKey combination 
invalid

 Authentication failure

However, ssh authenticates OK using RSA. ssh -v shows:

 Next authentication method: publickey
 Offering public key: /home/cdr/.ssh/id_rsa
 Server accepts key: pkalg ssh-rsa blen 279
 read PEM private key done: type RSA
 Authentication succeeded (publickey).


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: dd to thumb drive, W7 permission problem

2011-03-14 Thread carolus

On 3/14/2011 10:58 AM, Corinna Vinschen wrote:

On Mar 14 10:29, Charles Russell wrote:

The following works on Windows XP, but fails on Windows 7,
apparently because of some permission setting (even in Administrator
mode).

# dd if=binary.img of=/dev/sdb
dd: writing to `/dev/sdb': Permission denied
3+0 records in
2+0 records out
1024 bytes (1.0 kB) copied, 0.081 s, 12.6 kB/s

I would be grateful for suggestions of what to change and where to find it.


Since you missed to send your cygcheck output I hazard a guess.
You didn't update to Cygwin 1.7.8 yet.


Corinna



Good guess.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to read thumb drive volume label

2011-03-14 Thread carolus

On 3/14/2011 11:11 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:

Charles Russell sent the following at Monday, March 14, 2011 10:03 AM

Is there some way to read the volume label on a USB flash drive?
Something like blkid in linux?


Something like this?

function label() {
 $(cygpath --sysdir)/cmd /c dir ${1}:\\ | \
 tr \\r \\n | \
 sed -n -e '1s/^ Volume in drive . is //p'
 }

Or you could play with

$(cygpath --sysdir)/label.exe

Note that both require that one provides the drive letter.

I hope this was not OT.  I apologize for use of tools that come
with Windows, but sometimes I find native tools to be easiest.

- Barry
   Disclaimer: Statements made herein are not made on behalf of NIAID.

Thanks. I didn't realize that the output of dir depended on whether it 
was invoked from cygwin or from cmd, and I didn't know about label.exe.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to read thumb drive volume label

2011-03-14 Thread carolus

On 3/14/2011 4:55 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote:

carolus sent the following at Monday, March 14, 2011 1:05 PM

I didn't realize that the output of dir depended on whether it was
invoked from cygwin or from cmd, and I didn't know about label.exe.


dir does not differ depending on from where it is invoked.


I didn't realize cygwin had its own dir until seeing that the DOS 
dir reported the volume label.



As for label.exe, to know about it, one has be old enough to have run
MS-DOS.

I'm old enough to have stacked the compiler deck, the program deck, and 
the data deck to dump it all in the card reader. But I never paid 
attention to volume labels before setting out to install linux to a 
thumb drive and wanting to make doubly sure I was not overwriting my 
system disk.



(Personally, I think that running DESQview386 under DOS 3.3 was better
than any version of Windows, just as some people on this list wax
nostalgic for B20 and version 1.5.)  :-)


I never thought much of DESQview or of Windows either.  At that time I 
used to telnet from DOS 3.3 to a Unix box, and was happier in Unix. It 
took less than a day to switch to Cygwin, with hardly any difference 
from the real Unix. Before that I was using the MKS Toolkit on my DOS or 
Windows desktop, which was nice software, but not as complete an 
emulation as Cygwin.







--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple