Take the 2-minute tour ×

Whenever I start Cygwin's X server using the "XWin Server" link in my Start menu, or by running startxwin from a Cygwin shell, I automatically get an xterm window appearing, which I neither want nor need.

How do I avoid that?

(Question inspired by this comment by Stijn Vanpoucke over on Stack Overflow)

share|improve this question
add comment

2 Answers

up vote 11 down vote accepted

From man startxwin:



Thus, to avoid having any program start up when you start the X Server, you want a blank .startxwinrc file. Just run the following from a Cygwin prompt:

touch ~/.startxwinrc
share|improve this answer
add comment

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.



share|improve this answer
This isn't really an answer to this question; with rewording it could be, but I think this would be better suited as a separate question and answer (as I did here) about handling the error you're seeing. You can then link to that question in the comments to this one. –  me_and Oct 3 '12 at 10:08
add comment

Your Answer


