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: Stefan Monnier
Subject: Re: CVS trunk emacsclient: X11 connection rejected
Date: Mon, 29 Oct 2007 15:16:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>>> I did try a test with an unset XAUTHORITY:
>> 
host1> XAUTHORITY= emacs -Q -f server-start &
host1> ssh host2
host2> ssh host1 emacsclient --no-wait $PWD/README
>> 
>>> and it didn't seem to help.

> OK, so the above definitely doesn't change anything, I still get "X11
> connection rejected".

> If instead I unset XAUTHORITY before starting Emacs, or set it to
> ~/.Xauthority, then `ssh host2' warns "No xauth data; using fake
> authentication data for X11 forwarding.".

If you do

   host1> XAUTHORITY= xterm

is an xterm created?
What does `xhost' say?

> emacs, etc. Now the emacsclient command (with no display option) shows
> the behaviour of popping up a new frame of the server Emacs showing
> scratch, and not visiting the specified file at all.

That's good: the separate frame is normal (it's because the
emacsclient uses display "localhost:10.0" which Emacs can't know is
the same as display ":0.0"), and the "2 frames but no file" problem is
"known" (you already reported it) and is unrelated to X11
connection problems.

>> What happens if you do
host2> ssh host1
host1> echo "$DISPLAY"

> Is that meant to be that way round? I should have used better names
> than "host1", "host2". :)

I meant just that: assuminh you already have a shell on host2 (probably
via ssh), that was meant to say: do "ssh host1" to log back onto the
local computer.  And in this new interactive shell use `echo "$DISPLAY"'
to get the display number chosen by ssh.  The interactive shell is also
used just to keep the connection open.

host1> ssh host2
host2> ssh host1 'echo $DISPLAY'   # localhost:10.0
host2> emacs -Q --eval '(make-frame-on-display "localhost:10.0")'
> then it works.

Huh?  Really?  How can it?  `localhost:10.0' proxy display should be
created by the `ssh host1' and destroyed as soon as `ssh
host1' terminates.  Maybe it's a side effect of the connection sharing
feature of "recent" OpenSSH?


        Stefan




reply via email to

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