Re: Rsync and FAT32

2011-03-10 Thread Ehud Karni
On Wed, 09 Mar 2011 17:39:33 -0500, Larry Hall (Cygwin) wrote:

 On 3/9/2011 4:34 PM, Panos Katergiathis wrote:
 
  rsync -e 'ssh -p 22 -l root' -z --delete-excluded --verbose
  --recursive --delete --update --exclude-from=exclude.rs root@server
  name:xms/home /cygdrive/e/MyNetworkServers/XMS-home

 So you're copying from the Linux machine to the Windows machine, just as you
 stated the first time.  I don't see any flags (-a, -p, --chmod, -A,
 --fake-super, etc.) here that would set the permissions as you would need
 them on the Windows machine.  I recommend doing so.

I think Larry found your problem. You can use the --archive option (good
when rsyncing for an exact backup).

Since you are using net connection, please look also at --whole-file option.
Also, your ssh user and rsync user are the same, so you can use --rsh=ssh
instead of using the -e option.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: xls to text conversion ?

2010-02-05 Thread Ehud Karni
On Thu, 4 Feb 2010 19:55:36 Maarten Vanneste wrote:

 Dear all,
 I was wondering whether there is a cygwin tool/program which converts
 microsoft excel files to text. Any suggestions ?

I use xlhtml, source at:  http://chicago.sourceforge.net/xlhtml/

I applied the following patch:

diff -c ~/xlhtml-0.5/xlhtml/xlhtml.h-org ~/xlhtml-0.5/xlhtml/xlhtml.h
*** ~/xlhtml-0.5/xlhtml/xlhtml.h-orgThu Apr 11 03:23:51 2002
--- ~/xlhtml-0.5/xlhtml/xlhtml.hThu Dec 24 18:16:51 2009
***
*** 20,28 
  #include version.h

  /* Used by packed string array Opcode: 0xFC */
! #define HARD_MAX_ROWS_97  0x7FFE/*! Used in add_wb_array to prevent 
OOM */
! #define HARD_MAX_ROWS_95  0x3FFF/*! Used in add_wb_array to prevent 
OOM */
! #define HARD_MAX_COLS 256   /*! Used in add_wb_array to 
prevent OOM */

  static U16 HARD_MAX_ROWS = HARD_MAX_ROWS_97;
  /**
--- 20,28 
  #include version.h

  /* Used by packed string array Opcode: 0xFC */
! #define HARD_MAX_ROWS_97  0x0   /*! Used in add_wb_array to prevent 
OOM */
! #define HARD_MAX_ROWS_95  0x07FFF   /*! Used in add_wb_array to prevent 
OOM */
! #define HARD_MAX_COLS 256   /*! Used in add_wb_array to prevent 
OOM */

  static U16 HARD_MAX_ROWS = HARD_MAX_ROWS_97;
  /**
***
*** 57,63 
U16 type;   /*! This will record the record type that generated 
the cell */
U16 spanned;/*! If 1 don't output */
uni_string ustr;/*! The cell's displayed contents */
!   U16 rowspan;/*! rows to span */
U16 colspan;/*! columns to span */
uni_string h_link;  /*! If a hyperlinked cell, this is the link*/
  }cell;
--- 57,63 
U16 type;   /*! This will record the record type that generated 
the cell */
U16 spanned;/*! If 1 don't output */
uni_string ustr;/*! The cell's displayed contents */
!   U32 rowspan;/*! rows to span */
U16 colspan;/*! columns to span */
uni_string h_link;  /*! If a hyperlinked cell, this is the link*/
  }cell;


I did it on GNU/Linux but I think it'll work well on Cygwin.

It worked for several years in our company without the patch, but
lately we started receiving Excel files with 65535 lines in one sheet,
so I had to change the hard coded line limit.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Tree command - Display Structure of Directory Hierarchy

2009-09-30 Thread Ehud Karni
On Tue, 29 Sep 2009 21:52:02 Dave Korn wrote:

   That is precisely why I asked for the source, and precisely the advantage of
 open source over proprietary closed sources :-)

I attach a source code for my own (simplified version) treed program
(do your own compilation, my gcc command is in the source).
This program is not related to the previous attached binary of `tree'.

This program is released under the GPL, so you can do any modification
to it. If you do, please post your changes (and the reason behind it).

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
/* TREED: list all directories from given node
Copyright (C) 1994-2009 Ehud karni e...@unix.mvs.co.il

   Compile command: gcc treed.c -O2 -o treed -static -Wall

command call:  treed [-number] [-n] [-s] [-x] [dir]
   -number = max depth of branching
   -s= follow symbolic links
   -x= cross mount point
   -n= print net size (bytes not including unused block parts)
   -m= print size in Megabytes (1024*1024) instead of Kilobytes (1024)

   RCS: $Id: treed.c,v 1.112 2009/01/15 17:02:19 ehud Exp ehud $

   $Log: treed.c,v $
   Revision 1.112  2009/01/15 17:02:19  ehud
   Add -m switch for printing sizes in Megabytes

   Revision 1.111  2006/05/21 16:10:37  ehud
   Added net size option: -n. Added struct blksiz (blocks  char size)
   used instead of blocks.  Changed total_dir () to struct blksiz,

   Revision 1.110  2005/04/18 10:52:54  ehud
   Remove kvv, kvh, kvnx - use kvchars instead, set it according to
   terminal type - NPC? (pc graphics) characters or textual (any other).

   Revision 1.109  2003/05/15 12:02:31  ehud
   Use 64 bit file ops (LFS) - just added defines.
   Change size (750 ents) and fix check for directory realoc.

   Revision 1.108  2001/07/04 11:17:38  ehud
   Change the allocation of the directories list

   Revision 1.107  2001/06/05 16:17:14  ehud
   Delete inode hashing altogether

   Revision 1.106  2001/06/05 12:44:35  ehud
   Adjustments for W32, changes in ino hash schem (no good).

   Revision 1.105  1997/01/14 16:23:01  ehud
   Changes to ttywrt_, detecting q on page wait

   Revision 1.104  1996/04/15  11:51:05  ehud
   Changes for SGI compatibilty

   Revision 1.103  1994/11/30  14:17:46  ehud
   Fix bug (different devices) and deal with mount crossing

   Revision 1.100  1994/11/08  11:01:42  ehud
   Initial version control use


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You can find a copy of the GNU General Public License and some
more information at:  http://www.gnu.org/copyleft/gpl.html


   Ehud  Karni */

#define DEBUG  0   /* debug prints ON / OFF */

#define _FILE_OFFSET_BITS 64   /* use 64 bit file length */
#define _LARGEFILE64_SOURCE 1  /* LFS support needed */

#ifdef __MSDOS__
#define  __DOS_W32__   1   /* dos (DJGPP) or W32 (mingw) */
#endif /* __MSDOS__ */
#ifdef __MINGW__
#define  __DOS_W32__   1   /* dos (DJGPP) or W32 (mingw) */
#endif /* __MINGW__ */

#include string.h/* standard string library */
#include stdio.h /* standard I/O library */
#include stdlib.h/* standard library */
#include sys/types.h /* UNIX sys types */
#include signal.h/* standard signal library */
#include time.h  /* date/time structers */
#include dirent.h/* directory entry */
#include sys/stat.h  /* File status entry */

#ifndef __DOS_W32__/* include for REAL unix only */
#include unistd.h/* UNIX non standard library */

#define RE_ALOC(pntr,count)/* reallocate table (pntr) to count entries */ \
   { register void *tmpp ; /* tmp pointer */   \
   while ( ( ( tmpp = realloc ( pntr, count * sizeof ( pntr[0] ) ) ) == NULL ) \
( count != 0

Re: Tree command - Display Structure of Directory Hierarchy

2009-09-30 Thread Ehud Karni
On Wed, 30 Sep 2009 14:01:12 Dave Korn wrote:

 Ehud Karni wrote:
  On Tue, 29 Sep 2009 21:52:02 Dave Korn wrote:
That is precisely why I asked for the source, and precisely the 
  advantage of
  open source over proprietary closed sources :-)
 
  I attach a source code for my own (simplified version) treed program

   Thanks for trying to help, but I'm afraid you just aren't able to fulfill
 someone else's GPL obligations on their behalf; I want the actual source from
 which the actual binary that was distributed to me was compiled.

That's a misunderstanding, I did not intend to rectify the OP GPL violation,
I just wanted to provide a working directory tree listing program.

   I'm quite curious to see how it uses the system() function.

My program does not use system, it uses dir operations and fstat.

Ehud.



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: ps COMMAND column

2009-01-14 Thread Ehud Karni
On Tue, 13 Jan 2009 17:14:20, Paul McFerrin wrote:

 Is there a way to get ps to display more on the COMMAND column?

Use the procps command instead.  It works like the ps command on
Linux.  For example I use the following command:
procps -e -o user,pid,ppid,sess,tty8,start,time,cmd -w 160

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Unusual environemtal variables

2008-12-21 Thread Ehud Karni
On Fri, 19 Dec 2008 06:45:14 -0700, Eric Blake e...@byu.net wrote:

 According to Steve Rainbird on 12/19/2008 2:22 AM:
 SR: When i run a Fuijitsu Cobol program it requires environmental variables
 SR: starting with the @ sign.

 That is inherently non-portable.  POSIX states that Other characters may
 be permitted by an implementation; applications shall tolerate the
 presence of such names, but does not require applications to be able to
 create such names.

 http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08

 SR:
 SR: Is there any way around this?

 You'll have to set it in Windows, prior to starting bash, as there is no
 way to make bash create variables not starting with something from the
 portable set [_a-zA-Z].

This behavior (accepting names of only ASCII Alpha and _) is a bash self
imposed limitation. If you use csh (or tcsh) names with other characters
are supported too.

So you can use csh's: setenv @FOO value.
You can also use the env command to bypass bash limitation like this:
exec env @FOO=bar exec /bin/bash -i
Note the 2 `exec' if you do not want to spawn more processes.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: [ANNOUNCEMENT] Updated [experimental]: coreutils-6.9-5

