From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: CVS trunk emacsclient: X11 connection rejected
Date: Fri, 26 Oct 2007 22:43:38 -0400 [thread overview]
Message-ID: <qik5p9qntx.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvabq5qse2.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 26 Oct 2007 22:16:13 -0400")
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
next prev parent reply other threads:[~2007-10-27 2:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 0:57 CVS trunk emacsclient: X11 connection rejected Glenn Morris
2007-10-26 5:24 ` Stefan Monnier
2007-10-27 0:44 ` Glenn Morris
2007-10-27 2:16 ` Stefan Monnier
2007-10-27 2:43 ` Glenn Morris [this message]
2007-10-27 3:04 ` Stefan Monnier
2007-10-27 3:33 ` Glenn Morris
2007-10-27 19:51 ` Stefan Monnier
2007-10-29 17:57 ` Glenn Morris
2007-10-29 18:02 ` Glenn Morris
2007-10-29 19:16 ` Stefan Monnier
2007-10-29 20:25 ` Glenn Morris
2007-10-29 21:01 ` Stefan Monnier
2007-10-29 22:03 ` Glenn Morris
2007-10-30 2:01 ` Stefan Monnier
2007-10-26 5:41 ` Jan Djärv
2007-10-27 0:47 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=qik5p9qntx.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.