From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: Executing org shell blocks on remote machine over ssh Date: Tue, 18 Nov 2014 10:43:24 -0500 Message-ID: References: <874mtxx18q.fsf@duke.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xqkwb-0004ol-Qc for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 10:43:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqkwW-0002ht-BZ for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 10:43:53 -0500 Received: from smtpgw.bnl.gov ([2620:10a:0:3::30]:13347 helo=iron4.sec.bnl.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqkwW-0002dF-81 for emacs-orgmode@gnu.org; Tue, 18 Nov 2014 10:43:48 -0500 In-Reply-To: <874mtxx18q.fsf@duke.edu> (David Bjergaard's message of "Mon, 17 Nov 2014 11:04:05 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Bjergaard Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable David Bjergaard 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.=20=20 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=3Dbar :=20 : --- : 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". =2DBrett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRraR0ACgkQEixH2Z0dKCyUOwCfShGaVgE84TjpJSkYwKXU+rsI wkQAoKvstjkfHUH8bWLcClrCAyGqn9n1 =JUOi -----END PGP SIGNATURE----- --=-=-=--