2007-08-22 Thread Ehud Karni
On Wed, 22 Aug 2007 10:30:15 Corinna Vinschen wrote:

 Second, even if a FS appears case-insensitive, it isn't necessarily so.
 NTFS is case-sensitive.  The case-insensitivity is actually handled by
 the Windows kernel.  Basically, a flag in calls to functions taking a
 filename as parameter is all it takes to make a function call
 case-insensitive or not(**).  The Win32 calls all use case-insensitivity.
 Some are switchable to work case-sensitive, but it's not of much help
 since other calls are always case-insensitive.  Cygwin handles all file
 system calls case-insensitive, too.  So far.

 So, in the Linux/FAT example we have a case-sensitive OS with a
 case-insensitive FS, with Win32/NTFS (Cygwin/NTFS) we have a
 case-insensitive OS with a case-sensitive FS.  While the NT kernel can
 return information about the case-sensitivity of the underlying FS (***)
 (), I don't know about other OSes.

I have mounted the NTFS on my Linux (Centos5) using the `mount.cifs'
command. It is a case-sensitive OS with a case-sensitive FS but with
case-insensitive mediator (the XP hosting OS). I think the Cygwin
situation is almost exactly the same. However there is a big difference
in how `mv' works on Cygwin and Linux:

Cygwin test:

# pwd
/U/VID-shared/Incoming/subtitles/tmp

# ll *c
-rwxrwxrwx+ 1  None 34 Aug 22 23:09 TST.uc

# mv tst.uc TsT.lc
# ll *c
-rwxrwxrwx+ 1  None 34 Aug 22 23:09 TsT.lc

# mv tst.lc tst.lc
mv: `tst.lc' and `tst.lc' are the same file

# mv Tst.lc tst.lc
mv: `Tst.lc' and `tst.lc' are the same file

Linux test:

# pwd
/ehuds/U/VID-shared/Incoming/subtitles/tmp

# ll *c
-rw-rw 1 root root 34 Aug 22 23:09 TsT.lc

# mv tst.lc tst.lc
mv: `tst.lc' and `tst.lc' are the same file

# mv tSt.lc tst.lc

# ll *c
-rwxrwSrwt 1 root root 34 Aug 22 23:09 tst.lc


Please note the difference:
On both system the mv tst.lc tst.lc fails with same file error,
but mv Tst.lc tst.lc (i.e. case change only) fails only on Cygwin,
On the Linux it just works. May be the Cygwin1 DLL or the Cygwin `mv'
should do less checking and so it might `just work' too ?

Ehud.



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Remove user access to local drives?

2007-03-04 Thread Ehud Karni
On Sat, 03 Mar 2007 21:20:15 Francis wrote:

 Ehud:

Please mail to the list, not to me ONLY.

 I apologize for being an inexperienced cygwin user, but how would I
 restrict the SSH user to one command only? Which command would PuTTY use
 to tunnel through to a remote host?

Please read the `ssh' and `sshd' man page.
This is not specific to Cygwin, so you better google for it.

You asked 2 questions.
1. You control the command a user can run by prefixing a restriction
   to his/her key in the authorized_keys file. Something like:
   command=exec dots.sh ssh-dss 
   You can other restrictions their like: permitopen=vnchost:5900
   which will allow connection only to this host and port.

2. To tunnel to anther machine you need to do port forwarding, with
   UNIX (Cygwin) ssh, you do it with the -L switch. I know you can do
   it with Putty but it is done with its menus.

it seem that you need a restriction like this:
   command=sleep 90,no-pty,permitopen=host1:port1,permitopen=host2:port2 
key

Please note: The restrictions are key depended, it will not apply if
the user logs in with a password, so change the /etc/sshd_config option
PasswordAuthentication to No !

And again, read the `ssh' and `sshd' man page.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Remove user access to local drives?

2007-03-01 Thread Ehud Karni
On Tue, 27 Feb 2007 19:37:25, Francis wrote:

 I am running a OpenSSH server for some friends on my machine, and I was hoping
 to disable access to /cygdrive (local drives.)  Is there a way to prevent them
 from modifying any files also?  this is intended just as a SSH tunneling 
 method
 to get us around some Websense.


I have restricted ssh users to a some directory with some commands only
on GNU/Linux by using `chroot' and restricted shell (bash). This won't
work on Cygwin, because there is no `chroot' jail (not supported by the
underlying OS).

