[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Executing org shell blocks on remote machine over ssh
From: |
Brett Viren |
Subject: |
Re: [O] Executing org shell blocks on remote machine over ssh |
Date: |
Tue, 18 Nov 2014 10:43:24 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
David Bjergaard <address@hidden> writes:
> 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.
Is it just complicated, or is it also prohibitively long-running?
If just the former, you could maybe bundle the setup into some shell
script and source it in each of your sh source blocks. Eg:
#+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
/bin/pwd
echo $HOSTNAME
ls -l foo.sh
echo "---"
cat foo.sh
echo "---"
source ./foo.sh
echo $FOO
#+END_SRC
#+RESULTS:
: /home/bviren
: lycastus
: -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
: ---
: export FOO=bar
:
: ---
: bar
If the setup is purely environmental, and it takes a long time to
perform, maybe you could do the set up once and then cache the resulting
environment using the output of "env".
-Brett.
pgpjapwApeQxH.pgp
Description: PGP signature
- [O] Executing org shell blocks on remote machine over ssh, David Bjergaard, 2014/11/17
- Re: [O] Executing org shell blocks on remote machine over ssh, Myles English, 2014/11/17
- Re: [O] Executing org shell blocks on remote machine over ssh,
Brett Viren <=
- Re: [O] Executing org shell blocks on remote machine over ssh, Ista Zahn, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, David Bjergaard, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, Ista Zahn, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, Brett Viren, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, Subhan Michael Tindall, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, Brady Trainor, 2014/11/18
- Re: [O] Executing org shell blocks on remote machine over ssh, Andreas Leha, 2014/11/18