emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Executing org shell blocks on remote machine over ssh


From: Andreas Leha
Subject: Re: [O] Executing org shell blocks on remote machine over ssh
Date: Tue, 18 Nov 2014 15:55:52 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin)

Hi Myles,

Myles English <address@hidden> 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 /address@hidden
> 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




reply via email to

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