Hi Myles, Myles English <mylesengl...@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 /my...@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