[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: /etc/hosts and system entries

On Mon, 2007-10-01 at 15:47 +0100, Bill Crawford wrote:
> On 01/10/2007, Adam Jackson <ajackson redhat com> wrote:
> > I think there's something more subtle going on in this case.  What we do
> > at least in startx(1) is add the cookie to ~/.Xauthority twice, once
> > for :0 and once for foo:0, so the first one should always win.
> I noticed that. Still got this in my output (shortly before a crash in
> libGLcore, which I'm guessing is unrelated to the network issue):
> _IceTransSocketUNIXConnect: Cannot connect to non-local host bill.wcn.co.uk
> Warning: Tried to connect to session manager, Could not open network socket

Okay, I think I have a fix for this.

The bug is that the ICE sockets are bound at session startup by
gnome-session (or whatever), and the path to them is stashed in
$SESSION_MANAGER in the environment as a tuple of (transport, hostname,
port).  But the hostname in that tuple is whatever you got back from
gethostname().  NetworkManager won't change the system hostname when
changing DHCP leases, but dhclient will, and more generally we can't
rely on the user to not set the hostname to whatever they want.

Fortunately, there's a special case in the xtrans code that treats the
hostname "unix" as meaning "no, really, local machine", so for AF_UNIX
transports we just lie and set the "hostname" in the above tuple to be
"unix" and avoid that whole mess.

Fixed in xorg-x11-xtrans-devel 1.0.3-5 and libICE 1.0.4-2 (currently
building).  Anyone who was seeing X app launch stalling or failing after
changing networks/IPs/hostnames/whatever, please update libICE and see
if you can still repro it.

- ajax

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]