[Top][All Lists]

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

Re: Cannot execute org babel shell script over tramp to remote termux (A

From: Michael Albinus
Subject: Re: Cannot execute org babel shell script over tramp to remote termux (Android) due to tmpdir issues
Date: Thu, 05 Jul 2018 18:48:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Matt Mello <address@hidden> writes:

Hi Matt,

> When I hit C-c C-c in the bash script, it attempts to run it on the
> remote termux/Android environment and always gives this error:
> "
> Tramp: Decoding remote file ‘/scp:phone#8022:/tmp/ob-input-NNFaG8’
> using ‘base64 -d -i >%s’...failed
> tramp-file-name-handler: Couldn’t write region to
> ‘/scp:phone#8022:/tmp/ob-input-NNFaG8’, decode using ‘base64 -d -i
>>%s’ failed
> "
> I noticed in
> that the following is recommended:
> "
> When the Android device is not ‘rooted’, specify a writable directory
> for temporary files:
>      (add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME")
> "
> So, I have added that to my init script, but I still get the error.
> No matter what I do, tramp always has tramp-tmpdir set to /tmp.

Setting a remote $TMPDIR is good for the programs which run on a remote
host. Tramp itself does not use $TMPDIR on that remote machine, because
it must now about the location of a remote tmpdir much earlier.

Tramp can be configured to use a dedicated temporary directory on a
remote host. See
for information how connection related information could be
specified. In your case, I would try

(add-to-list 'tramp-connection-properties
             (list (regexp-quote "/scp:phone#8022:")
                   "tmpdir" "/path/to/tmpdir"))

If this doean't help, set `tramp-verbose' to 6, and show the resulting
Tramp debug buffer.

> Thanks!
> --- Matt

Best regards, Michael.

reply via email to

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