CYGWIN / (no)glob documentation bug

2011-07-15 Thread Hannu Koivisto
Hi,

http://cygwin.com/cygwin-ug-net/using-cygwinenv.html says:

(no)glob[:ignorecase] - if set, command line arguments containing
UNIX-style file wildcard characters (brackets, question mark,
asterisk, escaped with \) are expanded into lists of files that
match those wildcards. This is applicable only to programs running
from a DOS command line prompt. Default is set.

It seems that globbing is applicable not only to programs running
from a DOS command line prompt, but to programs run from any native
Windows (non-Cygwin) application.

FWIW, that behaviour may cause somewhat mysterious problems.  For
example, I just had a non-Cygwin git front-end attempting to run
git with command line parameters cat-file, -e and
123456789^{commit} and the result was a failure because of brace
expansion.  But I guess there isn't much that can be done about
this (except fix the documentation and have users use noglob) since
the cygwin dll can't really know when globbing is desired and when
it isn't.

Also, braces aren't listed as wildcard characters in the quoted
documentation even though GLOB_BRACE is passed to glob() in the
argument globbing code.

http://www.cygwin.com/faq/faq-nochunks.html#faq.api.globbing should
probably be updated as well.

-- 
Hannu


--
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: AltGr sometimes generates Control_L

2009-06-09 Thread Hannu Koivisto
Jon TURNEY jon.tur...@dronecode.org.uk writes:

 Hannu Koivisto wrote:

 Hmm...  can I see the first few lines of your /var/log/Xwin.0.log,
 please, so I can see what keyboard layout windows is reporting and X
 is using.

The only keyboard related lines I can see are around line 36 and
they are:

(--) 16 mouse buttons found
(--) Setting autorepeat to delay=250, rate=31
(--) winConfigKeyboard - Layout: 040B (040b)
(--) Using preset keyboard for Finnish (40b), type 4

 But a bigger problem is that AltGr sometimes generates Control_L
 in addition to ISO_Level3_Shift, which makes Emacs (which I run
 from a Linux machine remotely over X) quite unhappy.  For example,
 when I'm trying to enter }, which in Finnish layout is done by
 AltGr+0, Emacs complains that C-} is undefined.

 Hmm.. in fact, I think a Ctrl-L is generated for every AltGr keypress
 by Windows.  The X server contains special code to eat these
 keypresses, but it seems this is not working as reliably as it should
 be.

Interesting.  And odd :)

 It would be useful to know if you have TweakUI installed, as comments
 in the code indicate and FAQ 5.1.7 indicate that did cause problems
 with this AltGr handling which are thought to be fixed..

I don't have TweakUI installed.

 I've seen earlier complaints about the same problem dating back to
 2005 but nothing that would help me solve this problem.

 Links, please

I actually simply read the mails using my news reader (I'm reading
this list via gmane) and I don't have them around anymore, but
gmane searchs finds something:
http://search.gmane.org/?query=altgrgroup=gmane.os.cygwin.xfree

-- 
Hannu


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



AltGr sometimes generates Control_L

2009-06-04 Thread Hannu Koivisto
Greetings,

I run Cygwin/X with XWin.exe -multiwindow -clipboard
-silent-dup-error.  I start xev from shell and start
pressing(releasing) a and AltGr keys consecutively: a AltGr a
AltGr ...

If I'm lucky, pressing and releasing a results to...

---8--
KeyPress event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906663234, (595,1269), root:(771,1501),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) a
XmbLookupString gives 1 bytes: (61) a
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906663312, (595,1269), root:(771,1501),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) a
XFilterEvent returns: False
---8--

...and pressing and releasing AltGr results to...

---8--
KeyPress event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906710515, (595,1269), root:(771,1501),
state 0x10, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906710609, (595,1269), root:(771,1501),
state 0x90, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
---8--

Unfortunately, sometimes pressing and releasing a resulted to...

---8--
KeyPress event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906670500, (595,1269), root:(771,1501),
state 0x14, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (01) ☺
XmbLookupString gives 1 bytes: (01) ☺
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1906670593, (595,1269), root:(771,1501),
state 0x14, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (01) ☺
XFilterEvent returns: False
---8--

...where the string looked like a happy face.

But a bigger problem is that AltGr sometimes generates Control_L
in addition to ISO_Level3_Shift, which makes Emacs (which I run
from a Linux machine remotely over X) quite unhappy.  For example,
when I'm trying to enter }, which in Finnish layout is done by
AltGr+0, Emacs complains that C-} is undefined.

