help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: emacsclient over ssh


From: Harry Putnam
Subject: Re: emacsclient over ssh
Date: Thu, 25 Jun 2009 06:38:37 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.95 (gnu/linux)

tomas@tuxteam.de writes:

> On Wed, Jun 24, 2009 at 11:47:19PM -0500, Harry Putnam wrote:
>
> [...]
>
>> Well, like I mentioned in OP.. I want to be able to tap into a gnus
>> session running on the remote...You can't do that with tramp [...]
>
>> Various other aggravations too.
>
> Have you thought of tunneling the emacs client <--> server connection
> through SSH?
>
> Not tried yet, and I'm not sure whether there is'nt any better way --
> (gurus invited to chime-in ;-) but that is a rough sketch of how I would
> proceed:
>
>   (1) Start Emacs server on your server machine, tell it to listen on TCP:
>         emacs --daemon --eval '(setq server-use-tcp t)'
>       (of course, typically you wouldn't use --eval in the command line,
>       but rather put (setq ...) into some suitable startup file)
>       Now the Emacs daemon is running and accepting connections via tcp.
>       Maybe you can access it directly from your local network. If
>       security is enough, you might skip step (3).
>
>   (2) Transfer the file ~/.emacs.d/server/server to your client machine.
>       It contains (among other things) a cookie which the client has to
>       present to the server to appease the dogs at its entrance.
>
>   (3) Among those "other things" there is a server address and port
>       number. With some shell magic, create a shell command along the
>       lines of 
>         ssh -Llocalhost:<localport>:localhost:<emacsport> 
> <youruser@yourserver>
>       where you choose <localport> and extract <emacsport> from the file
>       in (2) above
>       Note that this step is only strictly necessary if you don't want
>       to have your Emacs server listening in your home net (you'll have
>       to dissuade it from doing so by some other means, though).
>
>   (4) Give your client in the client machine the server cookie from (2).
>       If you have done (3) and if <localport> and <emacsport> differ,
>       you might have to edit the cookie file:
>         emacsclient --server-file <the cookie from (2), edited if necessary>
>
> Of course, if you are more fluent in elisp, you might substitute the
> shell magic above with sufficient elisp magic. It's just more magic.
>
>   (5) Let us know whether that works ;-)

Ahhh no... I think I'll pass.  A simple edit in /etc/sshd_config was
all I needed.





reply via email to

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