emacs-devel
[Top][All Lists]
Advanced

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

Re: CVS trunk emacsclient: X11 connection rejected


From: Glenn Morris
Subject: Re: CVS trunk emacsclient: X11 connection rejected
Date: Fri, 26 Oct 2007 22:43:38 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

>> Should I be trying to debug ssh or Emacs, or both? `ssh -vvv' doesn't
>> tell me much. Some snippets:
>
> Both?

OK; I don't really know what to do with the server though.

> I'm not sure i understand what the above refers to.  Does the debug output
> correspond to a run of `ssh' where ssh runs `emasclient' where the second
> one runs `xterm'?

All the debug output corresponds to ssh running emacsclient. There's a
gap in the middle where I snipped irrelevant info. The debug output
when running xterm is basically the same, without the error at the end.

> What about an `ssh -vvv' that runs `emacs'?

As above, but followed by some stuff that looks like opening and
closing windows and is probably irrevelant. Continuing from where the
last log left off:

debug1: confirm x11
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: channel 1: will not send data after close
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: x11, nchannels 2
debug3: channel 1: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)
  #1 x11 (t4 r2 i3/0 o3/0 fd 7/7 cfd -1)

debug3: channel 1: close_fds r 7 w 7 e -1 c -1
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max
16384
debug1: client_request_x11: request from 127.0.0.1 54950
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: channel 1: will not send data after close
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: x11, nchannels 2
debug3: channel 1: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)
  #1 x11 (t4 r2 i3/0 o3/0 fd 7/7 cfd -1)

debug3: channel 1: close_fds r 7 w 7 e -1 c -1
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max
16384
debug1: client_request_x11: request from 127.0.0.1 54951
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11

[Emacs ready for use at this point]

> Can you check the .Xauthority file and XAUTHORITY envvars?

On host1, XAUTHORITY=/tmp/.gdmES6K0T. This file has not been updated
for a few hours. There is a separate ~/.Xauthority file, which is
updated by ssh running emacsclient, emacs or xterm.

On host2, XAUTHORITY is unset.

> Basically compare their value in the `emacs' process from their
> value at the other end of the `ssh' tunnel: ssh normally creates a
> new Xauthority cookie for the "localhost:10" proxy display. It can
> then either place it in ~/.Xauthority or in some other file, in
> which case it needs to set the XAUTHORITY envvar, but then the
> `emacs' process won't know about it.

ssh is definitely placing things in ~/.Xauthority.

Starting my server Emacs on host1 with an empty XAUTHORITY does not help.

> This is probably because your current DISPLAY is not ":0" but
> something slightly different, like ":0.0".

You are exactly right. :)

> Take a look at M-: (frame-parameter nil 'display) RET and then try
> the above test with that display argument.

It works.

> server.el should probably try to normalize the DISPLAY value, but
> I'm not sure what kind of normalization should be performed, so if
> you can tell us what is your situation, maybe we can get the code to
> DTRT for you.

On host1, DISPLAY = :0.0
On host2, DISPLAY = localhost:10.0

> That's a bug. What happens to the frame that pops up? Does it stick
> around, displaying some unrelated buffer? Or does it disappear? Is
> the buffer displayed elsewhere? Is the buffer not displayed but kept
> (i.e. it appears in the buffer list)?

The frame that pops up persists, displaying the `*scratch*' buffer.
The README file does not appear in the buffer-list at all.
There's no indication Emacs has tried to visit it (nothing in Messages).
The frame that pops up has (frame-parameter nil 'display) == :0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]