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

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

ls -al

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


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

if [[ $TERM = dumb ]]; then

Your Answer

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

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