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?

Daniel
  • 3,563
  • 16
  • 41

1 Answers1

2

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

if [[ $TERM = dumb ]]; then
    return
fi
Daniel
  • 3,563
  • 16
  • 41