Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Local frame for a remote emacs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jason  
View profile  
 More options Nov 5, 10:48 am
Newsgroups: comp.emacs
From: jason <jasonsew...@gmail.com>
Date: Thu, 5 Nov 2009 07:48:02 -0800 (PST)
Local: Thurs, Nov 5 2009 10:48 am
Subject: Local frame for a remote emacs
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?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Golden  
View profile  
 More options Nov 7, 12:23 pm
Newsgroups: comp.emacs
From: David Golden <david.gol...@oceanfree.net>
Date: Sat, 07 Nov 2009 17:23:09 +0000
Local: Sat, Nov 7 2009 12:23 pm
Subject: Re: Local frame for a remote emacs

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

ssh manages xauth, injecting a token for the proxied X11 connection (try
ssh -X to a shell somewhere, then do an "xauth list").  I would guess
the persistent emacs doesn't have the new token, due to using an old
version of the xauth database or a different xauth database. Or
something.  Usually, the xauth database is in ~/.Xauthority so
everything ends up sharing it, but it is certainly possible for
different sessions to wind up with different ones.

Anyway, hairy, and the right thing to do might be for emacsclient/emacs
to handle this transparently, but right now you could maybe try blindly
adding any available tokens to whatever xauth database the persistent
emacs daemon thinks it's using.

ssh -X localhost -f "xauth nlist >~/.xauth-formerge && emacsclient
--eval '(call-process-shell-command \"xauth nmerge ~/.xauth-formerge\")'
&&  emacsclient -c"

Worth a shot anyway. If it works, maybe you could file an emacs bug
requesting xauth token handling be improved.

[Myself, I tend to just use tramp to open remote files in a local emacs
over ssh rather than fecking around with X forwarding]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Golden  
View profile  
 More options Nov 7, 12:25 pm
Newsgroups: comp.emacs
From: David Golden <david.gol...@oceanfree.net>
Date: Sat, 07 Nov 2009 17:25:06 +0000
Local: Sat, Nov 7 2009 12:25 pm
Subject: Re: Local frame for a remote emacs

David Golden wrote:
> ssh -X localhost

replacing localhost by your <desktop>, sorry (I tested locally before
suggesting it)

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google