You have 2 options:
1. Use the /etc/passwd to specify your own shell which will check the
   input and execute only the allowed commands (by being filter to a
   shell or by calling `system').

2. Use cgf advice and restrict the ssh user to one command only (by the
   authorized_keys file which will be a filter (same as in 1). This has
   some drawbacks on Cygwin (unlike UNIX), but for your purpose it is
   not significant.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Unable to run even simple batch scripts any more

2007-02-14 Thread Ehud Karni
On Tue, 13 Feb 2007 00:56:24 Eric Backus wrote:

 Obviously, the horse is still alive and attempting to limp along.  I predict
 it'll stay alive for quite some time longer.

 [snip]

 * Workaround inserting set -o igncr is impractical when there are lots of
 scripts.
 [snip]

Among my many scripts, there are some with DOS (i.e. CR LF) ending
that I prefer to leave as is (mostly to be able to edit them with
notpad).

I wrote a little script that can fix bash scripts with CRs by adding
the required set -o igncr line.

Notes:
 1. You can, of course, replace the `awk' with a simple `d2u' if
you don't need the CRs at all.
 2. Change the `grep' arguments (mostly the -r and the files list)
to suit your needs.
 3. This script will fail on a file with : in its name (which can
occur only on manged mounts, because of the OS limitations)

Ehud.

  cut here 
#! /bin/bash -ex

chk_it ()
{
   while read HEAD
   do
   echo Checking $HEAD   # show some progress
   case $HEAD in
   *:1:#*^M )  # ONLY (ba)sh files with 
CR ending
   SNM=`echo $HEAD | cut -d: -f1`  # extract script name
   echo Fixing $SNM 
   cp -p $SNM $SNM-new # copy with permissions
   awk '
BEGIN  { IA = 0 }

$0 ~ /^[ ]*#/  { print $0 ; next }

   {
   if ( IA == 0 )
   {
   print set -o igncr #\r ;
   IA = 1 ;
   }

   print $0 ;
   }
   '  $SNM  $SNM-new # add set -o igncr 
after initial comments

   mv $SNM $SNM-old# save old script
   mv $SNM-new $SNM# rename new to current
   esac
   done
}
# --

grep -E -H -I -m 1 -n -U -r -e '^#![ ]*/bin/(ba)?sh' * \
   | cat -v | chk_it   # check  replace CR 
scripts

# end of fix-cr.sh script 


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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 breaks while loop

2006-08-14 Thread Ehud Karni
On Mon, 14 Aug 2006 09:54:21 -0400, Kenneth Nellis wrote:

 FWIW, I see the same behavior, but not just Cygwin, but also on
 a Red Hat Linux installation, so I guess it's more of a bash/ssh
 issue than one with Cygwin.

There are 2 issues here, One is ssh's, the other is with sh/bash.
None is Cygwin specific, i.e. it is OFFTOPIC.

On Friday, August 04, 2006 10:01 AM, BC wrote:
BC If file hostlist contains:
BC hosta
BC hostb
BC hostc
BC
BC then execute this shell script:
BC while read host
BC do
BC ssh $host ls -al .profile
BC done  hostlist
BC
BC the while loop executes one time and quits.

The problem is that `ssh' read stdin. To overcome this change it to:
ssh $host ls -al .profile  /dev/null

A second possible problem is that ssh may exit with error, the
solution is to add  set +e  (in separate line) before the ssh line.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Apache (for win) running bash script: ls

2006-08-07 Thread Ehud Karni
On Mon, 7 Aug 2006 12:30:05, Robert Mark Bram wrote:

 When running a bash script under Apache 2.0.55 for Windows, are there any
 restrictions about accessing the file system? My first test is to do an ls and
 report the results:

I think this subject is off-topic here. It is not related to Cygwin at
all. Having stating my objection, here is a test script I use on Linux.

Ehud.


## test.cgi ##

#! /bin/sh -e

set -f

echo Content-type: text/plain
echo

echo CGI/1.0 test script report:
echo \nbr

echo argc is $#. argv is $*.
echo \nbr

echo * End of output **
echo \nbr


exec 1 /tmp/test-cgi.txt
echo \n
date +   == request at %Y-%m-%d %H:%M:%S

exec 21
##  set -x

echo argc is $#. argv is $*.
echo \n

set +e
PNM=0
while [ $PNM -lt $# ]
do
PNM=`expr $PNM + 1`
eval 'PRMN=$'$PNM
echo Param $PNM is |$PRMN| \n
done
echo \n
set -e

STDI=`cat`
echo  == standard input =
echo -E $STDI
echo  = Hebrew converted 
echo -E $STDI | iconv -futf8 -thebrew
echo \n = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
echo

echo SERVER_SOFTWARE = $SERVER_SOFTWARE
echo SERVER_NAME = $SERVER_NAME
echo GATEWAY_INTERFACE = $GATEWAY_INTERFACE
echo SERVER_PROTOCOL = $SERVER_PROTOCOL
echo SERVER_PORT = $SERVER_PORT
echo REQUEST_METHOD = $REQUEST_METHOD
echo HTTP_ACCEPT = $HTTP_ACCEPT
echo PATH_INFO = $PATH_INFO
echo PATH_TRANSLATED = $PATH_TRANSLATED
echo SCRIPT_NAME = $SCRIPT_NAME
echo QUERY_STRING = $QUERY_STRING
echo REMOTE_HOST = $REMOTE_HOST
echo REMOTE_ADDR = $REMOTE_ADDR
echo REMOTE_USER = $REMOTE_USER
echo AUTH_TYPE = $AUTH_TYPE
echo CONTENT_TYPE = $CONTENT_TYPE
echo CONTENT_LENGTH = $CONTENT_LENGTH
echo

echo env vars and values
/usr/bin/printenv
echo end of env ==

## test.cgi ##




--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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 can I create root user?

2006-08-07 Thread Ehud Karni
On Mon, 07 Aug 2006 19:39:29, MORENO CANTADOR, PATRICIA wrote:

 I'm doing a project in which I'm trying to establish a connection
 between a client (Linux) and a server (Windows), in whom I need to
 execute the daemon to connect. For execution of my program I need to be
 root.

This is not Cygwin specific issue (i.e. it is off-topic).

You don't need to be root to run daemons, not on Cygwin and not on
UNIX/Linux. There are some restriction on UNIX/Linux (e.g. use of
privileged ports) which may cause you to run these daemons as root.
There may be reasons to run programs with administrator privileges
on M$Windows, but it is not the same as being root on UNIX.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: window resizing not updating COLUMNS and LINES

2006-06-03 Thread Ehud Karni
On  Wed, 31 May 2006 18:47:24 -0500, mwoehlke wrote:
 
  'export COLUMNS' is needed for 'printenv COLUMNS' to work,
  since in the printenv case you need the variable to be
  transferred to the child printenv process.

 Ok, that makes sense, although my understanding is that if the child
 process is 'bash' (including a script run by bash), then it will have a
 non-exported copy of the var set correctly. Or rather, it would/should
 if this was working at all.

Here is my finding with cygwin1.dll 1.5.18, bash 3.00.16(11), rxvt v2.7.10

** note: cygwin1.dll 1.5.18 (OLD) **

# uname -a
CYGWIN_NT-5.1 p4-1700-xp 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown 
unknown Cygwin

# echo $LINES $COLUMNS

# export LINES COLUMNS
# echo $LINES $COLUMNS

# stty -a
speed 38400 baud; rows 49; columns 105; line = 0;  .

== [ change of rxvt screen size by the mouse ] ==

# echo $LINES $COLUMNS
47 105
# stty -a
speed 38400 baud; rows 47; columns 105; line = 0;  .

== [ change of rxvt screen size by the mouse ] ==

# echo $LINES $COLUMNS
49 91
# stty -a
speed 38400 baud; rows 49; columns 91; line = 0;  .


I get the exact same results with xterm 6.8.2.0(202).


My conclusions:

Both rxvt and xterm do their job properly.

The export is not needed (LINES and COLUMNS are local variables).
The stty does not set these vars. (both tested separately, not shown).

The bash variables are not set until the window change size
(until bash gets the SIGWINCH signal ? ).

Since it seems to work fine (almost), I guess the problem is with
cygwin1.dll 1.5.19.

Ehud.

BTW. On linux (locally compiled bash) the LINES  COLUMNS are set
 even before changing window size.



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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 add a title to xterm

2005-12-07 Thread Ehud Karni
On Wed, 7 Dec 2005 06:54:41 -, fergus [EMAIL PROTECTED] wrote:

  How to add a title to xterm?

 I do not use startx: for me, it sets up unnecessary or inconvenient
 defaults.

You can always set the xterm title by sending it the string: Esc ] 0 ;
your title ^G . You can do it from the xterm application (writing to
/dev/tty or stdout if its connected, or externally, by writing to
/dev/ttyn [Cygwin] or /dev/pts/n [Linux]).

Bellow is a small script that update the title if it is run on an
interactive xterm (the 2nd is a tty emulator written here).

Ehud


#! /bin/sh -e
# this script sets the TTY title to 1st argument
# --

if [ -t 1 ] ; then # do only if stdout is terminal
TTL=`echo $1 | sed -e s/ [ ]*/ /g` # any length of spaces to 1 space
case $TERM in
xter* ) echo \033]0;$TTL\a\c # write it to xterm window title
;;
npc* )  DTTL=`echo $TTL\c | od -An -tu1 -v | tr \012   | sed -e 
s/ [ ]*/;/g`
echo \033[=/${DTTL:1:999};253;t\c# For Mivtach Simon TTY
;;
esac
fi

## set_tty_title ##


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

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



Re: encoding scripts (so that user can't see passwords easily)?

2005-12-07 Thread Ehud Karni
On Tue, 06 Dec 2005 20:36:07 +0100, Tomasz Chmielewski wrote:

 It is to be a measure to prevent an accidental viewing of
 usernames/passwords rather than some military grade tool which takes
 100 years to break on a supercomputer.

[I think this discussion is off topic for cygwin]

Here are 2 simple bash scripts that do what you want. Both are filters
(i.e. read standard input, write to standard output). The first one
just obscures the input to all numeric string. The second one uses gpg,
so you can do real strong encryption, with encryption done by anyone
while decryption done by the privileged user.

Ehud


#! /bin/bash -e
# simple conversion to all numeric and back
# --

OP=$1# requested operation (--encrypt/--decrypt)
INP=`cat`  # input to encrypt/decrypt
LEN=${#INP}# Length of input
OUT= # output (almost final)

case $OP in
   --encrypt )
   while [ $INP !=  ]
   do
   CH=${INP:0:1}   # 1st char of input
   INP=${INP:1:$LEN}   # rest of input
   OCT=`echo $CH | od -An -to1 -N1`  # convert to octal
   EON=`expr 789 - $OCT`   # not too obvious
   OUT=$OUT$EON
   done;;  # OUT ready

   --decrypt )
   while [ $INP !=  ]
   do
  EON=${INP:0:3}   # 1st inverted octal of input
  INP=${INP:3:$LEN}# rest of input
  OCT=`expr 789 - $EON`# octal
  OUT=$OUT'\'$OCT  # add \ for decoding octals '
   done;;  # OUT ready

   * ) echo OP (1st arg) is |$OP|. should be --encrypt or --decrypt
   exit 1  ;;
esac

echo -e $OUT # echo encrypted/decrypted to 
USER

## end of simple-crypt.sh 
##


#! /bin/bash -e
# gpg encryption/decryption, must have gpg keys (public  private)
# 

KEY=$1 # gpg key, should be in pubring.gpg/secring.gpg
OP=$2  # requested operation (--encrypt/--decrypt)
PSP=$3   # passphrase (needed for --decrypt only) or empty

GPGOPT=--default-recipient-self --batch --no-tty --always-trust --no-options 
--output -
if [ $PSP !=  ] ; then # do only when passphrase given
exec 30  # trick, save stdin stream

echo ${PSP |
(  exec 40 ; # set fd 4 to read from echo
   exec 03 ; # restore original stdin (for gpg input)
   gpg --default-key $KEY $GPGOPT --passphrase-fd 4 $OP )
else
gpg --default-key $KEY $GPGOPT $OP
fi

## end of gpg-crypt.sh 
##


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Making the command console stay on top

2005-11-16 Thread Ehud Karni
On Wed, 16 Nov 2005 10:44:21 -0600, Terry Dabbs  wrote:

 The problem with each of these is that it requires the operator to
 physically select the window which is to remain on top, or with
 LaunchOnTop, it doesn't work with the windows console window (The
 command prompt).
     so I will
 not make them fumble around with the mouse, which is required by the
 above mentioned programs.

Check the PowerMenu by Thong Nguyen. It is free of charge (but no
source) and has command line options that will do what you want.
It is at:  http://www.veridicus.com/tummy/programming/powermenu/

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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 run cygwin sshd as a domain user?

2005-11-09 Thread Ehud Karni
On Tue, 8 Nov 2005 13:20:25 -0500, Xing Qiu [EMAIL PROTECTED] wrote:

 No, I tried that, and it didn't work.  As far as I understand, cygrunsrv is
 just a wrapper to run some daemon in the background. I simply can't start
 sshd with my own user.  Below are the error messages:
^^^

 $ /usr/sbin/sshd.exe -d
 debug1: sshd version OpenSSH_4.1p1
 Could not load host key: /etc/ssh_host_key
 Could not load host key: /etc/ssh_host_rsa_key
 Could not load host key: /etc/ssh_host_dsa_key
 Disabling protocol version 1. Could not load host key
 Disabling protocol version 2. Could not load host key
 sshd: no hostkeys available -- exiting.

 Here is the result of ls -lh /etc/ssh* :

 $ ls -lh /etc/ssh*
 -rwx--  1 SYSTEM SYSTEM  1.3K Nov  4 15:03 /etc/ssh_config
 -rw---  1 SYSTEM SYSTEM   668 Oct 30 19:37 /etc/ssh_host_dsa_key
 -rw-r--r--  1 SYSTEM SYSTEM   600 Oct 30 19:37 /etc/ssh_host_dsa_key.pub
 -rw---  1 SYSTEM SYSTEM   525 Oct 30 19:37 /etc/ssh_host_key
 -rw-r--r--  1 SYSTEM SYSTEM   329 Oct 30 19:37 /etc/ssh_host_key.pub
 -rw---  1 SYSTEM SYSTEM   883 Oct 30 19:37 /etc/ssh_host_rsa_key
 -rw-r--r--  1 SYSTEM SYSTEM   220 Oct 30 19:37 /etc/ssh_host_rsa_key.pub
 -rw-r--r--  1 xqiu   mkgroup-l-d 2.8K Nov  4 15:03 /etc/sshd_config

 And if I do what the FAQ tells me to do, I get the following error message:


 cygrunsrv -I Xing_sshd -p /usr/sbin/sshd -a '-D' -u xqiu -w mypasswd
 ^^^
 ...

 $ cygrunsrv -S Xing_sshd
 cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1053:
 The service did not respond to the start or control request in a timely
 fashion.

 Should I go ahead change the ownership of /etc/ssh* ?