---8--
KeyPress event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1907120437, (478,827), root:(676,1088),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1907120437, (478,827), root:(676,1088),
state 0x14, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1907120531, (478,827), root:(676,1088),
state 0x94, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1907120531, (478,827), root:(676,1088),
state 0x90, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

EnterNotify event, serial 27, synthetic NO, window 0xe1,
root 0x7c, subw 0x0, time 1907125468, (167,87), root:(365,348),
mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
focus YES, state 16
---8--

I've seen earlier complaints about the same problem dating back to
2005 but nothing that would help me solve this problem.

I'm using cygwin in Windows XP SP3.  Package versions:

cygwin  1.5.25-15
libX11_61.1.5-2
xorg-server 1.5.3-7
xorg-x11-base   7.4-1
xorg-x11-bin7.4-1
xorg-x11-bin-dlls   7.4-1
xorg-x11-bin-lndir  7.4-1
xorg-x11-etc7.4-1
xorg-x11-fenc   7.4-1
xorg-x11-fnts   7.4-1
xorg-x11-libs-data  7.4-1
xorg-x11-xwin   7.4-1

-- 
Hannu


--
Unsubscribe 

Raw device access to an SD card

2009-03-05 Thread Hannu Koivisto
Greetings,

The goal is to create a bootable Linux installation on an SD card
by writing an existing image using dd in Cygwin.  The card is
inserted to an SD card slot of a laptop and apparently appears as
\\.\physicaldrive2 to the OS.

Now, dd if=.\\physicaldrive2 reads something (hopefully from
that card, hard to say for sure) but an attempt to write with dd
if=image of=.\\physicaldrive2 fails with Invalid argument
error.  Should this work?  Is there something that one must do
first?  I tried mount -f -b //./physicaldrive2 /dev/foo as
suggested by someone but according to the Cygwin user's guide that
is deprecated and besides, /dev/foo behaved just like
.\\physicaldrive2 directly.  FWIW, I tried to find if the card
device gets mapped to some /dev/sd? but that didn't seem to be the
case.  Only /dev/sda was available (hard drive).  Is it possible to
list that kind of mappings somehow?

-- 
Hannu


--
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/



Re: ssh/pubkey authentication and use of subst

2007-10-31 Thread Hannu Koivisto
Corinna Vinschen [EMAIL PROTECTED] writes:

 On Oct 30 12:44, Hannu Koivisto wrote:
 Based on earlier discussions on this list, it's apparently a known
 problem that when you use public key authentication, you are not
 authenticated through windows, which means that you cannot map
 network shares, for example.

 That's not right.   The problem is that you didn't logon using a
 password and you are running in a foreign logon session.  The result is
 that you have to use explicit identification when connecting to a share.
 Assuming you are on machine or in domain BRAIN, user name PINKY.  When
 you logged on using password authentication, everything is known to
 identify and authorize you automatically to a server, so the following
 works (assuming you *have* permissions to access the share):

Ok.

   $ net use '\\server\share'

 However, this doesn't work with pubkey authentication because your
 authorization information is incomplete.  Therefore you have to
 identify and authorize explicitely:

   $ net use '\\server\share' /user:'BRAIN\PINKY' your-password

 or

   $ net use x: '\\server\share' /user:'BRAIN\PINKY' your-password

Unfortunately the explicit form doesn't work for me via pubkey
authentication either, I get System error 5 has occurred.  Access
is denied.  (return code is 2).

Precisely the same command works if I log in using password
authentication.

Both the client and the server machines run Windows XP SP2, openssh
is 4.7p1-2, cygwin 1.5.24-2.  sshd was set up with ssh-host-config.

I don't need shares, just subst, but I'd be happy to provide more
information and test things to help to figure this out.

 I have no idea why subst fails, though.  Must have something to do
 with the below as well.

subst also says Access denied - path (return code is 1).

 You are running as the user you have logged in as.  However, since no
 Windows authentication took place, you don't get your own logon session.
 You're running in the logon session of the user running sshd.  This
 situation is wrongly evaluated by Windows, so that functions returning a
 user name from a SID return the name of the user running sshd.  But the
 application token does *not* grant you the permissions of the user
 running sshd.  The token is still correct and only grant you the rights
 your user account has.  The user and owner SIDs in the token are
 correctly set to the SID of your own account.  Only the Windows
 functions returning the user name do return the wrong name.

Thanks for the explanation.

-- 
Hannu


--
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/



ssh/pubkey authentication and use of subst

2007-10-30 Thread Hannu Koivisto
Greetings,

