Hello,
Michael Albinus <michael.albi...@gmx.de> writes: > Bartosz Kaczyński <bkaczyn...@posteo.net> writes: > >> >> To work around this, I have tried forcing the remote shell to be >> interactive by modifying the TRAMP settings: >> If you use a session (org babel), Org will make an interactive session (bash), and bash will read the '.bashrc'. Using heading properties, you could do something like: * your heading :PROPERTIES: :header-args:shell: :dir /ssh:user@remotesrv|sudo:serviceuser@remotesrv: :header-args:shell+: :session "!sh serviceuser" :END: #+begin_src shell systemctl --user daemon-reload #+end_src #+begin_src shell an other command #+end_src Without a session, Org is executing the code in a non-interactive way (bash -c), and the ".bashrc" file isn't loaded. If an org babel session is not an option for you, you might consider asking to the org mailing list, to have better answers from org experts (as it looks like TRAMP is just doing what Org is asking for). HTH, Bruno