Yes !  If you want to run it with your own user, you must own the
/etc/ssh*key files (only the ownership is important).

Try it first with StrictModes and UsePrivilegeSeparation changed
to  no  (in /etc/sshd_config).

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: is there a cygwin maintainer for gnu emacs?

2005-08-09 Thread Ehud Karni
On Tue, 09 Aug 2005 01:08:36 -0400, emacs user [EMAIL PROTECTED] wrote:

 Ehud, thnx for the reply; I didn't do any rebasing (don't know what that
 is), and the problem is that emacs crashes about every 5 minutes, mostly in
 latex mode when I use the combination of auctex/preview/x-symbol.  very
 painful...   I don't have any such difficulties when using precisely the
 same combination under linux.


What X server do you use ? If it is not the Cygwin-xfree (XWin.exe)
I suggest you try it, because I saw some problems with a commercial
X server that disappeared after switching to Cygwin's XWin.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: is there a cygwin maintainer for gnu emacs?

2005-08-08 Thread Ehud Karni
On Mon, 08 Aug 2005 02:21:53 -0400, emacs user wrote:

 Hello, I find emacs to be very unstable under cygwin, crashing every couple
 of minures (both emacs 21.X and cvs emacs with and without gtk).  I
 submitted a few bug reports but received no reply.  I was hoping to find the
 maintainer and interact directly with her/ him.  any advice?  EU

AFAIK Joe Buehler is maintaining Cygwin Emacs. But may be he is not
subscribed to [EMAIL PROTECTED]

Cygwin specific Emacs problems should be discussed on cygwin@cygwin.com,
not on [EMAIL PROTECTED]

What are your problems ?

May be you did rebasing (especially rebase all) - it is known to
have a negative effect on Emacs.

I work with both Emacs 21.2 (distributed with Cygwin, prepared by
Joe Buehler) and Emacs 22.0.50 (updated from CVS and compiled on
2005-08-01), both in terminal mode and on X, and they work fine.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

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



Name of the Cygwin setup program (was Re: Is the Cygwin installation process ...)

2005-07-27 Thread Ehud Karni
On Mon, 25 Jul 2005 23:29:28 -0500, Herb Martin wrote:
 Larry Hall (LH) wrote:

 LH   - Name of setup utility: setup.exe
 LH
 LH I doubt this will change.  It was chosen ages ago in the
 LH hopes that it would be a well understood name for the Windows
 LH crowd.  So far, there's been no real complaint about the name
 LH and, better yet, no indication that someone can't install
 LH because they can't figure out what executable to run.  I'd
 LH say the name 'setup.exe' is here to stay.

 There are much better choices however -- many people will
 store such downloads in a generic download directory and
 having no mention of the actual program/system name in the
 file is a nuisance (understandable, but a nuisance.)

 And of course one can name the download something else when
 saving it, but then it is difficult to tell on the next
 update if you have the same file/different version already.

 cygwin.exe or cygwinsetup.exe would both be better names.

I also think that `setup.exe' is a bad name. `cygwin.exe' is no good.
`cygwinsetup' or `cygwin-setup' is good descriptive name. I suggest
to add the version to the name (e.g. cygwin-setup-2.457.2.2.exe), so
people reporting bugs will automatically include the version number.

Ehud.

--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Locking file in cygwin

2005-04-26 Thread Ehud Karni
 succeeded */
   exit ( 0 ) ;/* ALL OK ! ! ! */

   close ( hndl ) ;/* better close (free handle) */
   unlink ( tmp_nm ) ; /* MUST ! (otherwise will stop 
lock check) */
   }

   free ( tmp_nm ) ;   /* free tmp_nm when failed */
}
/*===*/



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Updated: OpenSSH-4.0p1-1

2005-04-11 Thread Ehud Karni
On Sun, 3 Apr 2005 14:57:34 +0200, Corinna Vinschen wrote:

 I've just updated the version of OpenSSH to 4.0p1-1.
 This is an official new release, based on the vanilla sources.

