[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: attach eshell to remote dtach session
From: |
Michael Albinus |
Subject: |
Re: attach eshell to remote dtach session |
Date: |
Wed, 09 Jan 2019 09:48:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Tijs Mallaerts <address@hidden> writes:
> Hi Michael,
Hi Tijs,
[Pls keep <address@hidden> in Cc, for the archives]
> Concerning dtach, with the following code snippet you can make a
> comint process to attach to a remote dtach session, and send commands
> to it from a local emacs instance:
>
> (make-comint "test-remote-dtach" "ssh" nil
> "-t" "-t" "remote-host"
> "dtach -a /tmp/detach.session -r none")
>
> (process-send-string (get-process "test-remote-dtach") "ls -l\n")
>
> I'm not sure if this could be of any help to implement something
> similar for eshell/tramp?
This would work, of course. Your example is not complete, it assumes
that there is already a detached session running on socket
/tmp/detach.session. I suppose it is a shell, because you're sending
shell commands.
This approach isn't sufficient I guess. You can send any shell command
or program to be the remote shell, but these commands cannot read any
thing.
Furthermore, Tramp would need to perform a kind of bookkeeping, which
detached sessions are available on the remote host. I doubt users will
accept midterm, that only one detached session, with a hard coded socket
path, are available on a given remote host.
> Thanks again!
> Tijs
Best regards, Michael.