1

I'm using org-mode and doing an ssh multihop into a remote server from our faculty.

:PROPERTIES:
:header-args: :dir "/ssh:user@remote|ssh:user@remote2:/home/user"
:END:

#+BEGIN_SRC sh
ls -al
#+END_SRC

I notice that Tramp hangs forever and then quits with a "File not found" error when trying to read back results into the org-buffer. I also notice that the problem goes away when I remove my .bashrc file on the remote server.

I fear that the problem has to do with my PS1 and PS2 prompt settings on the remote, because they contain some escape sequences to change the prompt coloring - which I believe Tramp doesn't understand.

Is there a way to ask Tramp not to read my .bashrc?! Is that even possible? Do you guys have any recommendation on the best way to approach my problem?

1 Answer 1

2

The solution is to add the following lines to your .bashrc:

if [[ $TERM = dumb ]]; then
    return
fi
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.