Re: What does "X11UseLocalhost no" do?



Randy Yates <yates@xxxxxxxx> writes:
Neil W Rickert <phishing@xxxxxxxxxx> writes:

$ xterm
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).

Checking "netstat" output should help. You should see a listener
on port 6010 for your DISPLAY value.

[dc_admin@uspsdata ~]$ netstat -an
netstat: kvm not available
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 200.46.204.173.6010 *.* LISTEN

Weird. Have you tried setting $DISPLAY to "200.46.204.173:10"?

Or does "localhost" resolve to "200.46.204.173" when you do an IP
address lookup on your system? Or were you using "X11UseLocalhost
no" when you did that "netstat"?

If there is a listener, but you are
not authenticating properly to the X-server, then something is
funky about .Xauthority or whatever file xauth is using.

That seems to be your problem.

Do you mean .Xauthority.dst? How would I investigate/fix

Try

xauth list

It should list the correct file. (Don't post the data).

And why does placing "X11UseLocalhost no"
make it work?

With the default "X11UseLocalhost yes", the xauth data for my
connection looks like

hostname/unix:10 MIT-MAGIC-COOKIE-1 0000000000000000000000000000000

(I changed the numeric data to all 0s to suppress the actual value, and
I replaced the actual hostname with the numeric value).

If I were to use "X11UseLocalhost no", then instead, it would say:

hostname:10 MIT-MAGIC-COOKIE-1 0000000000000000000000000000000

The use of "hostname/unix:10" might not be supported by older
X11 software. Instead, it might be looking for an entry for
"localhost:10". If you have that problem, you could try

xauth add localhost:10 MIT-MAGIC-COOKIE-1 0000000000000000000000000000000

to see if that works. Replace the string of zeros by the actual value
that xauth lists for the "hostname/unix:10" line.

If that happens to fix your problem, you could probably add lines
in ".profile" to do the fixup whenever you login.

Thanks Neil. By the way, do you know of a good tutorial on X11
operation/security? This .Xauthority file and xhosts and xauth and
blah-blah-blah constantly confuse me and I've never really understood
it all.

Off hand, no. I normally use the man pages for that kind of info.
But there is probably a decent web site somewhere.

The wikipedia entry

http://en.wikipedia.org/wiki/X_Window_System

might be a good starting point.

.



Relevant Pages

  • Re: Cant login anymore since an update
    ... The application 'gnome-session' lost its connection to the display:0.0; ... most likely the X server was shut down or you killed/destroyed the application. ...
    (Debian-User)
  • Cant login anymore since an update
    ... The application 'gnome-session' lost its connection to the display:0.0; ... most likely the X server was shut down or you killed/destroyed ...
    (Debian-User)
  • Re: Need help from an X guru!
    ... most likely the X server was shut down or you killed/destroyed ... The application 'rhn-applet' lost its connection to the display:0.0; ...
    (RedHat)
  • Re: Run X client with ssh tunnel after su
    ... || connection is the thing that makes me able to display locally an X app ... You can run xauth nlist $DISPLAY to select the cookie that goes with ...
    (comp.os.linux.x)
  • Catching server kill in GTK2
    ... When you Ctrl-Alt-Backspace the X server (or it crashes, or quits, or you ... GTK2 outputs "The application 'irb' lost its connection ... to the display:0.0; most likely the X server was shut down or you ...
    (comp.os.linux.development.apps)