hostname change breaks X - how to connect 127.0.0.1 ?

Owen Taylor otaylor at redhat.com
Tue Aug 31 13:02:12 PDT 2004


On Tue, 2004-08-31 at 15:02, Mike A. Harris wrote:
> Tero Karvinen tero _dot_ karvinen atta iki _dot_ fi wrote:
> > When hostname is changed, X can no longer open windows. I think
> > this could be fixed by making X connect to 127.0.0.1, but I don't 
> > know how to do this.
> > 
> > To repeat the problem:
> > $ xterm 
> > (xterm opens normally)
> > # hostame xbreaker
> > $ xterm
> >  Xlib: connection to ":0.0" refused by server
> >  Xlib: No protocol specified
> >  xterm Xt error: Can't open display: :0.0
> > (xterm does not open)
> > 
> > XFree86 has the same problem. I have seen this on Redhat 8, Redhat 9, 
> > Fedora Core 1 and Fedora Core 2 on different computers and networks.
> > Searching google, groups2, gmane and asking in #xorg, #freedeesktop and
> > #xwin did not help. I have found bubble gum solutions, such as restarting
> > X and setting hostname to localhost, but they interrupt work and cause
> > other problems. 
> > 
> > How can I make X work normally when hostname keeps changing?
> 
> To my knowledge, there's no way to do that currently.  You'd have to 
> hack up something in the X server authentication code to handle hostname 
> changes, but I don't think anyone's ever done that.  We've got a feature 
> request for this in Red Hat bugzilla, but it's more of a general problem 
> than a distribution specific one.

The suggestion that I think is probably in that bugzilla entry (Havoc
keeps pushing it) is to add a new "magic cookie" authentication scheme
where the lookup key in the xauth file isn't the hostname, but rather
a unique string provided by the server during authentication
negotiation.

So, basically you replace the private cookie with a public
cookie:private cookie pair.

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20040831/1d7b4f15/attachment.pgp>


More information about the xorg mailing list