Re: Text editor with shell integration

2010-05-10 Thread Luc Hermitte
Hello,

Angelo Graziosi wrote:

  lood HIDDEN please! wrote :
 
 Please, read this: http://cygwin.com/acronyms/#PCYMTNQREAIYR

Hum ... I missed that. I was used to less stupid mirrors (and a lot of spam...)


  I have written cyg-wrapper.sh to answer this need.
  http://hermitte.free.fr/cygwin/#Win32
 
 Very interesting! (That script should be added to Cygwin, as new
 package or to cygutils...)

Thanks. 


 Suppose I want a wrapper for:
 runas.exe /user:pippo C:\cygwin\Cygwin.bat
 to be started as
 $ sudos su
 I have tried this (in .bashrc):
 
 =
 SU_ARG=/Cygwin.bat
 
 sudos() {
opt=''
if [ `expr $* : 'su\'` -gt 0 ] ; then
opt+=`cygpath -p -w $SU_ARG`
fi
cyg-wrapper.sh /cygdrive/c/WINDOWS/system32/runas.exe \
--slashed-opt --binary-opt=-user:pippo $opt
 }
 =
 
 but... it does not work :(
 
 What I am missing!?

You missed that my non-old function is bugged. And so did I :(
The last case (plain path) shall become:
# Plain path or options.
case $1 in
[-+]* ) # Option
if [ $slashed_opt = 1 ] ; then
param[${#param[*]}]=${1/-//}
else
param[${#param[*]}]=$1
fi
;;

Which can be used this way:
  $ cyg-wrapper.sh /cygdrive/c/WINDOWS/system32/runas.exe --slashed-opt 
--cyg-verbose=2 -user:pipo $@

However, a little bit more work is necessary.
The first argument to the function/alias shall be tested. If it is found in 
$PATH, it shall be left unchanged, otherwise, it shall be translated as well.
Or just always translated with $(which $1) may be.

-- 
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

--
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: Text editor with shell integration

2010-05-07 Thread Luc Hermitte
Hello,

lood loodziek...@yahoo.com wrote :

 How could I integrate my text editor (e.g. Notepad++) to run
 it easily from Cygwin? I mean, something similiar to
notepad ./file.ext
 this works, I just want to use Notepad++ instead of standard Windows
 editor (notepad++ ./file.ext or something like that). Where I can 
 add this functionality? Thanks.

I have written cyg-wrapper.sh to answer this need.
http://hermitte.free.fr/cygwin/#Win32

The alias I give as example in the documentation is for gvim.

If your editor does not have special parameters that must not be 
handled as pathnames that need translation, you can simply play
with $(cygpath -l $@) as others have already told you.

HTH,

-- 
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

--
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: Can not start UltraEdit using cygwin path

2006-10-17 Thread Luc Hermitte
On Sun, 15 Oct 2006 19:49:12 -0600, lin q wrote:
 Interesting enough, I have similar function for gvim,
  
   vi ()
   {
   gvim $@ 
   }
 
  gvim is a Cygwin application.

 I download gvim myself from vim web site and installed it, it is not
 the one in cygwin package. This is the reason I think the application
 does not have to be from cygwin package.

I'd be surprised to see your alias work with win32-gvim and cygwin
paths (symlinks, absolute cygwin paths, ...)

For this sole purpose, I'm maintaining a generic wrapper for win32
native applications we wish to start from cygwin (cyg-wrapper.sh, check
my signature)

NB: I've been reported a bug lately. It seems tied to a bug/regression
in cygpath 1.42 which seems to have forgotten a 0-terminal when called
with -wl.

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

--
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: Starting gvim from Windows

2006-03-18 Thread Luc Hermitte
Hello,

* On Thu, Mar 09, 2006 at 09:38:19AM -0500, Neil Watson [EMAIL PROTECTED] 
wrote:
 I don't use X.  I just use RXVT windows on top of the Windows
 Desktop.  I don't use Cygwin's version of Gvim.  I use the Windows
 version.  To use Gvim from Cygwin, I have a small script (attached)
 that converts Cygwin paths to Windows paths and then launches Gvim.

(In case you wish to not convert arguments that are not paths, check at
cyg-wrapper.sh that I'm maintaining, see my signature)

 With this setup, I can use a single version of Gvim from both Windows
 and Cygwin.
 
 I've tried this in the past.  The problem I found was that Windows VIM
 required a different vimrc syntax then the Unix VIM.  I was hoping to
 avoid keeping two copies of my growing and changing vimrc file.

I have only one .vimrc that is use for windows, Linux and Solaris.
Actually, 
- under windows I have a _vimrc files that sources vimrc_core.vim plus
  a _vimrc_win for windows specific settings (fonts, mappings to open
  URL in the default browser, ...)
- under *nix, I have a .vimrc that also sources vimrc_core.vim plus a
  _vimrc_nix for *nix specific settings (key rebindings (that will be
  updated soon thanks to feddback from vim-ml), ...)

I've never used cygwin-version of vim, but it should not be any
different.

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

--
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: Permission denied on Windows XP

2005-01-19 Thread Luc Hermitte
* On Thu, Jan 20, 2005 at 12:59:16AM +, Donald Hyun [EMAIL PROTECTED] 
wrote:
 Larry Hall lh-no-personal-replies-please at cygwin.com writes:
 [...]
 fork: Permission denied
 make[1]: fork: Permission denied
 make[1]: vfork: Permission denied
 make[1]: Leaving directory
 '/cygdrive/d/Phevos/df/hardwl/modules/hwlgpm/srce'
 make: *** [d:/Phevos/df/hardwl/modules/hwlgpm] Error 2
 ---
 
 I have tested on cygwin 1.3.5, cygwin 1.5.9, 
 and cygwin 1.5.12, but it's not solved.
 After robooting windows XP, the script seems to work well. 
 But during running the same message happens.
 
 I don't want to format my note-pc. Is there any good idea?

Are you using Agnitum Outpost Firewall ?
Is so find another firewall that does not leak ressources.

HTH,

-- 
Luc Hermitte

--
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: Not what I expected at first startup :0

2004-10-24 Thread Luc Hermitte
Hello,

* On Sun, Oct 24, 2004 at 04:08:19PM +0100, Nemes [EMAIL PROTECTED] wrote:
 Firstly I would to ask if it is normal for  cygwin to startup and just
 show a cmd.exe black window as the access to the install??

Yes it is.

 Also what is the, irc application, is it,  virc, XChat BitchX or
 something?  Right now allo I no is it's called, irc :) lol

I have recompiled irssi latelly. Otherwise, I remember there are some
packages for IRC, but i do not know which program it is.

 As you can probably tell, I am new to both linux and cygwin, and I
 though cygwin would be a good place to start.

It is a good place. To start, I don't know. I use it because I liked the
shell and other tools I discovered on Solaris, and it is the only way to
have a proper port of Mutt.

 I have had some limited experience with linux via SuSE aand Slackware,
 so I am not a complete newbie, but the starting up of cygwin was
 totaly not what I expected,  so it has left me a little stuck on were
 to go next.

You can continue with Windows for the GUI stuff, and begin to learn how
to use the console. Actually learning how to use linux does not make any
sens to me. GNU/Linux is an OS where we can find many GNU tools plus
many different programs. 

 I was kind of hoping for a graphical ide so I could start to learn
 from a familair surrounding you no? I could edit files that needed to
 be edited in a familar way, start applications graphicaly untill I got
 used to working the shell cmd line.

vim is great. Some prefer emacs... Other prefer more flashy programs...

-- 
Luc Hermitte

--
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 implementation of fork() eating all resourses?

2004-09-05 Thread Luc Hermitte
* On Mon, Sep 06, 2004 at 08:42:56AM +0400, Artem Gluhov [EMAIL PROTECTED] wrote:
 After 5 minutes running this script  i got a windwows XP 
 error: not enough system resourses.

You have Agnitum Outpost, haven't you ?
If so, uninstall it and choose another firewall.

HTH,

-- 
Luc Hermitte

--
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: ls -l | less shows escape chars

2004-07-01 Thread Luc Hermitte
Hello,

* On Thu, Jul 01, 2004 at 09:06:16AM -0400, geneSmith [EMAIL PROTECTED] wrote:
 Also, my less man page is totally messed up. All other man pages seem
 to work.

I have 
export PAGER='less -R'
in my .bashrc

HTH,
-- 
Luc Hermitte

--
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: Bug: cygpath -w . returns .\ instead of .

2004-07-01 Thread Luc Hermitte
Hello,

* On Thu, Jul 01, 2004 at 02:42:46PM -0700, Trevor Baker [EMAIL PROTECTED] wrote:
 Now in cygwin this may cause problems elsewhere, such as in the following
 trivial script:
 #--
 #!/bin/sh
 
 BASEDIR=`cygpath -w .`
 FILE=$BASEDIR/out.txt
 
 touch $FILE
 #--

use -m instead of -w

 I'm using the latest cygwin v1.5.10-3 on NT2k. Don't know cygpath
 version...sorry.

cygpath -v

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

--
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: find the path for cygwin root from windows script

2004-06-17 Thread Luc Hermitte
Hello,

* On Thu, Jun 17, 2004 at 11:12:00AM +0200, bertrand marquis [EMAIL PROTECTED] wrote:
i need to be able to find where cygwin is install from a .bat script 
 under windows to run cygwin programs.
 Does anyone has a solution to do that automaticaly ?

cygpath -m /

However, this solution requires that cygwin directories are visible from
your $PATH. In other words, you won't really need to know where they are
installed.

-- 
Luc Hermitte

--
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: mutt and ssmtp on Cygwin on Windows Server 2003 'child exited 127'

2004-05-19 Thread Luc Hermitte
* On Wed, May 19, 2004 at 09:16:11AM -0400, Buchbinder, Barry (NIH/NIAID) [EMAIL 
PROTECTED] wrote:
 If I remember correctly (I have not played with mutt for quite a
 while), mutt can connect directly to a IMAP or POP server.  So might
 you be able to eliminate the use of ssmtp and have mutt send mail
 directly to the place that ssmtp sends it?

IMAP and POP3 protocols are meant to import emails.
SMTP is meant to export (/send) them.

I do use mutt with ssmtp to send messages like this one and I read my
email directly on an IMAP server.

Unfortunatelly, I can't help much. I use XP and every thing is working
fine. ssmtp is used to send the emails to a local STMP server (Hamster),
which then relays my messages to the SMTP servers of my ISP.

The only times I get the error
 Error sending message, child exited 127 (Exec error.).
 Could not send the message.
is when Hamster is not running -- as ssmtp can't reach the SMTP server
it must send the messages to.

But I'm not sure it is of any help here.

-- 
Luc Hermitte

--
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 start windows version gvim for cygwin correctly?

2004-05-12 Thread Luc Hermitte
Hello,

* On Tue, May 11, 2004 at 09:30:15PM -0700, Peng Yu [EMAIL PROTECTED] wrote:
 Thank you for you script. I don't change $HOME, $VIM, $VIMRUNTIME in
 cygwin, because I'm afraid there are some potential conflicts. Do I
 have to worry about that.

Nope. I don't think so.
In the properties of my Windows XP system, HOME is set to c:\Users\Luc
I've patched /etc/profile to make cygwin think it is in fact
/cygdrive/f/Users/Luc
Neither VIM nor VIMRUNTIME are set.
I'm currently using gvim to edit this response. gvim has been launched
thanks to cyg-wrapper, and it expands $HOME, $VIM and $VIMRUNTIME into:
f:\Users\Luc
f:\Program Files\Edition\vim
f:\Program Files\Edition\vim\vim62

The _vimrc used is the one from $VIM (I do not have to say anything to
vim), and the viminfo is $HOME/.viminfo
because of 
set viminfo=%,'50,\100,:100,n~/.viminfo
in my _vimrc.

 BTW, what's the best place to store cyg-wrapper.sh . I store it to
 /usr/bin. Is /bin better?

Wherever you want. Personnally, I prefer $HOME/bin. Thus the day I
reinstall cygwin or use it on another computer, I don't forget all the
little scripts I use.

If I had to choose between cygwin directories, I would use
/usr/local/bin as I install non-cygwin-standard stuff into /usr/local/
-- understand, the stuff I've compiled like mutt, a colored version of
abook, irssi, w3m, librairies, ...

HTH,
-- 
Luc Hermitte

--
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 start windows version gvim for cygwin correctly?

2004-05-11 Thread Luc Hermitte
Hello,

[I've set a reply-to to vim's mailing list and your email address; you
may need to be registered to post on this mailing-list]

Just a little note first, I use the win32 version of vim since the
version 5.8 (the beta version 6.3a is very recent) and cygwin. So far, I
have no problems.

My $HOME directory for windows (XP) and for Cygwin is set to
f:\users\Luc (or the cygwin's equivalent). I do not wanted it to be
function of how I launch gVim.

* On Tue, May 11, 2004 at 04:30:46PM -0700, Peng Yu [EMAIL PROTECTED] wrote:
 /cygdrive/d/Program\ Files/vim/vim61/gvim.exe
 
 When enter the above command in cygwin, gvim window popup. But it
 seems that gvim doesn't load D:\Program Files\vim\_vimrc.

Do you have a _vimrc in your $HOME ?  This file is searched according to
what is said there:
:h .vimrc
This should help you find your _vimrc.
otherwise, you can add
call confirm('.vimrc in '.expand('%:p:h'), 'Ok', 1)
in every _vimrc, .vimrc, _exrc you can find on your system to be sure
which one you are using.

 In addition, it creates a file _viminfo in my home directory versus
 using the default _viminfo in D:\Program Files\vim\

This is a safe setting IMHO.

 Do you have any idea about make gvim use the default _viminfo file
 without writing a new file in my cygwin home directory?

Once you have found where your _vimrc is stored, set the option viminfo
accordingly to your wishes.
:h 'viminfo'

HTH
-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/
http://hermitte.free.fr/vim/

--
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 start windows version gvim for cygwin correctly?

2004-05-11 Thread Luc Hermitte
* On Tue, May 11, 2004 at 07:46:04PM -0700, Peng Yu [EMAIL PROTECTED] wrote:
 But I can not change the directory Programs Files to other names.
 Is there anyway to include blank in the alias command?

I made cyg-wrapper.sh [1] to launch gVim-win32 (at first) from cygwin,
but it should not solve your problem which is probably specific to vim.

Unless 
Are your environment variables ($HOME, $VIM, $VIMRUNTIME) different
within cygwin and windows ? If so, fix this.

[1] http://hermitte.free.fr/cygwin/#Win32
-- 
Luc Hermitte

--
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: Scripts for calling Internet Explorer,Explorer,Word,Access,Excel from Cygwin

2004-05-09 Thread Luc Hermitte
Hello,

* On Sat, May 08, 2004 at 01:40:16PM +0100, zzapper [EMAIL PROTECTED] wrote:
 With help from this NG have created the following scripts, I think
 they are very useful especially wexp. (Paths to various apps on your
 PC may vary of course). Excepting wexp all require a filename as
 parameter eg  wmdb test.mdb
 [...]
 
 #!/bin/sh
 # wexp
 # description : Launch Windows Explorer with correct Windows path
 XPATH=$(cygpath -w ${PWD});
 echo $XPATH
 explorer $XPATH
 
 #!/bin/sh
 # wpdf
 # description : Launch Acrobat Reader with correct Windows path
 XPATH=`cygpath -w ${1}`;
 echo $XPATH
 C:/Program\ Files/Adobe/Acrobat\ 6.0/Reader/AcroRd32.exe $XPATH 

These kinds of solutions are imperfect -- cygstart's solution as well.
- They do not handle multiple files
- wpdf *.pdf
- cygstart *.pdf
- They do no handle some special option, like '/e' for explorer
- They do not handle some binary options like  -c /e/  with gvim

Hence the script cyg-wrapper.sh (check my signature).


BTW, until now, I was using  $COMSPEC /c start  to launch a win32
application i did not want to be attached to the current shell.  It no
longer works (probably since the last time I patched XP). 
I can not rely on cygstart as it accept only a limited number of
characters on its command line -- unless it has been fixed since the
version 1.0
And  $cmd2execute 0  ; disown  never worked.
Does anybody got an idea how to fix that ?


-- 
Luc Hermitte
http://hermitte.free.fr/cygwin#Win32 (Vim TIP #381 BTW)

--
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: Problem: fork: permission denied, after intensive use of scripts

2004-04-18 Thread Luc Hermitte
Hello,

* On Sun, Apr 18, 2004 at 12:30:52PM +0200, Michael Gorbunov [EMAIL PROTECTED] wrote:
 I have noticed a problem in cygwin when run on Windows 2000
 and Windows XP. After running scripts with a big number of
 command repeated in a long cycle, at some point I cannot
 start anything and receive messages like
 fort: permission denied.
 It looks like PIDs that were used once cannot be reused.
 Does anyone know the solution?

I know a firewall that causes such problems : Agnitum Outpost Firewall.
If you are using this firewall, don't look anywhere else. It's its
fault.

-- 
Luc Hermitte

--
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: Problem when compiling c++ using gcc

2004-03-20 Thread Luc Hermitte
Hello,

* On Sat, Mar 20, 2004 at 03:46:34AM -0500, Feng Y [EMAIL PROTECTED] wrote:
  I used the following command to compile the c++ file:
  gcc -o ping ping.cc

Use g++ and not gcc to compile C++ code. Or at least, add the arguments
that tell gcc that it is compiling C++ code.

  I got the following messages:
  agent.h: No such file or directory
  tcltc.h: No such file or directory
  packet.h: No such file or directory
  
  
  How can I link these header files in NS directories?

Where are they installed ? Let's say there is an $NS2/include directory
= g++ -I$NS2/include -o ping ping.cpp

Anyway, these questions are not relative to cygwin, but to GCC and other
*nix command-line compilers.
= 
- man gcc
- find a tutorial about makefiles, compiling under unices, etc...


HTH,
-- 
Luc Hermitte

--
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: GVIM

2004-03-17 Thread Luc Hermitte
Hello,

* On Wed, Mar 17, 2004 at 12:44:33PM -0500, Crescioli, Phil [EMAIL PROTECTED] wrote:
 I took your bash shell vi-gvim converter and re-wrote it
 [...]
  alias vi C:/vim/vim62/gvim.exe

You will need to convert the path of the files (and only the files) sent
to gvim, like /etc/Muttrc for instance.
I wrote cyg-wrapper.sh for this purpose.
http://hermitte.free.fr/cygwin/#Win32

HTH,
-- 
Luc Hermitte

--
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: Converting Dos Slashes to Unix Slashes

2004-03-14 Thread Luc Hermitte
Hello,

* On Sun, Mar 14, 2004 at 07:23:24PM +, zzapper [EMAIL PROTECTED] wrote:
 From
  man cygpath
 
 Look at this generically useful script
 [...]
 # description : Launch Explorer with correct Windows path
 [...]

You may also check cyg-wrapper.sh (Vim tip #381 BTW) which does several
other useful things.
http://hermitte.free.fr/cygwin/#Win32

-- 
Luc Hermitte

--
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: memory leaks in fork(?)

2004-01-30 Thread Luc Hermitte
Hello,

* On Fri, Jan 30, 2004 at 04:25:20PM +0600, Mike Jastrebtsoff [EMAIL PROTECTED] 
wrote:
 While fulfilling of any building procedure under cygwin via make,
 configure(utils, that widely use spawning of other processes) appears
 memory leak, that leads to termination of building process: fork:
 permission denied or sometimes to system reboot. [...]
 
 I saw similar messages in maillist archive, but I haven't reveal
 concrete solutions for these items. What to do? Wait for next release
 of cygwin?

If you are using Agnitum Outpost Firewall ... try uninstall it a use
another firewall.
On this new machine, (where XP has been reinstalled from scratch), I'm
no longer using AOF, but Kerio. Since then, I don't need to reboot every
two days or every half-make-configure.
So far, the hyppothesis of a ressource leak in AOF seems accurate.

HTH.

-- 
Luc Hermitte

--
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: Mutt + Cygwin on the go

2003-12-25 Thread Luc Hermitte
Hello.

* On Thu, Dec 25, 2003 at 12:35:01PM +0200, Miki Tebeka [EMAIL PROTECTED] wrote:
 I've written a little page on my experience with cygwin + mutt +
 laptops (reading/sending mail offline).
 
 I'd be glad to hear any comments.
 
 http://www.cs.bgu.ac.il/~tebeka/Geek/HowTo/mutt-cygwin.html

Your page contains interresting materials.
However, I'm not very fond of the text/* and application/* mailcap
entries -- I'm a litlle bit paranoid, and using w3m which is great to
answer to HTML posts.
text/html;   w3m %s; needsterminal; description=HTML Text; nametemplate=%s.html
text/html;   w3m -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html

(don't forget in the muttrc:
  alternative_order text/enriched text/plain text 
)


And BTW, I have no problem with cygstart with pdf and rtf documents.

Merry Christmas to all!
-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/ 

--
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: Solved: Windows 2k crash while processing big bash script

2003-09-23 Thread Luc Hermitte
Hello,

* On Wed, Sep 24, 2003 at 01:52:49AM +0300, -TifsSoft- [EMAIL PROTECTED] wrote:
 YES!!! It's all because of Agnitum Outpost Firewall 2 Pro. All goes
 fine when outpost is uninstalled. Thanks you very much, you are really
 make my life easy :) By the way, thanks to all who help me solve this.

BTW, if someone finds out a way to solve this without uninstalling
outpost, I'm interrested. I've tried shutdown the corresponding service,
to not start it after reboot and some other things like that, but I
didn't have any luck: impossible to compile mutt on the firewalled
machine.

 P.S. I think it's will be a good idea to store information about
 trouble with outpost firewall at FAQ or Known problems...

Unless someone experiment the same problem but with another
configuration, it is good idea.

Regards,
-- 
Luc Hermitte

--
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: win2k resource exhaustion problem - no Cygwin programs will run

2003-09-11 Thread Luc Hermitte
Hello,

* On Thu, Sep 11, 2003 at 01:41:41PM -0700, james pentland [EMAIL PROTECTED] wrote:
 i have a bash script which apparently causes an
 exhaustion of system resources.
 which resources i am unclear about - it does not
 seem to be memory.
 [...]
 ./yawfu-sh: line 7: /usr/bin/sed: Permission denied

It looks like a problem several people are experimenting.
Lately, someone exposed a link between this problem and Agnitum Outpost
(a firewall) that seems to forget to free some resources. This sounds
plausible, from my point of view, as I also have Outpost and I'm
experimenting this problem.

[BTW, Rampage was evoked as a possible workaround, but it had no
positive effect on my system.]


HTH,
-- 
Luc Hermitte

--
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: Win2k and cygwin memory leak

2003-08-08 Thread Luc Hermitte


* On Thu, Aug 07, 2003 at 08:42:57PM -0700, Andrew DeFaria [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
[You weren't responding to Brian message, but mine.]

 It has already been acknowledged several times over that it is not a
 problem of Cygwin's rather a problem of Windows.
 I think we all agree to that. But unfortunatelly, so far, only Cygwin
 seems affected by that problem.
 
 Funny I don't see the problem. (Anybody else?)

May be I was mistaken and I was thinhing to another problem, but I'm
definitively not the only person who have notice a problem when running
cygwin.
Check the threads around:
http://www.cygwin.com/ml/cygwin/2003-03/threads.html#01510
(about fork and ressources unavailable and jamming cygwin in 10 minutes)


Why are you playing dumb and denying some of us see the problem only
with cygwin ?

BTW, I respond to a remark from Christopher. Yes, probably other
programs are affected by this bug from Windows (/some of its functions).
But I haven't noticed any clear indication in this direction. 
However I have no doubt there is a problem the 100th time I run my
bash-wrapper (that launches gVim), or when I try to compile GNU program
like mutt -- I need to reboot three times and delete lines already
executed if I want to have mutt-1.5 with some specific patches.
So far, cygwin is the ultimate developer for this bug.

 I guess cygwin is using a library not always correctly implemented. 
 Isn't there any workaround cygwin could use ?  is a typical question 
 for many of us.
 Your asking for workarounds to another party's code. Personally I would 
 rather Cygwin folks focus more on functionality and genuine Cygwin 
 problems than fixing somebody else's problem.

I'm asking a workaround to another party code used by cygwin. If I know
that a particular function (from a third) is buggy/non portable, I won't
use it in my code, or at least, I'll try to be sure I use it under the
best conditions.
Unfortunatelly, it seems nobody knows which third party function is
buggy in that particular case.

 What else do you want?
 Personnally, I hope, as the question will be raised again and again, 
 that an expertise will emerge. Just knowing why there is a problem 
 will be a big step ahead -- ie: which library/service pack/... is faulty.
 
 And what are you doing to help identify the problem (seeing as YOU are 
 seeing the problem, YOU have the code and others have no clue what you 
 are doing exactly that might even cause your problem)?

I'm doing approximatelly:

tar xvf mutt-1.5.1.tar.gz | gzip -cd -
cd mutt-1.5.1
./configure
make

But what will be more interresting is: what is installed on the
system/how the system was installed. Because if some people are not
seeing the problem, it means THERE IS a solution.

 This time, someone told us about a freeware that collects forgotten
 memory. 
 Who forgot the memory? Right Windows - not Cygwin.

Did I said the contrary ?
I can also play dumb: do you call buggy functions in your code ?

 Is THAT the memory intensive process that you are running every 5
 minutes?!? Again, others do not have the problems that you have. I run
 Cygwin processes on Windows 2000 Servers and they stay up for months
 (Unfortunately sometimes one still needs to reboot servers for service
 packs, security fixes, etc).

I'm not Brian. My intentive process is named bash, and I don't run it
every 5 minutes.

 BTW, if this program is an effective workaround, I think this will 
 merit a topic in the FAQ.
 You speak as if everybody is experiencing this problem - we aren't!

If ten people are experiencing the problem, it worths fix it. Because
what the ten people will first think is: damn! cygwin is buggy and
cannnot fork anymore. You and I know it's untrue. The unfortunate new
user of Cygwin won't.

 Could we say that cygwin relies on a faulty library developped by
 Microsoft? And that nobody has identified the faulty library?
 You could - but that would be a guess. And it is not Cygwin developers
 responsibility to figure out which library that is.

We don't feel the same. When I program a() that uses b(). If b() is
buggy under certain condition, i usually try to find/program b'() that
will ensure that my a() will always work as expected. That's _my_
responsability to use 3rd party code/library/API that works correclty.

May be there is a b'() in that case, may be not. I don't know yet. In a
month or two, I'll try to remember how gdb works and check this out --
I'll probably need assitance from people not having the problem as I'm
not able to compile big program.

By the mean, time I have some open-source stuff I've developped to fix
before unhappy users ask for refund.
And by an hour or two, i'll check if RAMpage is of any help.

 With this, and all other open source software, I suggest that if you are 
 unhappy with the product then return it and demand a fully refund :-) ! 
 Good luck!
-- 
Luc Hermitte

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem

Re: ORB

2003-04-05 Thread Luc Hermitte
Hello,

* On Fri, Apr 04, 2003 at 05:07:50PM +0200, Vaillant Etienne [EMAIL PROTECTED] wrote:
 I need a ORB for an application under Cygwin. I know Mico and Omniorb
 but are there other ?

TAO may be -- based on the C++ library ACE.

I am not sure if it has been ported for Cygwin, but it is available on
many different systems -- unices, Windows, etc.

HTH,
-- 
Luc Hermitte

--
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: Cannot fork: Resource temporarily unavailable

2003-03-21 Thread Luc Hermitte
Hello,

* On Fri, Mar 21, 2003 at 12:37:52PM -0800, Mike W. [EMAIL PROTECTED] wrote:
 Funny you should mention that...  often noted but not
 yet answered...
 
 [list of similar issues on the ML]

And you can also add another recent link:
http://cygwin.com/ml/cygwin/2003-03/msg00946.html
to your list ;-(

Just to remind that I also have this problem, my system beeing a
proffessional XP box (upgraded from Me). And that i have noticed that
this have repercutions on some native programs which are not able (then)
to work correctly.
Now, thanks to you Mike, I know that this seems linked to a limitation
with PID numbers.

Regarding Corina's remark, I speak for myself but I am quite certain
others will agree: I'd be pleased to know what is terribly wrong with my
system.

May be our PID numbers consumption is going very fast because we have
some resident programs like anti-viruses, firewalls, etc. But the
problem still remains: there is a limit that stop us from using cygwin
to accomplish more or less critical things like recompiling some
programs.

Regards,

-- 
Luc Hermitte

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



fork: permission denied (again)

2003-03-13 Thread Luc Hermitte
Hello,

I'm running into a very annoying problem.
When I try to compile mutt-1.5.x under cygwin, happens a time when
./configure isn't able to execute any command anymore and prints me a:
{the_command}: fork: permission denied for its remaining tasks.

After that, the console/bash (the famous bash -i --login, or something
like that) becomes very limited ; actually, the error occurs even when I
open a new console and sometimes within some native win32 programs that
can't acces some ressources.

The only way I have found to free the ressources beeing to reboot. :-(

To be more precise, I think the problem does not come from ./configure,
but from any shell script I use ; sometimes it happens after a long day
of starting vim sessions (I use a shell script for that), or while
make is running.

I know (thanks to google) that this is a common issue, not knew at all.
But unfortunately, I haven't been able to find any valuable information
on how to fix it.

I have tried to use gcc-2.95.5 with cygwin-1.20-1, with no improvements.
I had hope when I saw the changes made with cygwin-1.21-1, tried to use
it with gcc-3.2, and again: fork: permission denied.

Does anybody has a clue ? a link ? a workaround that I can use ?
I guess the solution lies within fork() implementation and how bash uses
it ... but I can't tell more.

Note: I use a Windows XP machine -- monthes ago, I was able to recompile
mutt-1.4 under Windows Me.

Thanks in advance.

-- 
Luc Hermitte

--
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: Does Mutt work now?

2003-02-23 Thread Luc Hermitte
* On Sun, Feb 23, 2003 at 09:25:57AM +0800, Greg Matheson [EMAIL PROTECTED] wrote:
 I thought there was a native Win32 port of mutt, but was that just
 someone talking about the cygwin version?

The native win32 version of mutt is not usable with the native win32
version of Vim.  Personnaly, I had to recompile mutt (for cygwin) to
work with WindowsMe (another Win 9x ersatz) and Vim-win32.

In case you are interrested in the compilation options (for ./configure)
I used, you can have a look at my web site.

But so far, I have troubles with some attachements that crashes my Mutt
1.4. I guess I must upgrade to the version 1.5.

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

--
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: NT wrappers

2003-02-14 Thread Luc Hermitte
Hello,

* On Thu, Feb 13, 2003 at 06:45:28PM -0600, Robert Citek 
[EMAIL PROTECTED] wrote:
 Here is a script called write that allows me to use WordPad from within
 Cygwin:
 
   #!/bin/bash
   [ $1 =  ]  exec /cygdrive/c/WINNT/system32/write
   [ ! -f $1 ]  touch $1
   exec /cygdrive/c/WINNT/system32/write $(cygpath -w $1 )
 
 Why is modifying such a script to accept additional command-line
 arguments not germaine to this list?

Lately, I have released a wrapper for Win32 native (command-line) tools.
It can not guess arguments you don't know, but will enable you to
specify as many arguments you wish to specify. And it also converts
all the pathnames given and it follows symbolic links.

I'm not sure it is the kind of thing you are looking for. So, just in
case, you will found cyg-wrapper.sh on my web site.

Regards,

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

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




[ANN] Re: cyg-wrapper.sh

2002-12-17 Thread Luc Hermitte
* On Mon, Dec 16, 2002 at 05:12:56PM -0700, Matt Armstrong [EMAIL PROTECTED] wrote:
  --cyg-PWD-clear   : to unset PWD 
  --cyg-PWD-convert : to convert PWD to its DOS (short) form.
 
  I was considering to handle other environment variables, but I
  didn't see any good candidate -- ie. environment variables specific
  to bash or cygwin that win32 native applications may also use.
 
 SHELL.
 
 The solution was to clear the SHELL env var, since I didn't want emacs
 using my cygwin shell.

It is possible to alias emacs to:
alias emacs='(unset SHELL; cygwrapper.sh path-to-emacs ...)'

 HOME is also probably a good idea to convert into DOS form.

That's odd. $HOME correctly appear with Vim.

Any way, --cyg-PWD-clear and --cyg-PWD-convert have been replaced with:
--cyg-env-clear=ENV-VARS and --cyg-env-convert=ENV-VARS.

So, you can write now:
alias prog='cyg-wrapper.sh path-to-prog
--cyg-env-convert=PWD,SHELL --cyg-env-convert=HOME'

However, I have a bug: --cyg-env-convert=HOMEPATH works fine,
--cyg-env-clear=PWD works fine too, but --cyg-env-convert=HOMEPATH
does not have any consequences... As well as (unset HOMEPATH;gvim). I
guess that HOMEPATH got a special traitment from cygwin or bash.

Does list of directories needs to be converted also ? I know PATH
appears correctly converted from Vim. Is is the same with the other
tools, or is it Vim, as I suspect, that opers the convertion ?

-- 
Luc Hermitte
http://hermitte.free.fr/cygwin/

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




[ANN] Re: cyg-wrapper.sh

2002-12-12 Thread Luc Hermitte
Hello Matt,

* On Tue, Dec 10, 2002 at 09:38:02AM -0700, Matt Armstrong [EMAIL PROTECTED] wrote:
 Luc, you might consider adding an option to unset the PWD environment
 variable (or convert it to a Windows path).

That's done. I haven't done any test with perforce, so, let me know.

The two new options are:
--cyg-PWD-clear   : to unset PWD 
--cyg-PWD-convert : to convert PWD to its DOS (short) form.

I was considering to handle other environment variables, but I didn't
see any good candidate -- ie. environment variables specific to bash or
cygwin that win32 native applications may also use.

-- 
Luc Hermitte

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




[ANN] Re: cyg-wrapper.sh

2002-12-08 Thread Luc Hermitte
* On Sun, Dec 08, 2002 at 07:13:44AM +, Soren A [EMAIL PROTECTED] wrote:
 Luc posted on my urging; please check out his site and this script
 which is a useful and good piece of hackery.

Thanks :-)

  [2] This form has been privileged because of the MsWindows 9x
  series.
 
 Hmmm. If you mean that people who run Win9x are more likely to be
 running old DOS programs that use 8.3, then ok; otherwise there's no
 difference between NT-derived and 9x-type Windows in this respect --
 that I know of. 

No. This is a scripting problem I had on MsWindows Me, and I don't
remember any similar issue on Windows NT -- more tests should be done to
be sure.

The problem comes from pathnames having spaces. If we want to run:
appl c:/Program Files/foo.txt ~/bar.txt
The parameters should be requoted before (/while ?) running xargs. I
haven't spent enough time to find to something that works.

-- 
Luc Hermitte

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




[ANN] cyg-wrapper.sh

2002-12-05 Thread Luc Hermitte
Hello,


cyg-wrapper v2.2 has been uploaded on my web site:
http://hermitte.free.fr/cygwin/#Win32
http://hermitte.free.fr/cygwin/cyg-wrapper.sh


cyg-wrapper is a shell script that helps to run, from cygwin,
command-line applications that have been compiled for windows only ; ie:
applications un-aware and independant of the cygwin layer.[1] 

cyg-wrapper converts pathname arguments, passed to win32 programs, from
the written form (unix/dos/windows ; relative or absolute) to the DOS
(short [2] ; and absolute) form that win32 command-line programs
understand.

It extends what cygpath do, to every pathname arguments, and resolves
the symbolic links.


A typical way of use is for instance:
  alias gvim='cyg-wrapper.sh C:/Progra~1/Edition/vim/vim61/gvim.exe 
 -binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr
 --fork=1'
that defines the alias 'gvim' which:
  - calls the win32 version of Gvim,
  - converts every pathname argument (identified as beeing those that do
not begin with '+' or '-', and that do not directly follow '-c',
'--cmd', '-T', ...)
  - forks immediately ; which replaces the disabled '-f' option of the
win32 version of gvim.


Note: the latest version of cyg-wrapper requires cygUtils and more
precisally realpath. An older but slower version is also available on
my web site.

Feedback appreciated.


[1] BTW, Is there a canonical expression to designate such applications ?
I tend to use native win32 applications/programs, but I'm not sure
it is really correct in English.
[2] This form has been privileged because of the MsWindows 9x series.
-- 
Luc Hermitte

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