Re: Running a command in a specific directory

2022-03-23 Thread Brian Inglis

On 2022-03-22 16:35, Piotr Gliźniewicz wrote:
I'm trying to run a command at a specific "Windows" path. Basically 
something similar to what chere does for bash, but I want to execute ls 
in bash for a specific directory. I've tried variations of what chere 
leaves in the registry:

C:\cygwin64\bin\bash.exe -c "/bin/xhere /bin/bash.exe '%L'"
Adding simply `-c ls` didn't work.
To start with something simpler I've launched bash and tried just to 
guess what xhere want's, but I don't really know what's happening. I 
couldn't find any help for xhere.

/cygdrive/c
$ /bin/xhere '/bin/bash.exe -c ls' d:
/bin/xhere: line 38: [: too many arguments
/bin/xhere: line 41: [: too many arguments
/bin/xhere: line 64: [: too many arguments
Starting /bin/bash.exe -c ls
-/bin/bash: ls: command not found
/cygdrive/c
$ /bin/xhere "/bin/bash.exe -c ls" d:
/bin/xhere: line 38: [: too many arguments
/bin/xhere: line 41: [: too many arguments
/bin/xhere: line 64: [: too many arguments
Starting /bin/bash.exe -c ls
-/bin/bash: ls: command not found
Any hints, how to properly pass `/bin/bash.exe -c ls` to xhere?


$ file `which xhere`
/usr/bin/xhere: Bourne-Again shell script, ASCII text executable
$ head `which xhere`
#!/bin/bash
# Have to use bash; can't get ash to "exec -l"
# Separate script from chere to avoid need for argument parsing
#
# first arg is shell
# second arg is the path
...

Can't do that: xhere expects shell path /bin/*sh* and directory path and 
runs under bash so it can run exec -l to exec shell as login shell after 
cd dir.


Starting XWin Server from a shortcut uses:

C:\...\cygwin...\bin\run.exe --quote /bin/bash -l -c "cd; exec 
/bin/startxwin"


so you could base a commnad line on that.

You could also install and use Cygwin-X with a GUI file manager like 
PcManFM, or a text version like Midnight Commander (package mc).


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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


Fwd: Cygwin-X AWT windows snap back after drag in multi-window mode (w/example): long-standing issue

2022-03-23 Thread John Harris
I'm trying one more posting of this from a month ago hopefully to get
more eyes on it (got no replies last time). I apologize for the
repeat, and will stop if no one has any leads on how to fix this. It's
such a frustrating bug that's easily reproducible and only happens
with Cygwin-X multi window mode.

-- Forwarded message -
From: John Harris 
Date: Sun, Feb 13, 2022 at 10:14 AM
Subject: Cygwin-X AWT windows snap back after drag in multi-window
mode (w/example): long-standing issue
To: 


For well over ten years, I (and other developers with the same
configuration) have been experiencing this issue with Cygwin-X in
multi-window mode with Java AWT apps.

The issue is simply that the first time (and only the first time)
certain AWT dialogs are dragged to move them, they snap back to their
original position.

The problem exists across JDK's, computers, cygwin versions, fresh
installs, and everything I've tried.

This can easily be reproduced by compiling (javac) and running (java)
the attached trivial AWT code. If you get this error at runtime:

  Exception in thread "main" java.awt.AWTError: Assistive Technology
not found: org.GNOME.Accessibility.AtkWrapper

...then you need to do these steps:

edit /etc/java--openjdk/accessibility.properties, commenting out
the line that reads,
   assistive_technologies=org.GNOME.Accessibility.AtkWrapper

The attached program will demonstrate the issue. Also attached are
(shortened) cygcheck output and the XWin log.


SimpleEx.java
Description: application/ms-java


cygcheck.out
Description: Binary data


XWin.0.log
Description: Binary data

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


Re: Fwd: Cygwin-X AWT windows snap back after drag in multi-window mode (w/example): long-standing issue

2022-03-23 Thread Mark Hansen

On 3/23/2022 4:38 AM, John Harris wrote:

I'm trying one more posting of this from a month ago hopefully to get
more eyes on it (got no replies last time). I apologize for the
repeat, and will stop if no one has any leads on how to fix this. It's
such a frustrating bug that's easily reproducible and only happens
with Cygwin-X multi window mode.


I see what I think is the same thing, but only when I'm running a Java Swing 
(GUI) application
on a Linux host (CentOS) and displaying to my Windows PC running Cygwin X 
Server.

If I run other X applications on the Linux host (displayed to my X Server) they 
do
not see this.




-- Forwarded message -
From: John Harris 
Date: Sun, Feb 13, 2022 at 10:14 AM
Subject: Cygwin-X AWT windows snap back after drag in multi-window
mode (w/example): long-standing issue
To: 


For well over ten years, I (and other developers with the same
configuration) have been experiencing this issue with Cygwin-X in
multi-window mode with Java AWT apps.

The issue is simply that the first time (and only the first time)
certain AWT dialogs are dragged to move them, they snap back to their
original position.

The problem exists across JDK's, computers, cygwin versions, fresh
installs, and everything I've tried.

This can easily be reproduced by compiling (javac) and running (java)
the attached trivial AWT code. If you get this error at runtime:

   Exception in thread "main" java.awt.AWTError: Assistive Technology
not found: org.GNOME.Accessibility.AtkWrapper

...then you need to do these steps:

edit /etc/java--openjdk/accessibility.properties, commenting out
the line that reads,
assistive_technologies=org.GNOME.Accessibility.AtkWrapper

The attached program will demonstrate the issue. Also attached are
(shortened) cygcheck output and the XWin log.







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


Re: checking cyg version (was Re: GNU make losing jobserver tokens)

2022-03-23 Thread Samuel Lelièvre
Version number of the "cygwin" Cygwin package:
```
cygcheck -c cygwin
```

Version numbers of all installed Cygwin packages:
```
cygcheck -c
```

Save that information to a file:
```
cygcheck -c > cygwin-package-versions.txt
```

Save more complete information to a file:
```
cygcheck -s -r -v > cygcheck.out
```

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


"ALT-F4" does not close terminal when using Command Prompt

2022-03-23 Thread Mitchell Hentges
To reproduce the issue:
1. Run Cygwin.bat to open a Cygwin shell in the "Command Prompt" terminal
2. Click the "ALT-F4" keyboard combination

The Cygwin terminal should close (ideally allowing the shell to do cleanup,
such as writing to its history file).
However, instead, a "ding" is sounded, but the terminal remains open.

-- 
Mitchell Hentges
Engineering Workflow
Mozilla

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


Closing the Command Prompt using the "x" button doesn't update shell history file

2022-03-23 Thread Mitchell Hentges
To reproduce the issue:
1. Run Cygwin.bat to open a Cygwin shell in the "Command Prompt" terminal
2. Run some command, such as "echo test"
3. Click the Windows "x" button in the top-right corner of the terminal

The terminal closes, but `$HOME/.bash_history` is not updated to include
the "echo test" command.
Interestingly, when using mintty, the shell history is indeed saved when
the "x" button is pressed.

-- 
Mitchell Hentges
Engineering Workflow
Mozilla

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


rsync gives me error 12

2022-03-23 Thread Neil Aggarwal
Hello:



I am trying to use rsync to pull all backups from a linux server
to my local Windows machine.



I tried this rsync command:

$ rsync --debug=ALL -e ssh r...@marketing.propfinancing.com:/var/www/svnDumps
/cygdrive/c/Tmp



Here is the output:

opening connection using: ssh -l root marketing.propfinancing.com rsync
--server --sender -e.LsfxCIvu . /var/www/svnDumps  (10 args)

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(226)
[sender=3.1.3]

rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]

rsync error: error in rsync protocol data stream (code 12) at io.c(228)
[Receiver=3.2.4dev]

[Receiver] _exit_cleanup(code=12, file=io.c, line=228): about to call
exit(12)



From what I can find online, code 12 is insufficient disk space, missing
remote
rsync, or a connection error.   I don’t think any of those are the case
here and the
debug output is not helping me.



Any ideas what could be happening?



Thank you,

  Neil



--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

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