unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tomas@tuxteam.de
To: Harry Putnam <reader@newsguy.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: emacsclient over ssh
Date: Thu, 25 Jun 2009 09:28:24 +0200	[thread overview]
Message-ID: <20090625072824.GA6456@tomas> (raw)
In-Reply-To: <87k530538o.fsf@newsguy.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 ;-)

Regards
- -- tomás

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKQycYBcgs9XrR2kYRAiEzAJ0Rk/Vj0hiR15Qw1/dp49YUBFIb+QCffpcc
rbEd283dkeQc2B3rJ0jdfRM=
=Gl3r
-----END PGP SIGNATURE-----




  reply	other threads:[~2009-06-25  7:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1165.1245793203.2239.help-gnu-emacs@gnu.org>
2009-06-23 22:09 ` emacsclient over ssh Richard Riley
2009-06-23 23:13   ` suvayu ali
     [not found]   ` <mailman.1178.1245818812.2239.help-gnu-emacs@gnu.org>
2009-06-24 10:40     ` Richard Riley
2009-06-24  7:49 ` Tim X
2009-06-24  8:32 ` Josef G. Bauer
2009-06-24 12:13 ` Anselm Helbig
2009-06-25  4:47   ` Harry Putnam
2009-06-25  7:28     ` tomas [this message]
2009-06-25 11:38       ` Harry Putnam
     [not found]     ` <mailman.1230.1245914729.2239.help-gnu-emacs@gnu.org>
2009-06-25 11:13       ` Richard Riley
2009-06-25 12:20         ` tomas
     [not found]         ` <mailman.1238.1245932253.2239.help-gnu-emacs@gnu.org>
2009-06-25 12:47           ` Richard Riley
2009-06-25 12:49             ` Richard Riley
2009-06-23 21:39 Harry Putnam

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090625072824.GA6456@tomas \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=reader@newsguy.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).