> Date: Mon, 11 Aug 2003 12:55:05 -0600 > I have been trying to de-bug a problem with startx. > > When I tried to run the file, I would get a server window, > no clock and no terminal windows. The command-line > errors were: > .. > Xlib: connection to "0.0" refused by server > Xlib: No Protocol specified > > These error messages would repeat until I hit ^Z > from the console command line.
> I found that the script would fail if a .Xauthority file > existed in my home directory. If I removed the file, > startx ran without errors; the server, the clock and > the terminal windows all opened successfully when > there was no .Xauthority file in my home directory. > > I found that the .Xauthority file was being created > when I logged onto my Cygwin machine from another > machine using ssh with the same login name. > > I am proposing a fix for this problem: > > In /usr/X11R6/bin/startx, add the following code before > the block that exports the XAUTHORITY variable: > > # remove $HOME/.Xauthority if it exists > if [ -f $HOME/.Xauthority ]; then > rm $HOME/.Xauthority > fi > > This code just removes .Xauthority if it exists. > If .Xauthority doesn't exist, it does nothing. > Does anyone have any feedback? I've seen the problem, and in my view there's a better solution. Remove the code which sets XAUTHORITY. (I think the problem occurs because XWin assumes -auth $XAUTHORITY if the variable is set, then gets upset because it can't find the authorization key for your display.)