This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: startx and ssh


Thank you for looking at this, Dave. 

If .Xauthority exists in my home directory and I remove the export block
from startx, the X server starts with no errors.

If .Xauthority does not exist in my home directory, the X server starts
with no errors, even when if the XAUTHORITY variable is exported.

I haven't found a down side to removing the export block from startx.
 
Gary

-----Original Message-----
From: Dr.D.J.Picton [mailto:dave@aps5.ph.bham.ac.uk] 
Sent: Tuesday, August 12, 2003 2:28 AM
To: cygwin-xfree@cygwin.com; holokine@holokine.com
Subject: Re: startx and ssh


> 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.)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]