From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain Rousseau Subject: Re: Is it possible to run shell script src blocks as root or to export individual blocks? Date: Sun, 4 Mar 2012 18:29:48 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d043c81bc197dd604ba6e28cf Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4FFp-0003WS-8Z for emacs-orgmode@gnu.org; Sun, 04 Mar 2012 12:29:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4FFn-00010h-Kn for emacs-orgmode@gnu.org; Sun, 04 Mar 2012 12:29:52 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:61199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4FFn-00010I-Bk for emacs-orgmode@gnu.org; Sun, 04 Mar 2012 12:29:51 -0500 Received: by wibhi20 with SMTP id hi20so2005964wib.0 for ; Sun, 04 Mar 2012 09:29:48 -0800 (PST) In-Reply-To: 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: Leo Alekseyev Cc: Emacs orgmode --f46d043c81bc197dd604ba6e28cf Content-Type: text/plain; charset=ISO-8859-1 Under Gnome, I'm using this at the beginning of a sh source block: echo -e "#! /bin/bash\n/usr/bin/gksudo -p -m Password" > /tmp/gksudo-stdout chmod +x /tmp/gksudo-stdout SUDO_ASKPASS="/tmp/gksudo-stdout" sudo -A -s Sylvain. --f46d043c81bc197dd604ba6e28cf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Under Gnome, I'm using this at the beginning of a sh source block:
<= br>=A0echo -e "#! /bin/bash\n/usr/bin/gksudo -p -m Password" >= /tmp/gksudo-stdout
=A0chmod +x /tmp/gksudo-stdout
=A0SUDO_ASKPASS=3D= "/tmp/gksudo-stdout" sudo -A -s


Sylvain.
--f46d043c81bc197dd604ba6e28cf--