I've been bitten by a bug in this release when using scp with port
forwarding (see: http://bugzilla.mindrot.org/show_bug.cgi?id=996 ).

While trying to find the bug I had to compile `ssh'. The compilation
required the installation of the minires-devel package, as documented
in /usr/share/doc/Cygwin/openssh.README, but I still had unresolved
externals. Only after I changed the Makefile and added -lminires to
the LIBS line did it work. I think that this should be added to the
/usr/share/doc/Cygwin/openssh.README too.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: rxvt problem: Prompt doesn't look very nice

2005-03-24 Thread Ehud Karni
On Thu, 24 Mar 2005 14:53:45 -0500, Jonathan Arnold [EMAIL PROTECTED] wrote:

 Well, you aren't going to get a colored prompt from within Emacs, but you
 can set it up in your .bashrc so it is usable.  I have this code in my 
 .bashrc:

 if [ $EMACS == t ]
 then
  export PS1=*** \@ *** \w  ***\n\r
 else
  export PS1=*** [EMAIL PROTECTED] *** $YELLOW\w$WHITE  ***\n\r$NEUTRAL
 fi

 So while it isn't colored, it gives me the info anyway.

I do the terminal checking the other way, because many terminals can
not display colors. Like this:

if [ $TERM = xterm -o\
$TERM = cygwin ] ; then
   (set PS with colors)
else
   (set PS with NO colors)
fi

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Emacs 21.3.50

2005-03-11 Thread Ehud Karni
On Thu, 10 Mar 2005 09:14:56 -0500, Joe Buehler wrote:

 21.4 was recently released but is supposedly just a bugfix release,
 so I have no immediate plans to release a copy.  It may not even
 be easily doable since it probably does not have the Cygwin port
 applied to it.

Emacs 21.4 is different from 21.3 only in one external program -
movemail (used for local mail files and pop3).

 21.3.50 is probably a misnomer now that 21.4 has appeared.  It has
 probably been renamed to 21.5.50, but I haven't checked.

21.3.50 is now renamed 22.0.50 and the next official release is 22.1 .

22.0.50 can be built OOTB from CVS. It should be placed in another
place than the one included with Cygwin (e.g. in /usr/local which is
the default). You can have them both running on the same time.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

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



F1 F4 do not work with xwin-6.8.1.0-10

2005-02-07 Thread Ehud Karni
 to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack of 
shared memory support in
 the kernel
(--) Setting autorepeat to delay=500, rate=31
(--) winConfigKeyboard - Layout: 0409 (0409)
(--) Using preset keyboard for English (USA) (409), type 4
(--) 5 mouse buttons found
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from 
list!
winInitMultiWindowWM - pthread_mutex_lock () returned.
winProcEstablishConnection - Hello
winInitClipboard ()
winProcEstablishConnection - winInitClipboard returned.
winClipboardProc - Hello
DetectUnicodeSupport - Windows NT/2000/XP
winClipboardProc - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - pthread_mutex_lock () returned.
winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
winInitMultiWindowWM - pthread_mutex_unlock () returned.
winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the 
display.
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the 
display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry


Re: Ssh ignores $HOME

2004-12-29 Thread Ehud Karni
On Tue, 28 Dec 2004 22:39:42 -0500, Pierre A. Humblet [EMAIL PROTECTED] wrote:

 On Tue, Dec 28, 2004 at 08:24:55PM -0700, Ben Wing wrote:
 
  The problem is that . ssh is ignoring $HOME (despite its documentation)
  and arbitrarily looking in /home/$USERNAME.  .

 See last sentence in
 http://cygwin.com/faq/faq_2.html#SEC18

This last sentence needs a correction: If there is no /etc/passwd ssh
will use the supplied$ HOME.

I would replace the faq sentence with: Note that ssh disregard `HOME'
if /etc/passwd does exist.

I have checked this situation many times, as I make a minimal ssh
distribution (that can be run from a CD/flash) that run on machines
where Cygwin is not installed (and consequently - no mounts and
no /etc/passwd).

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Three questions

2004-12-29 Thread Ehud Karni
On Wed, 29 Dec 2004 10:44:02 -0500, Christopher Faylor wrote:

 Third: I tried removing an the .exe-extension from a file by issuing:
 $ mv tiny_mdi_example_without_ggdb.exe tiny_mdi_example_without_ggdb

 $ mv tiny_mdi_example_without_ggdb.exe tiny_mdi_example_without_ggdb.

Actually, this does not work (cygwin1.dll 1.5.12(0.116/4/2)), with
the same error as without the extra dot, but the following does work:
$ mv tiny_mdi_example_without_ggdb.exe another-name
$ mv another-name tiny_mdi_example_without_ggdb
no extra dot needed.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: file conversion utility sought: from isolatin (8859-1) to utf8

2004-09-28 Thread Ehud Karni
On Tue, 28 Sep 2004 13:48:23 +0200, [EMAIL PROTECTED] wrote:

 Ralf Hauser wrote on Tuesday, September 28, 2004 12:17 PM:

  Hi,
 
  Are there any tools like d2u or u2d for UTF-8 for cygwin?
 
  In http://lists.suse.com/archive/m17n/2004-Jun/0002.html,
  Bjoern talks about the recode and iconv utilities, but
  these don't appear to exist in cygwin.

 Recode builds OOTB though.

The `iconv' utility and `libiconv` are included in cygwin (in the
libiconv or libiconv2 packages).

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

--
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: Emacs crashing under XFree86-4.3

2004-03-17 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 15 Mar 2004, Zdzislaw Meglicki zdzisiekm (at) hotmail.com wrote:

 These are tidings of great sorrow and melancholy, for ever since I
 upgraded X11 on my Cygwin workstation (about a week ago) I lost my
 reliable faithful friend, GNU Emacs, whose X11 version crashes often
 and unpredictably with segmentation fault (the nox version runs
 fine).

On Mon, 17 Mar 2004, Rajesh Balakrishnan rajesh_balakrishnan (at) yahoo.com wrote:

 emacs (under X11) is working fine since Mar 06 snapshot of cygwin1.dll.
 http://cygwin.com/snapshots/

 Try it out.

I had some problems with the 2004-03-06 snapshot (or the XWin server
4.3.0.50), but since my last update Emacs works fine. I use:

XWin X Server 4.3.0.55
cygwin1.dll 1.5.8s(0.111/4/2) - 2004-03-12 18:34:47 snapshot

I noted also that the clipboard problems has been fixed.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAWBsbLFvTvpjqOY0RApruAJ0Saa9IcQSvoW3/iLf+xrRF0npwjgCfWWrY
l1hCz3ldyfzV+dZ9E0NUbX8=
=L3ou
-END PGP SIGNATURE-


Re: reset/terminate problems; preventing multiple XWin instances

2004-03-04 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 03 Mar 2004 23:57:22 +0200, [EMAIL PROTECTED] wrote:

 On 29-02-2004 14:11, Takuma Murakami wrote:

   As for preventing multiple instances of XWin
   This feature is already implemented in my local tree (not
   port based but mutex based detection).

 I see that it's in 4.3.0-50 and working well, but I don't see how the
 current implementation addresses the common task I mentioned:
open an xterm; run XWin first if needed
 If I use a batchfile that always runs XWin and then xterm, from the 2nd
 invocation onwards it will produce the error popup reporting a Fatal
 error and directing me a to log file... Not quite what's needed here.[1]

I have a similar problem on Linux (I use VNC virtual DISPLAY).
My solution is to use a shell script and check for the open port by
trying to connect to it. If this fails 5 times, I assume it is not
existing and do whats needed (I do check from remote computers too,
so whats needed varies). If the connection succeeds the application
is run with this DISPLAY. I wrote a small program that does the connect
with timeout, and a simple bash script that ensures killing the test
program if it hangs (which sometimes occurs).

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAR0cpLFvTvpjqOY0RAicrAJ9UfYPtmrdkZAEWvN0Wfn0dLT6iTACfW5ih
RTiI7UHJFx241QhRVoJ6V8w=
=Omh6
-END PGP SIGNATURE-


Emacs and snapshots (was Crashes of snapshot20040225 with Win95)

2004-02-26 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 26 Feb 2004 09:19:59 -0400, Rodrigo Medina [EMAIL PROTECTED] wrote:

 Snapshot 20040225 also crashes some programs in Win95.
 GNU Chess 5.05, that works with 1.5.5-1, crashes; Xwin also crashes in the
 same function of cygwin1.dll. I report gnuchess as it is a stable, simpler
 program than XWin.

I reported here that Emacs crashes with 1.5.7 and the following
snapshots, but I also worked on Emacs for long hours without crashes.
This mail made me think. The crashes were at home where I work with
Xwin, while the long sessions were at work where I work with another
X server. I'll check it more (I can run this X server at home too),
but until all Xwin problem are cleared we should assume that Emacs
crashes because of the X server.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAPf3FLFvTvpjqOY0RAmgWAJ9hbfo3UP9oJeZJKyAumbXOVloXXACfVxfv
r6mDL4mFcGhNqtwkgVDWVSo=
=g/EE
-END PGP SIGNATURE-


Emacs and snapshots (was Crashes of snapshot20040225 with Win95)

2004-02-26 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 26 Feb 2004 09:19:59 -0400, Rodrigo Medina [EMAIL PROTECTED] wrote:

 Snapshot 20040225 also crashes some programs in Win95.
 GNU Chess 5.05, that works with 1.5.5-1, crashes; Xwin also crashes in the
 same function of cygwin1.dll. I report gnuchess as it is a stable, simpler
 program than XWin.

I reported here that Emacs crashes with 1.5.7 and the following
snapshots, but I also worked on Emacs for long hours without crashes.
This mail made me think. The crashes were at home where I work with
Xwin, while the long sessions were at work where I work with another
X server. I'll check it more (I can run this X server at home too),
but until all Xwin problem are cleared we should assume that Emacs
crashes because of the X server.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAPf3FLFvTvpjqOY0RAmgWAJ9hbfo3UP9oJeZJKyAumbXOVloXXACfVxfv
r6mDL4mFcGhNqtwkgVDWVSo=
=g/EE
-END PGP SIGNATURE-

--
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: emacs Fatal error 11

2004-02-17 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 17 Feb 2004 12:03:56 +0100, Etienne Huot [EMAIL PROTECTED] wrote:

 I've experienced major emacs bugs using the latest realease of cygwin.
 Emacs causes a:
   Fatal error (11).Segmentation fault
 after few minutes. Generally when no key has been pressed for a while.
 And morover it has a very hazardous behaviour.
 [snip]
 Cygwin DLL version info:
 DLL version: 1.5.7

The 1.5.7 cygwin1.dll is buggy. Load the latest DLL snapshot (20040216)
from http://cygwin.com/snapshots/ . I've worked with it (i.e Emacs) for
few hours now and it seems stable.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAMlhxLFvTvpjqOY0RArphAJ9Ow963qo7GlwI+U6KyTddH1IThVwCfdif4
ztk8YmD3ZdwnO/AfxlEFjKw=
=3PWD
-END PGP SIGNATURE-

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



libungif - cygwin version should be updated

2004-02-16 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To the libungif maintainer (Charles Wilson ?, Lapo Luchini ? ).

Please update the libungif version to libungif-4.1.0b1-1 (or newer if
exists).

Lapo Luchini compiled it on 2003-10-01
(see: http://www.cygwin.com/ml/cygwin-apps/2003-10/msg00019.html ),
but it never made it into the Cygwin distribution.

I want it because Emacs requires the later version.
- From Emacs configure in remarks:

  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
  # Earlier versions can crash Emacs.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAMNTpLFvTvpjqOY0RAgLXAJ9LVY0a/qAeoI8rXQVx8jXz1dIhAACeMQEI
z6TQR+OUV+AC0r2hRVxQf2U=
=1odd
-END PGP SIGNATURE-

--
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: Problems with Emacs - Resolution(?)

2004-02-14 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 13 Feb 2004 08:24:31 -0600, Charles Plager [EMAIL PROTECTED] wrote:

 Due to (self-inflicted) problems, I did a fresh install of cygwin to
 1.5.7.1.

 Emacs started behaving very strange:
 * Random crashes
 * Suddenly taking up 100% of cpu

 This happened with all emacs versions I could get my hands on:
 * 21.2.9
 * 21.2.11
 * 21.2.12

 Earlier this week, I downgraded to cygwin 1.5.5.1 (I needed to downgrade
 ash to 20031007-1).  Since then I have had no problems with emacs.

 So, to my untrained eye, it looks like something in the new cygwin dll
 doesn't like emacs.

Please try the latest snapshot - cygwin1-20040214.dll . You can down
load it from http://cygwin.com/snapshots/ .

I tested it with Emacs for some hours now and it seems OK (I had 1
crash but I don't think its related). I'm trying to build Emacs from
CVS with it now (which crashed constantly with 1.5.7 and all snapshots
up to 20040206). I'll report the results here when it'll finish.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFALj8/LFvTvpjqOY0RAnzHAJ42BmGRNhi7v//PguNS0uLHHYlKewCeNNHW
CG0PH2xE3oLS41hpRZv8Xr4=
=bOVh
-END PGP SIGNATURE-

--
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: Problems with Emacs - Resolution(?)

2004-02-14 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 14 Feb 2004 17:31:12 +0200, Ehud Karni [EMAIL PROTECTED] wrote:

 Please try the latest snapshot - cygwin1-20040214.dll . You can down
 load it from http://cygwin.com/snapshots/ .

 I tested it with Emacs for some hours now and it seems OK (I had 1
 crash but I don't think its related). I'm trying to build Emacs from
 CVS with it now (which crashed constantly with 1.5.7 and all snapshots
 up to 20040206). I'll report the results here when it'll finish.

I'm sorry to say that cygwin1-20040214.dll has problems. Emacs has
still inconsistent behavior and unexplained crashes.

I manged to compile Emacs from CVS but when I run it, I get errors
(supposedly in lisp) that I don't get with the same Emacs and lisp
files on Linux.

This Emacs (21.3.50) also crashes much more then the distributed
Cygwin Emacs (21.2 compiled by Joe Buehler).

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFALmn7LFvTvpjqOY0RAoivAJ9GfpF7zmmNXGYjcQ+MtghWjNw0wQCeNzOE
m9jHzRITofHH5g1SAbBdUpU=
=hYBf
-END PGP SIGNATURE-

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



Snapshot cygwin1-20040206.dll (was Re: zsh-4.1.1-2 still seems broken under cygwin-1.5.7-1)

2004-02-12 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 12 Feb 2004 10:16:07 -0500, Christopher Faylor [EMAIL PROTECTED] wrote:

 There are still problems with the latest snapshot that I hope to have
 fixed today.  We'll see.

Just to let you know that the Emacs problems (inconsistent
behavior and crashes) are still there with cygwin1-20040206.dll .
The latest cygwin1.dll that work with the cygwin Emacs is 1.5.5 .

Sorry for the poor bug report.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAK9w+LFvTvpjqOY0RAgPCAKCIvmkHtoSoOsoBgi05KSfd0MwO5QCfcSgc
vj3S4GNrMTdJEmTT0Vh+YxI=
=PqTl
-END PGP SIGNATURE-

--
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: Snapshot cygwin1-20040206.dll (was Re: zsh-4.1.1-2 still seems broken under cygwin-1.5.7-1)

2004-02-12 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 12 Feb 2004 15:33:41 -0500, Christopher Faylor [EMAIL PROTECTED] wrote:

 So, I say the current snapshot has problems and you send email saying
 the current snapshot has problems.

 Doesn't sound like much information is flowing...

May be I should have added that when there will be a new snapshot,
I'll check it, I promise.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAK+W0LFvTvpjqOY0RAt85AJ92yNH+mzyG7fstX2K1D/McdSL9IgCfXQYK
5fk/hHSoYHT9AGkyFJFjm20=
=DOf3
-END PGP SIGNATURE-

--
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 key authentification problem

2004-01-19 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 19 Jan 2004 12:06:54 +0100, Marc Poppleton [EMAIL PROTECTED] wrote:

  The problem's probably on the server end. It must be configured to
  accept pubkey auth, as well as having your public key installed
  properly.  You can see that the client tries pubkey but it's not
  accepted.

 Yes, this is what it looks like to me.

The public key may be disallowed because of wrong permissions on the
server side. If you are logging into your own account on the server,
check that:
  Your home directory ($HOME) has no write permissions to group/other.
  Your SSH directory ($HOME/.ssh) is accessed only by you (i.e. 700)
  Your authorized keys file (authorized_keys or authorized_keys2) is
   in the SSH directory, not writable by others and has your
   public key in it.

If for any reason your home directory is writable by others (this is
a security breach), your system administrator can allow it by changing
the sshd configuration file (/etc/ssh/sshd_config) and restarting sshd.
She should check for the following line:
StrictModes no (default is yes)

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAC8ZxLFvTvpjqOY0RAuLiAJ0Tw1SXdSWAzNMgBbZcfTBiRZ8JTQCcC9ba
lp4ecbT6WJV7Pyokqb6dvZo=
=g5d4
-END PGP SIGNATURE-

--
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: Question about cygwin sshd and StrictModes

2003-12-10 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 10 Dec 2003 09:17:23 -0800, Matt Berney [EMAIL PROTECTED] wrote:

 Thanks for the no-help.  I have already read all relevant
 documentation that I could find.  That is the reason for
 posting a message to the group.  In the future, if you wish
 to be helpful, please offer more than RTFM.

I don't exactly know what Larry meant, but if you read the Fucking
manual as you claim, you either missed or misunderstood the following
(from the man pages of sshd_config(5) ):

  StrictModes
Specifies whether sshd should check file modes and ownership of
the user's files and home directory before accepting login.  This
^^
is normally desirable because novices sometimes accidentally
leave their directory or files world-writable.  The default is
``yes''.

Which is in plain English: check the permissions of your Home (~/)
and your ssh (~/.ssh) directories. Your home directory must NOT be
writable by others (not even from your group) and the ~/.ssh should
not be readable by others (because you may have your private keys
there).

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/121NLFvTvpjqOY0RApgtAJ9dsH7eFVYhn7KjgI0Mt6glHiSoygCfY4aU
dDt9iTdg2EqXanRErmOkBk8=
=DDIp
-END PGP SIGNATURE-

--
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: setpriority() and PRIO_PROCESS under Cygwin

2003-10-12 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, 12 Oct 2003 15:21:41 +0200, Hannu E K Nevalainen [EMAIL PROTECTED] wrote:

 + setpriority/getpriority are not implemented in Cygwin.

 This means; use __CYGWIN__ or some such to create conditional (i.e.
 exclusion of) compiling of those parts of the source.

I did it once like this (code from a program I no longer use):

#ifdef __CYGWIN__
#include windows.h   /* for some specific Windoz calls */
#endif /* __CYGWIN__ */


#ifdef __CYGWIN__
   {
   HANDLE WinId ;

   WinId = GetCurrentProcess ( ) ; /* get my Windows HANDLE */
   SetPriorityClass ( WinId , REALTIME_PRIORITY_CLASS ) ;  /* set priority to REAL 
TIME CLASS */
   }
#endif /* __CYGWIN__ */

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/ib6uLFvTvpjqOY0RAtdqAJ9HKOprp8ZnzJdrADlQ3eQxYYOfTACeJ9UZ
GPrUJElEq3ByYMSLLamRal4=
=Cmx0
-END PGP SIGNATURE-

--
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: change wallpaper periodly by cron?

2003-08-21 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 21 Aug 2003 04:15:29 +0100, Elfyn McBratney [EMAIL PROTECTED] wrote:

 Lucifer [EMAIL PROTECTED] wrote:
  On Wed, 20 Aug 2003 10:20:10 +0200
  Corinna Vinschen [EMAIL PROTECTED] wrote:
 
  CV
  CV It's a limitation of service processes.  You can only change it by setting
  CV the Allow service to interact with desktop property of the service.
  CV
 
  I enabled the Allow service to interact with desktop and it works now,
  thank you.  However, a DOS window titled as c:\cygwin\bin\cygrunsrv.exe
  popped out.  It's ugly.  Can that be avoided?

 AFAIK, it cannot. It's the ugly side effect of interactive service(s) on
 Windows.

Try to compile your program with -mwindows (without changing your
main function). I use this trick when I want a program without a
window (or console). If you run it from bash (or sh/csh) you wont
notice any change, but if you run it under command or cmd, it will
run without a (console) window.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/RMnHLFvTvpjqOY0RAvbKAJ9/NisvO2AiJpdQOdUBA4dVymz5SACeJka1
qt/n45d0M2boTdaGlKIbso8=
=uhKZ
-END PGP SIGNATURE-

--
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 session terminates with Ctl+C

2003-08-14 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 05 Aug 2003 16:38:38 -0400, Larry Hall [EMAIL PROTECTED] wrote:

 Brian, what makes you think this is a Cygwin problem?  To me, if it
 works Cygwin-Cygwin and Cygwin-Solaris but not Cygwin-Linux, then
 it's not likely that a change on the Cygwin side is going to help, IMO.
 FWIW, this worked for me Cygwin-Cygwin from bash and from rxvt without
 tty set for either attempt.

Larry, what makes you think this is a Linux problem? To me, if it
works Cygwin-Linux on XP pro and on W98 (both with Cygwin console
and rxvt) but not on W2K, it is not a Linux problem.
I worked with various Linux kernels and several versions of sshd and
I did not have problems with any of them. May be Jeff can give some
more details about his systems (PC and servers) - version of kernels
and of the ssh and sshd - then we will be able to make a somewhat
more educated guess.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/MCRjLFvTvpjqOY0RAjxSAJ4zJNI0ZnttQhEW1hVaDnKbjDdUOgCdGwt/
39lBT6qpxeW/9cm7ftitnlQ=
=4qt6
-END PGP SIGNATURE-

--
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: Operating system information

2003-08-09 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 08 Aug 2003 11:20:46 -0400, Larry Hall [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:

  Is it possible to find out the amount of physical memory and available swap
  of the machine through cygwin?
  In Solaris terms prtconf and swap -s

 How abut 'more /proc/meminfo'?

Why not use free ?

Ehud


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/NACMLFvTvpjqOY0RAptyAJ9gedECoVQ9xQbXmcComfh+bFQugwCeOdw+
tMSDKHCMATa8Z5HETL2P7jI=
=J4sh
-END PGP SIGNATURE-

--
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 session terminates with Ctl+C

2003-08-06 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 5 Aug 2003 16:17:24 -0700 (PDT), Jeff Nokes [EMAIL PROTECTED] wrote:

 Here's my ssh -v output:
  [snip]
 debug1: channel 0: request x11-req
 debug1: channel 0: request shell
 debug1: channel 0: open confirm rwindow 0 rmax 32768
 [EMAIL PROTECTED] jnokes]$ debug1: channel_free: channel 0: client-session,
 nchannels 1
 Killed by signal 2.

This line indicate kill on the local machine (Cygwin), see below.

 debug1: Calling cleanup 0x4138d0(0x0)
 debug1: Calling cleanup 0x41b2a0(0x0)


 [EMAIL PROTECTED] ~
 $
 *


 Also,
 I have a RH 7.2 box that I ssh to as well, and the same behavior occurs there
 as well.  Here is the output of that if you are interested:
  [snip]
 debug1: channel 0: request shell
 debug1: channel 0: open confirm rwindow 0 rmax 32768
 Last login: Fri Jul 25 17:57:35 2003 from d-sjc-jnokes.corp.ebay.com
 [EMAIL PROTECTED] jnokes]$ debug1: channel_free: channel 0: client-session,
 nchannels 1
 Killed by signal 2.

Same as above (local kill, i.e. Cygwin)

 debug1: Calling cleanup 0x4138d0(0x0)
 debug1: Calling cleanup 0x41b2a0(0x0)


To check your report I did 2 ssh sessions. In the first I killed the
remote (GNU/Linux sshd) the result is:

debug1: channel_free: channel 0: port listener, nchannels 4
debug1: channel_free: channel 1: port listener, nchannels 3
debug1: channel_free: channel 2: port listener, nchannels 2
debug1: channel_free: channel 3: client-session, nchannels 1
Connection to 192.214.178.73 closed by remote host.
Connection to 192.214.178.73 closed.
debug1: Transferred: stdin 0, stdout 0, stderr 91 bytes in 34.8 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 2.6
debug1: Exit status -1
debug1: compress outgoing: raw data 1271, compressed 942, factor 0.74
debug1: compress incoming: raw data 1987, compressed 939, factor 0.47

In the second I killed the local ssh (by `kill -2' from another bash):

debug1: channel_free: channel 0: port listener, nchannels 4
debug1: channel_free: channel 1: port listener, nchannels 3
debug1: channel_free: channel 2: port listener, nchannels 2
debug1: channel_free: channel 3: client-session, nchannels 1
Killed by signal 2.
debug1: Calling cleanup 0x4138d0(0x0)
debug1: Calling cleanup 0x41b2a0(0x0)
debug1: compress outgoing: raw data 931, compressed 769, factor 0.83
debug1: compress incoming: raw data 1272, compressed 585, factor 0.46

Signal 2 is SIGINT (the one created by the INTR in stty, usually ^C),
so it really seems that ^C is somehow caught by the local ssh.

I repeat that I can not reproduce this bug under XP pro, neither with
Cygwin console nor with rxvt window (cygwin1.dll, ssh same as yours).

A half apology to readers of my previous mail. As you can see I use
compression with ssh (I do it automatically - with a config file) so
I omitted (in my mind) the possibility of not using it.

Ehud.


- --
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/MLGALFvTvpjqOY0RAsQXAJ9XjLJC0eDmfR+/CPwa3PbRCdVVyQCfQ1A5
nCO50CwnGD7yBQOgTfllLSw=
=SbNA
-END PGP SIGNATURE-

--
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: cygwin license

2003-04-02 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 1 Apr 2003 20:55:09 -0500, Christopher Faylor [EMAIL PROTECTED] wrote:
 
 I've forwarded this request to our sales organization.
 
 On Wed, Apr 02, 2003 at 04:37:21AM +0400, Dmitri Dmitrienko wrote:
 Hello people developing Cygwin.
 
 I'm deeply impressed with all things you made with GNU tools when ported
 them into Win32 platform.
 We're interested in including some certain tools with our own commercial
 software.
 We consider two possible ways:
 a) shipping your tools as a separated package that would be shipped
 separately with our own installer.
 b) including your software into existing package.
 Mainly we're interested in ssh client, sshd daemon and all libraries that
 would allow them to run including cygwin dll itself.
 
 Please advice if it is possible and what conditions could be.

