Re: Text editor with shell integration
Luc Hermitte wrote: Hello, "lood" wrote : Please, read this: http://cygwin.com/acronyms/#PCYMTNQREAIYR 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...) 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!? Thanks, Angelo. -- 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: Resizing a terminal window
David, you're very welcome! H. On 5/7/2010 12:29 PM, J. David Boyd wrote: Hans Horn writes: David, This took me forever to figure out! 'expect' does not forward SIGWINCH (http://en.wikipedia.org/wiki/SIGWINCH) unless told to do so. Add the following snippet (between lines marked with ###) to the beginning of your 'expect' script: #!/bin/sh # \ exec expect -f "$0" ${1+"$@"} ### trap { # trap sigwinch and pass it to the child we spawned set rows [stty rows] set cols [stty columns] stty rows $rows columns $cols< $spawn_out(slave,name) } WINCH ### set host [lindex $argv 0] ... I use this to log on from cygwin to various AIX and LINUX machines. Good luck and let me know how goes, Hans That worked perfectly! Thank you very much, I don't think I would have ever figured that out! Dave -- 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: 1.7.5-1: fork throw segfault with g++ 4.3.4
On Tue, Apr 27, 2010 at 05:02:26PM +1000, Tim Wilson-Brown wrote: >I have identified a reproducible segfault when throwing exceptions in >the thrift IPC library under cygwin 1.7.5-1. > >An example c++ program is attached which always segfaults on my machine >when compiled with g++-4 (4.3.4 20090804) under 1.7.5-1. I have also >attached the stackdump, a standard cygcheck.out, and another more >verbose set of testcases. I've uploaded a snapshot which should fix this problem: http://cygwin.com/snapshots/ Thanks go to Dave Korn for tracking down the problem and to Chuck Wilson for the pseudo-reloc implementation and insight. Oh, and thanks for the test case, too. cgf -- 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: Resizing a terminal window
Hans Horn writes: > David, > > This took me forever to figure out! > > 'expect' does not forward SIGWINCH > (http://en.wikipedia.org/wiki/SIGWINCH) unless told to do so. > > Add the following snippet (between lines marked with > ###) to the beginning of your 'expect' script: > > #!/bin/sh > # \ > exec expect -f "$0" ${1+"$@"} > > ### > trap { # trap sigwinch and pass it to the child we spawned > set rows [stty rows] > set cols [stty columns] > stty rows $rows columns $cols < $spawn_out(slave,name) > } WINCH > ### > > set host [lindex $argv 0] > ... > > I use this to log on from cygwin to various AIX and LINUX machines. > > Good luck and let me know how goes, > Hans That worked perfectly! Thank you very much, I don't think I would have ever figured that out! Dave -- 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: fltk-x11 release ?
Dear Marco, I'm the maintainer of the current win32 version and planning to package an x11 version: http://sourceforge.net/mailarchive/message.php?msg_name=4B68A046.9000305%40quicknet.nl http://sourceforge.net/mailarchive/forum.php?thread_name=4B6B1F73.1050005%40users.sourceforge.net&forum_name=cygwin-ports-general I started work on this but haven't finished yet. Hope to do so this weekend. Teun Marco Atzeri schreef: Albrecht, any timing to release a x11 compatible package of fltk ? As 1.3.0 is still to arrive, could you at least release the 1.1.10 ? As next octave version could use the fltk graphics, I would like to enable it. Thanks Marco -- 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: Resizing a terminal window
David, This took me forever to figure out! 'expect' does not forward SIGWINCH (http://en.wikipedia.org/wiki/SIGWINCH) unless told to do so. Add the following snippet (between lines marked with ###) to the beginning of your 'expect' script: #!/bin/sh # \ exec expect -f "$0" ${1+"$@"} ### trap { # trap sigwinch and pass it to the child we spawned set rows [stty rows] set cols [stty columns] stty rows $rows columns $cols < $spawn_out(slave,name) } WINCH ### set host [lindex $argv 0] ... I use this to log on from cygwin to various AIX and LINUX machines. Good luck and let me know how goes, Hans On 5/7/2010 10:09 AM, J. David Boyd wrote: Hans Horn writes: On 5/5/2010 8:28 AM, J. David Boyd wrote: Thomas Wolff writes: Am 04.05.2010 16:03, schrieb J. David Boyd: ... Locally, I can use the mouse to resize a window, and the $COLUMNS and $LINES variables are automatically filled in. On many remote xterm sessions, they aren't. Does anyone have any idea where to start figuring out what is wrong, and what I can do to correct it? LINES and COLUMNS are legacy mechanisms which may serve as a workaround if the system doesn't otherwise handle screen size changes properly. They should not be needed on modern systems where the tty driver maintains the information. (You may note that mintty has not set them initially but they get set on resize - by whatever means... - while in a cygwin console they are not used at all.) So if you happen to have these variables set on a system which does not maintain them, they don't get changed on resize and confuse your environment. In most cases the best remedy is to just unset them - does that help? -- Thomas Sadly enough, the system I am connecting to, SUSE Linux, does use them, and the checkwinsize shopt BASH function, but, somehow, not correctly Just for curiosity: are you using 'expect' to log to the remote system? If so, you'd need you modify your expect script to handle SIGWINCH properly. Let me know... H. Yes I am. I use expect to login, then go interactive. There is a flag/setting to monitor SIGWINCH? Tell me, please!!! -- 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: Resizing a terminal window
Hans Horn writes: > On 5/5/2010 8:28 AM, J. David Boyd wrote: >> Thomas Wolff writes: >> >>> Am 04.05.2010 16:03, schrieb J. David Boyd: ... Locally, I can use the mouse to resize a window, and the $COLUMNS and $LINES variables are automatically filled in. On many remote xterm sessions, they aren't. Does anyone have any idea where to start figuring out what is wrong, and what I can do to correct it? >>> LINES and COLUMNS are legacy mechanisms which may serve as a >>> workaround if the system doesn't otherwise handle screen size changes >>> properly. They should not be needed on modern systems where the tty >>> driver maintains the information. >>> (You may note that mintty has not set them initially but they get set >>> on resize - by whatever means... - while in a cygwin console they are >>> not used at all.) >>> So if you happen to have these variables set on a system which does >>> not maintain them, they don't get changed on resize and confuse your >>> environment. In most cases the best remedy is to just unset them - >>> does that help? >>> >>> -- >>> Thomas >> >> Sadly enough, the system I am connecting to, SUSE Linux, does use them, >> and the checkwinsize shopt BASH function, but, somehow, not >> correctly > > Just for curiosity: are you using 'expect' to log to the remote system? > If so, you'd need you modify your expect script to handle SIGWINCH > properly. Let me know... > H. Yes I am. I use expect to login, then go interactive. There is a flag/setting to monitor SIGWINCH? Tell me, please!!! -- 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: cygwin-doc html ?
On Fri, May 07, 2010 at 02:50:39PM +, Marco Atzeri wrote: >Hi Cgf, >the cygwin-doc-1.7 does not include the html >page as before http://cygwin.com/ml/cygwin-announce/2010-04/msg00020.html >while the info > >/usr/share/info/cygwin-api.info.gz >/usr/share/info/cygwin-ug-net.info.gz > >shows an horrible format. http://cygwin.com/ml/cygwin/2010-04/msg00606.html cgf -- 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: 1.7: hostname resolution works for Windows programs, but not Cygwin programs
Brolin Empey wrote: Hostname resolution has started working for Cygwin programs on optiplex960 since the last time I tried, even though the Windows (non-Cygwin) version of nslookup returns NXDOMAIN for the same hostname. Strange, but at least it works. So now only howard + brolin-V13 need to be fixed. I should have described the symptoms of the hostname resolution failure instead of only saying it does not work. (fail) Anyway, here is what happens when I try to ssh from Cygwin on brolin-V13 to cannon, which is an Ubuntu PC on the LAN: [bro...@brolin-v13] [0] [1] ~/ $ ssh -X cannon ssh: Could not resolve hostname cannon: hostname nor servname provided, or not known [bro...@brolin-v13] [255] [2] ~/ $ Any ideas? -- 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
Hello, "lood" 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: 1.7.5-1: execv fails in .exe compiled
Thanks for your suggestions Corinna. My update is below. On Thu, 6 May 2010 17:19:24 +0200 Corinna Vinschen wrote: >On May 6 10:21, Stephen Morton wrote: >> We have a gcc 3.4.6 cross-compiler that is an essential part of our >> development environment that does not work under cygwin 1.7 >> (+Win7-64). Somehow cc.exe is not able to execv cc1.exe. >> >> I'm stumped and any insight you can give me would be much appreciated. >> >> Note: the fact that the program that is failing is a compiler might >> cause some confusion. The cygwin gcc is not failing. What's failing >> (failing to execv a sub-program) is just a tool that I'm running that >> just happens to be a compiler. > >Unfortunately the information you're giving isn't enough to figure out >what happens. This is the interesting snippet in the strace output: > >> 152 114745 [main] cc386 2960 mount_info::conv_to_win32_path: >> conv_to_win32_path (/usr/local/companytools/gcc34/x86/cc1.exe) >> 157 114902 [main] cc386 2960 set_flags: flags: binary (0x2) >> --- Process 2960, exception C005 at 6110721F >> 296 115198 [main] cc386 2960 exception::handle: In >> cygwin_except_handler exc 0xC005 at 0x6110721F sp 0x28A2DC > >So we know there's a SEGV at address 0x6110721F, which is inside the >memcpy function in 1.7.5, and it has been called from within a Cygwin >function. The Cygwin function mount_info::conv_to_win32_path is called >very often in fact, so this seems to be an unlikely border case. > >This doesn't tell us much about the root cause. Apparently >cc386 supresses core dumps (or rather, stackdumps in our case). If >there's a call to setrlimit (RLIMIT_CORE, ...), it would make sense >to disable this and try to create a stackdump. > >What you also could try is to install the Cygwin sources and then use >the CYGWIN=error_start facility to start GDB when the error occurs, see >http://cygwin.com/cygwin-ug-net/using-cygwinenv.html I was able to try both of these things, unfortunately with little success. I modified the problem code to specifically setrlimit(RLIMIT_CORE,...) to the maximum value (obtained by getrlimit() and checking for error codes along the way) and got no stack dump and no gdb attempt. That would indicate to me that I'd just done things wrong but... initially I had an error in my debug code where I was trying to print an integer as a %s. It caused a crash (unsurprisingly) but it also generated a stack dump and tried to launch gdb (gdb failed to launch, but the interesting thing was that it tried). So somehow I've got an execv failing, and I've got a cygwin exception. But not enough of a failure to cause the OS to stack dump or try to launch gdb. That must mean something. I also updated to the latest cygwin snapshot (At least, I took the cygwin-inst-20100506.tar.bz2 and copied its contents over /etc and /usr. I hope that's how one does it.) and the problem persisted. My plans now are: 1. Try to use gdb to narrow down what memcpy is failing. Any tips on that would be appreciated. 2. Also, trying Cygwin 1.7 on Windows XP would also be a useful test. 3. Any other suggestions? Regards, Stephen Morton -- 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: rxvt : 1.5 vs. 1.7
On 5/7/2010 3:03 AM, Oleksandr Gavenko wrote: On 2010.05.06 8:04, Andy Koppe wrote: Always on the lookout for ways to improve mintty: what mintty shortcomings or rxvt features make you prefer rxvt? My preferred ~/.Xdefaults ? Also rxvt present in MSYS. One tool for all OS. ^ dead I expect you know this but at some point, you'll need to select an alternate terminal. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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
Csaba Raduly sent the following at Thursday, May 06, 2010 7:59 AM >On Thu, May 6, 2010 at 1:22 PM, lood wrote: >> Hi all. How could I integrate my text editor (e.g. Notepad++) to run >> it easily from Cygwin? I mean, something similar 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. > >Do you want something like this? > >/cygdrive/c/Program\ Files/Notepad++/notepad++.exe ./file.ext & Or maybe this bash shell function (in .bashrc). notepad () { cygstart -d "$(dirname "$1")" '/cygdrive/c/Program Files/Notepad++/notepad++.exe' "$(cygpath -w "$1")" } -- 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
R: getfacl etc.
--- Ven 7/5/10, Norton Allen ha scritto: > I'm trying to sort out an NTFS > permissions issue, and am a little > confused. I think I've convinced myself that getfacl agrees > with Windows > Explorer's Properties -> Security information, but what > does Windows > Explorer's "Read Only" checkbox do? I have files that > appear to grant > rwx to everyone, yet have this box checked, and getfacl and > ls -l don't > give any hint. It is a remain of MSDOS attributes $ attrib +R your_file check $ attrib your_file Marco -- 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
cygwin-doc html ?
Hi Cgf, the cygwin-doc-1.7 does not include the html page as before while the info /usr/share/info/cygwin-api.info.gz /usr/share/info/cygwin-ug-net.info.gz shows an horrible format. Is it a packaging glitch ? Marco -- 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: bash -i with installed and enabled bash_completion starting too slow
On 05/07/2010 02:08 AM, Oleksandr Gavenko wrote: > from sh I run: > > sh-3.2$ time bash -i -c echo > > real0m0.218s > user0m0.062s > sys 0m0.016s > > sh-3.2$ echo ". /etc/bash_completion" >~/.bashrc # enable completion > > sh-3.2$ time bash -i -c echo > > real0m2.657s Yes, this is a known issue with the current bash-completion - it sources a HUGE file, which conditionally defines lots of shell functions after probing which commands are present, and if your $PATH includes anything with high-latency probing (like a networked drive), it adds up fast. Upstream bash-completion is working on a plugin-style completion, where the initial framework loads quickly without any program probing, and then hitting TAB per program loads just that program's completion routines, but it is still a work in progress. So it will get better over time, and get there faster if you help contribute upstream. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org volunteer cygwin bash-completion maintainer signature.asc Description: OpenPGP digital signature
getfacl etc.
I'm trying to sort out an NTFS permissions issue, and am a little confused. I think I've convinced myself that getfacl agrees with Windows Explorer's Properties -> Security information, but what does Windows Explorer's "Read Only" checkbox do? I have files that appear to grant rwx to everyone, yet have this box checked, and getfacl and ls -l don't give any hint. -- 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
fltk-x11 release ?
Albrecht, any timing to release a x11 compatible package of fltk ? As 1.3.0 is still to arrive, could you at least release the 1.1.10 ? As next octave version could use the fltk graphics, I would like to enable it. Thanks Marco -- 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
bash -i with installed and enabled bash_completion starting too slow
from sh I run: sh-3.2$ time bash -i -c echo real0m0.218s user0m0.062s sys 0m0.016s sh-3.2$ echo ". /etc/bash_completion" >~/.bashrc # enable completion sh-3.2$ time bash -i -c echo real0m2.657s user0m0.743s sys 0m1.308s I like completion. I wrote into ~/.Xdefaults ! By default rxvt start shell without args, so it interactive. ! But if it also login shell ! then ~/.bashrc will not be read. Awful! Rxvt*loginShell: false and set SHELL=/bin/bash. By Win-R rxvt I got bash prompt - but with useful bash completion it starts too slow for interactive use (open rxvt, type several commands and exit). This problem especially actual in case of using TAB completion for command at start of bash. I wait for about 4 second to get list of executable. -- 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: setup messing up ntfs permissions
Am 07.05.2010, 03:40 Uhr, schrieb Vasya Pupkin: Is there any way to stop setup program from messing up NTFS permissions? I don't like how cygwin works with NTFS permissions and therefore it is disabled through /etc/fstab, but setup ignores it and keeps destroying inherited permissions and replacing them with custom ones every time it installs something. I can't vouch for the "don't do it part", but /etc/fstab is ignored because setup.exe doesn't link against cygwin1.dll, thus isn't a Cygwin application in the technical sense (although it is of course essential for Cygwin as a project or installation). -- Matthias Andree -- 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: cygpath from emacs
On 2010.05.05 21:24, Gary wrote: I often find myself running a piece of software from within emacs that expects, and spits out, Windows-style paths ("C:\..."). Handling sending it Windows paths based on the Cygwin ones is fine, I just use a script. Of course, the tool returning Windows paths is a PITA, because it means I can't do M-x next-error :( Is there a solution, a way to "capture them" and transform them before they end up in the emacs buffer, maybe? I feel I should be able to work this out myself, but my brain refuses to bend around it :( I do not understand you wrote but may be http://www.emacswiki.org/emacs/cygwin-mount.el or http://stackoverflow.com/questions/2075504/how-to-best-integrate-emacs-and-cygwin help you. -- 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: rxvt : 1.5 vs. 1.7
On 2010.05.06 8:04, Andy Koppe wrote: Always on the lookout for ways to improve mintty: what mintty shortcomings or rxvt features make you prefer rxvt? My preferred ~/.Xdefaults ? Also rxvt present in MSYS. One tool for all OS. -- 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