I've made it a habit to start Cygwin X with startxwin(.exe).
My .startxwinrc file reads as follows:
X :0 -rootless mrxvt -geometry +1+1 -n login -display :0 -tt ImTabbed
So far, it's worked. The only error I get concerns the display still being "open" by another X process. This error specifies a certain file the X server generates by default for every session. The Cygwin folks are aware that it doesn't get deleted when the session terminates.
So I wrote an alias to "cure" that:
alias freex='rm /tmp/.X0-lock'
I put the same line -- the part in between the quotes, at any rate -- in my .bashrc and .bash_profile files in case I should forget to do it myself.
HTH.
BZT
1
For some reason this doesn't work for me. I had to type:
– enricoferrero – 2016-04-13T10:19:51.833exec sleep infinity
as shown here: http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-startxwinrc-exit