I'm intending to do a similar thing - to make a CD with some Cygwin
programs and libraries and some other (proprietary) programs NOT linked
to the Cygwin libraries. The sources for all the Cygwin programs and
libraries will be on the same CD.

I thought that this satisfy the GPL and I don't have to have a
license from Red Hat. Please confirm or correct me.

Ehud.



Appendix - detailed description of the software distributed
- ---

This distribution is of the SSH client. Only the following executable
are needed: ssh.exe cygwin1.dll cygz.dll cygcrypto-0.9.7.dll.
If rxvt window is preferred (easier support for Hebrew font and other
niceties) then rxvt.exe and libW11.dll are also needed. NO registry
setting or special directories (like /tmp or /etc) are needed.

On the CD I put the following sources: cygwin-1.3.22-1-src.tar.bz2
openssh-3.6.1p1-1-src.tar.bz2 openssl-0.9.7a-3-src.tar.bz2
rxvt-2.7.10-2-src.tar.bz2 zlib-1.1.4-1-src.tar.bz2 .

The running batch file is:

c:
set PATH=c:\tty\cygwin\bin
set HOME=/cygdrive/c/tty

cd \tty\cygwin\bin
rxvt -fn -*-Web Hebrew Monospace-normal-r-*-*-15-*-*-*-c-*-iso8859-1
- -geometry 120x46+0+0 -bg navyblue -fg yellow -sl 350 -e ssh -v %1


