Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 20:47:58 -0400 (EDT)
From:      Chuck Robey <chuckr@chuckr.org>
To:        FreeBSD Hackers List <freebsd-hackers@FreeBSD.ORG>
Subject:   X11 display problem
Message-ID:  <20021024203033.T353-100000@april.chuckr.org>

next in thread | raw e-mail | index | archive | help
To be frank, I just solved a problem that a number of folks asked me
about, and I just wanted to get it into the FreeBSD mailing list archive,
so that others that hit the problem can find the solution.  You can
probably safely hit 'delete' now, if you haven't got a problem getting
xterms from remote machines to open on your local display.

[search keywords: X11 display remote security ssh xterm]

The problem scenario: you've finally gotten around to upgrading your old
machine to the latest FreeBSD version.  Works fine, but suddenly, you can
no longer get remote X11 apps to pop local displays.

No, it's NOT an ssh problem.  Yes, I know there's a dozen reasons why it
*could* be ssh, or even a FreeBSD kernel (ipfw) type problem, but that's
not this one either.  Why am I so sure?  Because I used the
ports/net/ethereal port to scope out the communications.  The remote
machine tries to open a link on tcp/6000 (like all good little x11
programs should do) but your local box responds with an RST, killing the
connection before it gets started.  At that point, ssh hasn't even woken
up yet, so it couldn't be that.  Can't be an X11 security problem either;
either one would show some additional tcp traffic.

What's the problem?  Not FreeBSD at all, it's the new version of XFree86
that you upgraded to when you upgraded FreeBSD.  There is a server option,
-nolisten-tcp.  If you invoke it, the Xserver doesn't open the normal tcp
socket to listen on 6000.  That's not changed, it's the startx(1) shell
script that some folks use to start X that's been changed.  The script now
has a -listen_tcp (note the difference with the Xserver negative option
-nolisten_tcp).  If you fail to give the -listen_tcp option to startx,
then the default is for startx to begin the Xserver with the -nolisten_tcp
option, killing the socket that remote apps rely on.

The fix that I've found so far is either to start X with xdm (which
doesn't have that default off), to start startx with the -listen_tcp
option, or to edit the startx script to remove the -nolisten_tcp arg to
the Xserver invocation.

----------------------------------------------------------------------------
Chuck Robey         | Interests include C & Java programming, FreeBSD,
chuckr@chuckr.org   | electronics, communications, and signal processing.

New Year's Resolution:  I will not sphroxify gullible people into looking up
fictitious words in the dictionary.
----------------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021024203033.T353-100000>