Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 14 down vote accepted

From man startxwin:

If no specific client program is given on the command line, startxwin will look for a file in the user's home directory called .startxwinrc to run as a shell script to start up client programs. If no such file exists, startxwin will use the following as a default:

xterm  -geometry  +1+1  -n  login  -display  :0

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

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.