New answers tagged cygwin
I had same problem with Cygwin. You need to run dos2unix mkdatedir.sh # or whatever your script is called this will remove any dos carriage returns but better to set option igncr see https://cygwin.com/ml/cygwin-announce/2010-08/msg00015.html
Thanks to @jensd, @unxnut for helping me. based on your comments I was able to figure out the problem. The solution needed two steps: the DISPLAY variable should be properly set. when ssh'ing to remote server, the -X switch must be on my previous attempts lack one or both of these two conditions. Anyhow, for later users who see this here's are examples ...
Make sure that you have the DISPLAY-variable set in your cygwin-environment: export DISPLAY=:0.0 after connecting with SSH, check if that shell also knows the correct DISPLAY-variable with: echo $DISPLAY
Top 50 recent answers are included