Based on earlier discussions on this list, it's apparently a known
problem that when you use public key authentication, you are not
authenticated through windows, which means that you cannot map
network shares, for example.  I was surprised to find that I cannot
use subst either.  It works fine if I log in using password
authentication, just like mapping of network shares works.

Unfortunately I have a situation where I'd really need to combine
passwordless ssh logins and use of subst.  It would be ok if I
needed to give the password once as a separate step and then
further use of ssh didn't require giving a password.

Are there any workarounds to this problem?  I was wondering if fsh
(http://www.lysator.liu.se/fsh/) could be of help here: I haven't
used it before but apparently with it you create a tunnel once (and
give the password) and further logins reuse the existing tunnel.
Unfortunately I couldn't find fsh as a Cygwin package, which makes
me wonder if there is a technical reason it is not available.

If I understood correctly, when you log in using pubkey
authentication, you basically are the user sshd runs as.  I have
set up sshd without privilege separation so that would be the
system account.  One would expect system account to be able to use
subst but if it indeed can't, would it be possible to extend the
capabilities of system account to that effect?

Any other ideas?

-- 
Hannu


--
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/



openssh - cygcrypto dependency problem

2007-10-15 Thread Hannu Koivisto
Greetings,

I upgraded openssh to 4.7p1-2, hoping to get ssh-add working.  I
also upgraded all other packages to their latest versions. 
openssl is 0.9.8e-3 and openssl097 is 0.9.7l-1 (these weren't
changed during the upgrade).

ssh binary can no longer be executed, ssh whatever does nothing
and strace ssh reveals the reason: The procedure entry point
EVP_CIPHER_CTX_get_app_data could not be located in the dynamic
link library cygcrypto-0.9.8.dll.  Apparently cygcrypto is part of
openssl of which I have the latest version.

Even before openssh upgrade I had the same problem with ssh-add but
ssh itself worked fine.  Unfortunately I can't remember which
version of openssh package I had before upgrade.  Downgrading to
4.6p1-1 didn't help.

Given that no one else seems to have reported this problem on this
list, I'm wondering if I could be doing something wrong here...

-- 
Hannu


--
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/



Re: Sharing zsh history in cygwin.

2005-01-22 Thread Hannu Koivisto
Andrew Markebo [EMAIL PROTECTED] writes:

 Anyone managed to share command line history between running zsh's in
 latest cygwin's?

I don't use SHARE_HISTORY (just inc_append_history,
hist_ignore_all_dups, hist_no_store and my history sizes are 100
times larger than yours), but...

 setopt HISTIGNOREDUPS HISTIGNORESPACE EXTENDED_HISTORY 
 setopt INC_APPEND_HISTORY SHARE_HISTORY 
 HISTSIZE=300
 SAVEHIST=300
 HISTFILE=~/.history  

 The last line, HISTFILE, freezes the cygwin-distributed zsh
 (4.2.0) just after reading the config-files. Removing just that line

...after some cygwin update (a few months ago) my zshs also started
freezing during startup.  I tracked the problem down to HISTFILE
being assigned a file that resides on a network drive (a Linux
samba share in this case, I didn't try anything else).  If I
changed my history file to reside on a local hard drive, zsh no
longer froze.  Is your home directory on a local drive?

-- 
Hannu

--
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/



Re: How to make Cygwin map backspace to ASCII DEL?

2003-12-19 Thread Hannu Koivisto
Igor Pechtchanski [EMAIL PROTECTED] writes:

 man stty

I'm well aware of the stty program.  I was going to add please,
don't suggest stty to my original mail, but thought it might be
somewhat impolite.

If you are trying to imply that 'stty erase $(tput kbs)' (where
tput kbs outputs ASCII DEL) would do what I want, you must have
misread the question.  It doesn't and I think it shouldn't.  Or is
there some Cygwin specific extension in the stty program that does
what I want?  I don't see anything in stty(1).

-- 
Hannu


--
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/



How to make Cygwin map backspace to ASCII DEL?

2003-12-18 Thread Hannu Koivisto
Greetings,

I just upgraded all Cygwin packages to their latest versions.
Although I don't use Cygwin a lot, I'm fairly sure that I would
have noticed if backspace in an ordinary Windows console window had
ended up as ^H to a Cygwin application (zsh in this case) running
in that console window, which is what happens now.

Anyway, whatever the old behaviour was, I want backspace to
generate ASCII DEL (^?) and not ^H --- how can I make Cygwin do
that?

-- 
Hannu


--
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/