From: Anselm Helbig <anselm.helbig+news2009@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Using tramp to connect to a remote emacs session
Date: Thu, 03 Sep 2009 18:34:50 +0200 [thread overview]
Message-ID: <87zl9cc7h1.wl%anselm.helbig+news2009@googlemail.com> (raw)
In-Reply-To: <mailman.5952.1251993987.2239.help-gnu-emacs@gnu.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]
At Thu, 03 Sep 2009 09:06:16 -0700,
Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
>
> Hi Peter,
>
> On Thursday 03 September 2009 01:02 AM, Peter Dyballa wrote:
> >
> > Am 03.09.2009 um 01:06 schrieb Suvayu Ali:
> >
> >> So far only reference I found was,
> >>
> >>> Using emacsclient to make a new frame of a remote Emacs 22 on a local
> >>> display
> >>> ssh remote_host -f emacsclient --eval ‘”(make-frame-on-display
> >>> \”$DISPLAY\”)”’
> >>
> >> in the emacswiki[1]. Firstly I don't understand how this works, and
> >> blindly copy-pasting this to the terminal didn't work either. Some
> >> help would be greatly appreciated. :)
> >
> >
> > Ssh opens a connection to remote_host and logs you in. The option -f
> > puts ssh into the background allowing to launch an X client. This one is
> > emacsclient, which is asked to evaluate some Lisp. This Lisp code is
> > make-frame-on-display, which makes GNU Emacs open (create) a new frame
> > on the specified screen as given by the environment variable DISPLAY. On
> > the remote host DISPLAY should point to your local screen and its X
> > server. So the remote GNU Emacs daemon or server will open a frame as an
> > X client of your local display's X server and communicate with it via
> > the SSH tunnel.
> >
> >
> > If this does not work you can start to debug ssh, but particularly allow
> > (trusted) X11 forwarding in the configuration of the SSH server on the
> > remote host. Your local X server must be informed to accept connections
> > from the remote host.
> >
>
> Thanks for the very clear explanation Pete. :) I had a hunch it is
> something like X-forwarding. I don't really like to do X-forwarding, the
> interface is usually very unresponsive. I would rather go with `emacs -nw'.
If you want to connect to a remote emacs but don't want to do X
forwarding, then you can do either
- start emacs with the --daemon option on the remote host; you can
now connect to the running emacs instance with `emacsclient -t'
which will give you an emacs terminal frame. Which will, of
course, work over ssh as well. You can still get a X frame if you
like by not using -t. This requires Emacs 23 to work.
- the obvious solution: use GNU screen or a similar tool (dtach,
tmux, ...), start your console mode emacs in there and reconnect
as necessary. Works with any version of emacs, obviously.
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
next prev parent reply other threads:[~2009-09-03 16:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 23:06 Using tramp to connect to a remote emacs session Suvayu Ali
2009-09-03 8:02 ` Peter Dyballa
2009-09-03 16:06 ` Suvayu Ali
[not found] ` <mailman.5952.1251993987.2239.help-gnu-emacs@gnu.org>
2009-09-03 16:34 ` Anselm Helbig [this message]
2009-09-04 3:17 ` Suvayu Ali
[not found] ` <mailman.5986.1252034254.2239.help-gnu-emacs@gnu.org>
2009-09-04 3:27 ` Benjamin Andresen
2009-09-04 11:17 ` Suvayu Ali
2009-09-04 11:19 ` Suvayu Ali
2009-09-03 13:08 ` Michael Albinus
2009-09-03 16:01 ` Suvayu Ali
2009-09-04 7:03 ` Michael Albinus
2009-09-04 11:05 ` Suvayu Ali
2009-09-04 11:37 ` Michael Albinus
2009-09-05 5:29 ` Suvayu Ali
[not found] ` <mailman.5940.1251983344.2239.help-gnu-emacs@gnu.org>
2009-09-03 17:50 ` Benjamin Andresen
2009-09-04 11:12 ` Suvayu Ali
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=87zl9cc7h1.wl%anselm.helbig+news2009@googlemail.com \
--to=anselm.helbig+news2009@googlemail.com \
--cc=help-gnu-emacs@gnu.org \
/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).