[Top][All Lists]

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

Re: tramp execute org-mode code-block on remote server

From: Michael Albinus
Subject: Re: tramp execute org-mode code-block on remote server
Date: Fri, 31 Jan 2020 13:59:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

sromanz <address@hidden> writes:

> Hi


> I am using emacs 26.1 on MacOS and tramp  I would like to run
> scripts on a remote server running Ubuntu 18.04. Tramp works very well and
> runs the scripts, however, since I am working in bash, all path definitions
> are not read. I have tried to set the tramp-methods variable with the
> following command in my configuration file (as found in this mailing list)
> (setcdr (assoc 'tramp-remote-shell (assoc "ssh" tramp-methods))
> '("/bin/bash"))
> however I was not successful.

This is a good approach for getting bash on the remote side. However,
the recommended way to get this is

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-connection-properties
             (list (regexp-quote "/ssh:address@hidden.domain:")
                   "remote-shell" "/bin/bash"))
--8<---------------cut here---------------end--------------->8---

With this approach, you could even specify the remote host which shall
run bash.

However, this does not give you your path environment from .profile and
friends. In order to get it, you must add the symbol
`tramp-own-remote-path', like.

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
--8<---------------cut here---------------end--------------->8---

> Is there anything else that I might try?

Reading the Tramp manual? All of this is described there ...

Best regards, Michael.

reply via email to

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