Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Local frame for a remote emacs

5 views
Skip to first unread message

Jason Sewall

unread,
Nov 6, 2009, 12:00:55 AM11/6/09
to help-gn...@gnu.org
I posted this to comp.emacs earlier, but it seems pretty quiet there,
so I thought I'd try this list:

I've been trying to get emacs to let me open a local frame to an
already-running emacs for a while now, and I can't seem to make it
work. This is with emacs 23.

I start emacs --daemon on my desktop machine, then on my laptop, I run
ssh -X <desktop> -f emacsclient -c. I get the following response:

"X11 connection rejected because of wrong authentication

*ERROR*: Display localhost:10.0 can't be opened"

I don't claim to be an expert in xauth, but I've never had any trouble
with running ssh -X on these machines.

ssh -X <desktop> -f emacs works fine
ssh <desktop> -f emacsclient -t works fine
ssh -X <desktop> -f emacsclient --eval '"(make-frame-on-display
\"$DISPLAY"\)"' gives the same rejection as emacsclient -c

In terms of X and, what are these commands doing differently? Is the
$DISPLAY that emacs --daemon is started in somehow causing the remote
access to fail?

Any ideas? I've done a bit of Googling and I can't seem to find a good
answer. Any thoughts here?

Jason


Peter Dyballa

unread,
Nov 6, 2009, 12:10:59 PM11/6/09
to Jason Sewall, help-gn...@gnu.org

Am 06.11.2009 um 06:00 schrieb Jason Sewall:

> "X11 connection rejected because of wrong authentication
>
> *ERROR*: Display localhost:10.0 can't be opened"
>

> ...


> In terms of X and, what are these commands doing differently? Is the
> $DISPLAY that emacs --daemon is started in somehow causing the remote
> access to fail?
>
> Any ideas?


How about:

xhost localhost:10.0

It might also work to leave away the ":10.0" part. The command allows
access from your local machine's nominal display #10, screen #0 on
the display (usually 0) on which you are working. Leaving away that ":
10.0" specifier would allow every X related process running on your
computer to connect to your X server.

The ssh protocols have extra options for (port) re-direction...

I'm neither no X authorisation expert...

--
Greetings

Pete

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
-Benjamin Franklin, Historical Review of Pennsylvania.

Jason Sewall

unread,
Nov 6, 2009, 1:38:17 PM11/6/09
to Peter Dyballa, help-gn...@gnu.org
On Fri, Nov 6, 2009 at 12:10 PM, Peter Dyballa <Peter_...@web.de> wrote:
> How about:
>
>        xhost localhost:10.0

This syntax is not understood by my xhost (1.0.2) and I have reason to
believe that it is not possible to specify a display like that; in the
'bugs' section, it says:

"You can’t specify a display on the command line because -display is a
valid command line argument (indicating that you want to remove the
machine named ‘‘display’’ from the access list)."

> It might also work to leave away the ":10.0" part. The command allows access
> from your local machine's nominal display #10, screen #0 on the display
> (usually 0) on which you are working. Leaving away that ":10.0" specifier
> would allow every X related process running on your computer to connect to
> your X server.
>
> The ssh protocols have extra options for (port) re-direction...
>
> I'm neither no X authorisation expert...

Since I have no problem getting remote windows to open on my laptop's
display (xterm&, emacs&, etc) with the same remote client, I feel like
the issue is that emacsclient -c is doing something different in
redirecting the display. Do you folk think a post to emacs-devel would
be useful? Do you know who spearheaded the emacsclient -c development?

Thanks for your help,
Jason


0 new messages