Of course the rxvt command is on one line. There is a config file in
the $HOME/.ssh that has all the targets.


- -- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE+ittALFvTvpjqOY0RAsVZAJ4kpsURA5VfO3KfCx1gnRkfXZLMwACaAlL8
1xZpamKkQzKKH0QxAMJKu94=
=hdc3
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Reading pop3 mail with GNU emacs on Cygwin (21.2-12)

2003-02-19 Thread Ehud Karni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

There is a very small bug that inhibit the pop3 mechanism in
rmail to work on Cygwin. The following patch fixes it.

cd /usr/share/emacs/21.2/lisp/mail/
diff -c /usr/share/emacs/21.2/lisp/mail/rmail.el_org 
/usr/share/emacs/21.2/lisp/mail/rmail.el
*** /usr/share/emacs/21.2/lisp/mail/rmail.el_orgFri Feb 22 12:51:38 2002
- --- /usr/share/emacs/21.2/lisp/mail/rmail.el  Wed Feb 19 14:02:59 2003
***
*** 1502,1508 
 (if rmail-pop-password-required
 (progn (setq got-password (not (rmail-have-password)))
(setq password (rmail-get-pop-password
!(if (eq system-type 'windows-nt)
 ;; cannot have po: in file name
 (setq tofile
   (expand-file-name
- --- 1502,1509 
 (if rmail-pop-password-required
 (progn (setq got-password (not (rmail-have-password)))
(setq password (rmail-get-pop-password
!(if (memq system-type '(windows-nt cygwin))
 ;; cannot have po: in file name
 (setq tofile
   (expand-file-name
Diff finished at Wed Feb 19 14:30:12

Ehud.


- -- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry
-BEGIN PGP SIGNATURE-
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE+U8S5LFvTvpjqOY0RAsUBAJ0TuWzriDfoHQ0xZOPz3/eymxC6dACfVOHK
dMRD9tMIi121Im5Eum2ckts=
=7mrl
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: rxvt, once again...

2002-12-29 Thread Ehud Karni
On Sat, 28 Dec 2002 19:19:09 -0800, Shankar Unni [EMAIL PROTECTED] wrote:
 
 In Win98 and Me, you cannot drag and expand the window, or set a buffer 
 size larger than the window size. Period. Don't know if they have 
 deliberately crippled XP Home to match Me (I don't have XP Home to check..)

The XP home `cmd' is not crippled (it can be resized horizontally and
vertically and have buffer larger than the screen).

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Bash puzzle: Spaces, environment variables and tab completion

2002-12-05 Thread Ehud Karni
On Wed, 4 Dec 2002 22:01:04 -0800 (PST), James Shaw [EMAIL PROTECTED] wrote:
 
 One minus with this 'cheat' is that I don't get
 the 'real' name of the path.  E.g. If I cd ~/pf,
 bash (correctly) thinks that I'm in /home/jhs/pf,
 but it would be nice to use the long name.  If it
 was a hard link, neither link would be the real
 name, but with a symlink, there is some sense of
 real and virtual.  So, if anyone has a fix for
 this minor glitch, I'd appreciate comments.

You can create a function to achieve your desire:

cd ()
{
builtin cd $1
builtin cd `pwd -P`
}

To test it interactively, you have to do the definition like this
function cd () { builtin cd $1 ; builtin cd `pwd -P` ; }

Now, whenever you'll cd to a directory it will translate the full
directory path to its real (cygwin's) path without any symlinks.

Note. This will work with the symlink work around, NOT with the
mount one (because mount is new REAL name).

Note to Gary - this is the bash/UNIX way, you don't have to use
cygwin's unique tools (like cygpath).

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Bash puzzle: Spaces, environment variables and tab completion

2002-12-04 Thread Ehud Karni
 
 What I want to do is define an environment
 variable so I can easily cd or ls.  E.g.
 % PF=/cygdrive/c/Program Files
 % cd $PF
 % ls $PF/Games
 % ls $PF/Gtab completion!
 
 The above is close, I can
 % cd $PF; ls $PF/Games; and even
 ls $PF/Gtab however, the quotes are clunky.

That's the bash way. You can get omit the enclosing quotes if you
change the IFS environment variable like this IFS=.
Note that this may harm execution of your commands/scripts. Read
the bash man page for more information.

My (bypass) solution to your problem is to make a symlink to the
desired directory without spaces in it and use that file name.
e.g. ln -s /cygdrive/c/Program Files ~/PF

The advantage of this bypass is that you can use the symlink in
scripts without defining the environment variable for each one.

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Possible bug in non blocking read from /dev/tty

2002-11-20 Thread Ehud Karni
I'm converting from a program linux to Cygwin. This program uses non
blocking read from the terminal by setting the VMIN and VTIME in the
`termios' structure and doing a non CANON read, like this:

   ttyarg.c_cc [VMIN] = 0 ;
   ttyarg.c_cc [VTIME] = 1 ;
   ttyarg.c_lflag = 0 ;

The read does BLOCK (wait for a character to be typed) and does not
return after 1/10 second as it supposed (It works OK on linux).

I added a call to `stty -a' before and after I change the terminal
attributes. here is the output:

Before:
speed 38400 baud; rows 49; columns 105; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = undef; eol2 = undef; 
start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 
2;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc 
-ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke

After:
speed 38400 baud; rows 49; columns 105; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = undef; eol2 = undef; 
start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 0; time = 
1;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc 
-ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -tostop -echoctl -echoke

As you can see the VMIN  VTIME values were set, and the icanon was
changed to -icanon.

My system is P4, 1.7GH, running M$Windows XP. Output of uname -a :
CYGWIN_NT-5.1 P4-1700-XP 1.3.15(0.63/3/2) 2002-11-07 13:57 i686 unknown

Setting the CYGWIN environment variable to tty/notty have no effect.
A full test program with debug messages is below.

Ehud.


//  test_read_term.c  program

#include stdio.h
#include stdlib.h
#include unistd.h
#include termios.h

int main ( int argc, char *argv[] )

{
FILE *devttyr = NULL ; /* stream for terminal I/O */
struct termios ttyarg, intrm ; /* arguments for termios */
char buf [ 50 ] , *lni ;
int ftty, n , rdn , length ;   /* devtty file number, temp n, rdn */

   length = atoi ( argv [ 1 ] ) ;  /* real length to read */

   lni = buf ; /* pointer to input */

   if ( ( devttyr = fopen ( /dev/tty , r+ ) ) == NULL )/* open (terminal ?) 
for read */
   {
   fprintf ( stderr , Could not open /dev/tty ) ;
   exit ( 1 ) ;
   }

   ftty = fileno ( devttyr ) ; /* file number of devtty */
   tcgetattr( ftty , intrm ) ;/* get stdin arguments (SAVE) */
   ttyarg = intrm ;/* saved original configuration */

   ttyarg.c_cc [VMIN] = 0 ;/* min of 0 chars */
   ttyarg.c_cc [VTIME] = 1 ;   /* wait max vtime_val/10 sec (def 15/10) */
   ttyarg.c_iflag = IGNBRK | IGNPAR | ICRNL | IMAXBEL ;/* set these modes only on 
input */
   ttyarg.c_lflag = 0 ;/* clear lflag of all processing */

   system ( stty -a ) ;
   n = tcsetattr( ftty , TCSANOW , ttyarg ) ; /* set changed tty arguments */
   fprintf ( stderr , result of tcsetattr is %d\n , n ) ;
   system ( stty -a ) ;

   lni [ length + 1 ] = 0 ;/* last pos must be Z byte */
   while ( length  0 )/* read until buffer full */
   {
   fprintf ( stderr , before read --\n ) ;
   rdn = length ;  /* min (length, MAX_BEL) */
   n = read ( ftty , lni , rdn ) ; /* read devtty, max n chars, up to 1/2 sec 
wait */
   fprintf ( stderr , AFTER  read n=%d -\n , n ) ;
   switch ( n )/* read devtty, max n chars, up to 1/2 sec 
wait */
   {
   case -1:/* error */
   fprintf ( stderr , Error occurred \n ) ;
   length = 0 ;/* exit while loop */

   case  0:/* no input (do nothing) */
   break;  /* all ok */

   default:/* input read, check for terminating NL */
   lni += n ;  /* next address */
   *lni = 0 ;  /* must (we may stop reading) */
   length -= n ;   /* length left to read */
   if ( *(lni-1) == '\n' ) /* if last char is NL */
   length = 0 ;/* dont read any more */

   }
   }

   tcsetattr( ftty , TCSANOW ,  intrm ) ; /* reset devtty to saved value */
   return ( 0 ) ;
}
/*=== end of test_read_term.c =



--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon

Re: Uses for Cygwin/XFree86

2002-10-28 Thread Ehud Karni
On Sun, 27 Oct 2002 20:43:20 +0100, Steinar Bang [EMAIL PROTECTED] wrote:
 
  Rick Umali [EMAIL PROTECTED]:
 
  I captured the screen shots into Paint Shop Pro, and saved the
  images directly to JPG. I didn't save them into BMP, unfortunately.
 
 Once you have saved them as JPEGs, the blurring has already occurred. 
 
 What happens is that sharp transitions are blurred because of the
 quantization done by the JPEG algorithm.  Basically, the high
 frequency components in the image are chopped away.

May I suggest the use of Irfan view ( http://www.irfanview.com/ ).
It is a freeware, It can capture the whole screen (or a window) and
save it in many formats (including png).

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry



Re: What's a good term setting for rlogin?

2002-10-09 Thread Ehud Karni

On Wed, 9 Oct 2002 11:31:32 -0400, Charles Krug [EMAIL PROTECTED] wrote:
 
 On Wed, Oct 09, 2002 at 10:26:45AM -0400, [EMAIL PROTECTED] wrote:
  Why not just copy the Cygwin termcap entry to the machines that you log
  into?
  
 
 I copied these lines from /Cygwin/etc/termcap into $HOME/.termcap:
 
 cygwin:\
 :xn@:op=\E[39;49m:Km=\E[M:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:tc=linux:
 
 Setting TERM to cygwin, I get:
 
 homer:charles% info termcap
 info: Terminal type `cygwin' is not smart enough to run Info.
 
 Any other ideas?

Bellow is what I what I have in my termcap. I added it a long time ago
so I don't remember where I took it. If the comments are right it was 
written (modified) by Earnie Boyd, a regular Cygwin contributor.

Another option is to use rxvt (which uses xterm).

Ehud.


# Use this for cygwin (tested with version 1.1.0).
# I've combined pcansi and linux.  Some values of course were different and
# I've indicated which of these were and which I used.
# Cheers, [EMAIL PROTECTED]
# several changes based on running with tack and comparing with older entry -TD
# (untranslatable capabilities removed to fit entry within 1023 bytes)
# (sgr removed to fit entry within 1023 bytes)
# (acsc removed to fit entry within 1023 bytes)
cygwin|ansi emulation for Cygwin:\
:am:eo:in:ms:xo:\
:Co#8:NC#3:co#80:it#8:li#25:pa#64:\
:7=^Z:@7=\E[4~:AB=\E[4%dm:AF=\E[3%dm:AL=\E[%dL:DC=\E[%dP:\
:DL=\E[%dM:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:\
:F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:\
:FA=\E[34~:IC=\E[%d@:S2=\E[11m:S3=\E[10m:al=\E[L:bl=^G:\
:cb=\E[1K:cd=\E[J:ce=\E[K:ch=\E[%i%dG:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:cr=^M:cv=\E[%i%dd:dc=\E[P:dl=\E[M:do=\E[B:\
:ei=\E[4l:ho=\E[H:ic=\E[@:im=\E[4h:k1=\E[[A:k2=\E[[B:\
:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
:k9=\E[20~:k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:\
:kb=^H:kd=\E[B:kh=\E[1~:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:\
:md=\E[1m:me=\E[0;10m:mk=\E[8m:mr=\E[7m:nd=\E[C:nw=^M^J:\
:op=\E[39;49m:r1=\Ec\E]R:rc=\E8:sc=\E7:se=\E[27m:sf=^J:\
:so=\E[7m:sr=\EM:st=\EH:ta=^I:u6=\E[%i%d;%dR:u7=\E[6n:\
:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:



-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Help changing dir with spaces...

2002-02-27 Thread Ehud Karni

On Wed, 27 Feb 2002 18:56:28 +0100, Jonathan Gift [EMAIL PROTECTED] wrote:
 
 I'm very familiar with Linux and new to Cywin, but one of my first
 priorities is to mobe around the Bash shell. The only really pressing matter
 is how to move to the folders under WXP: C:\Documents and settings
 
 I can move to C:\Work or C:\tmp but anything with spaces it balks at. Since
 I can't change XP's default, is there a way to get Bash to accept the space?

Bash on Cygwin works exactly as Bash on GNU/Linux. If you are very
familiar with Linux, you should know that you have several options.
1. You can escape the space by using backslash, i.e. do
   cd /cygdrive/c/Documents\ and\ settings 
2. You can use wildcard - cd /cygdrive/c/Documents*settings
   or  cd /cygdrive/c/Documents?and?settings 
3. You can quote the full directory name, i.e. do
   cd /cygdrive/c/Documents and settings
4. You can use the Bash name completion mechanism -
   type:  cd /cygdrive/c/Documen  and TAB
  play with it and learn how it work.

Ehud.
P.S. I saw Larry's email, but I couldn't resist myself.

-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Help changing dir with spaces- Uncle!

2002-02-27 Thread Ehud Karni

On Wed, 27 Feb 2002 20:19:42 +0100, Jonathan Gift [EMAIL PROTECTED] wrote:
 
 BTW, just how cool is Cygwin? First I heard of it was just a short time ago.
 Really like having a great shell again?

Cygwin is cool! I'm using it for more than 2 years and it made
my life much easier on M$Windows front. I port programs from UNIX
in a matter of minuets and I can use (almost) all the GNU tools.

We must all thank the small Cygwin team and the few long time
volunteers who help them.

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Emacs for Cygwin (was: cygwin-mount.el, Using GDB in NTEMACS)

2002-02-26 Thread Ehud Karni

Below is Eli Zaretskii mail from 23 Feb 2002.

I think that we need a CygEmacs - an emacs that will be compiled with
the real Cygwin ported gcc (i.e. without the -mno-cygwin). CygEmacs
will have UNIX APIs for I/O (files and sockets), and M$Windows APIs
for the display and the keyboard. This is already done (partly) by the
Cygwin port of rxvt.

If this is too difficult, may be a version of Emacs for Cygwin, that
use only the UNIX APIs can be ported. This Emacs version will be used
only within Cygwin's windows - Console or rxvt (Emacs in TTY mode) or
real display (using Cygwin-Xfree).

Any of these version will solve the 2 major issues of using Emacs with
Cygwin - 1. The files (names and attributes). 2. Running of sub-shells
in Emacs (file is not tty problem). It may solve another problem that
bothers me - running a client on the PC to a server on UNIX.

Ehud.


--- Original Eli's mail ---

 From: [EMAIL PROTECTED] (Jari Aalto+mail.emacs)
 Date: Sat, 23 Feb 2002 11:29:27 +0200
 
 all Windows users continue complaining why Emacs does not help them
 to use Cygwin environment more easily.

They should complain to Cygwin developers.

I asked before, and I'll ask again: did someone try to talk to the
Cygwin developers about this issue?  Did someone ask them what do
they think about supporting Windows file names better, and if so,
what did they reply?

It strikes me that an important party to this discussion is strangely
absent.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/