hostname change breaks X - how to connect ?

Mike A. Harris mharris at
Tue Aug 31 12:02:45 PDT 2004

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

I'm interested in hearing what other people might propose as solutions 
to this problem though also.


More information about the xorg mailing list