Saturday, September 18, 2010

Automatically Launching Cygwin's X Server

We have a new Dell Inspiron 13R laptop. One of the first things I do on any Windows machine I get is install Cygwin on it. One of the main reasons for this is to be able to run an X Server.

I wanted the X Server to start automatically at login, so I copied the shortcut named "XWin Server" that was installed to the Start->Programs->Cygwin-X menu and pasted it into the Start->Programs->Startup menu. This shortcut launches Cygwin's startxwin, which, in turn, launches the XWin server itself.

This works nicely, except for one annoyance: startxwin, by default, launches an X terminal. This makes sense if you manually click the "XWin Server" shortcut, but not (in my opinion) when it's launched automatically. I wanted it to start silently.

I followed a few false trails before I bothered to Read The Fine Man-page. The solution is pretty simple: create an empty .startxwinrc in my home directory:
$ touch ~/.startxwinrc

1 comment: