From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: Executing org shell blocks on remote machine over ssh
Date: Tue, 18 Nov 2014 15:55:52 +0000 [thread overview]
Message-ID: <olu7fyscxkn.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 87egt1xwkl.fsf@gmail.com
Hi Myles,
Myles English <mylesenglish@gmail.com> writes:
> Hi Dave,
>
> David Bjergaard writes:
>
>> Hi All,
>>
>> I'm sorry if this has been covered before, I've been searching for a
>> while and haven't found anything.
>>
>> I use org mode as a lab notebook. I write org-src blocks to keep track
>> of tasks I do at the command line, and then I copy paste them into the
>> terminal. I would really like to hit "C-c C-c" on the source block and
>> have it executed on the remote machine. I know that you can specify
>> the remote machine according to [1], however the software I use requires
>> a fairly complicated setup to get going.
>>
>> Ideally what I would have is my org-src blocks and another window with
>> the ssh terminal open. Then hitting "C-c C-c" would execute the block
>> over a shared ssh connection and I could see the results in the other
>> window (quasi-interactively). Is that possible?
>>
>> Thanks for your time!
>>
>> Dave
>>
>> Footnotes:
>> [1] http://home.fnal.gov/~neilsen/notebook/orgExamples/org-examples.html#sec-16
>
> I had a quick go at this but get tramp errors. I think you need a
> terminal multiplexer e.g. tmux or screen.
>
> In a terminal, connect using ssh (or mosh) then type 'tmux' to start a
> new session or 'tmux attach' to attach to an existing one.
>
> I would have thought that this should have worked, i.e. that the output
> would have showed up in the terminal and in the buffer:
>
> #+BEGIN_SRC sh :prologue "tmux attach" :dir /myles@myhost.biz
> echo $PWD
> echo $HOSTNAME
> #+END_SRC
>
> Hope this is on the right track..
I hope so, too, because I would be very interested in that, i.e. running
stuff from orgmode within a (remote or not remote) tmux session.
I do not have time to play with this right now, but I think, the
prologue should not be 'tmux attach' but rather something along 'tmux
paste-buffer'
Best,
Andreas
next prev parent reply other threads:[~2014-11-18 15:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 16:04 Executing org shell blocks on remote machine over ssh David Bjergaard
2014-11-17 22:50 ` Myles English
2014-11-18 15:55 ` Andreas Leha [this message]
2014-11-18 15:43 ` Brett Viren
2014-11-18 18:12 ` Ista Zahn
2014-11-18 18:23 ` David Bjergaard
2014-11-18 18:31 ` Ista Zahn
2014-11-18 19:03 ` Brett Viren
2014-11-18 19:52 ` Subhan Michael Tindall
2014-11-18 20:58 ` Brady Trainor
2014-11-18 22:01 ` Andreas Leha
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=olu7fyscxkn.fsf@med.uni-goettingen.de \
--to=andreas.leha@med.uni-goettingen.de \
--cc=emacs-orgmode@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).