Tramp using ssh is not .bash_profile / .profile source

I use Aquamacs (graphical emacs for OSX using emacs 24 and tramp version 2.2.3) to edit some files on a remote server. Tramp is configured to use ssh and works great with file editing.

This fails when it comes to compilation because the compiler is not in the way. It appears that tramp does not contain any profile files, such as .profile or .bash_profile . / bin / sh is a link to / bin / bash, so bash should be the shell used by tramp. A shell running in emacs on a remote server will not be a source either. The ssh connection from a regular terminal emulator (tried by Terminal and X11 on OS X) works as expected (everything is correctly selected).

Any ideas?

+6
source share
1 answer

/ bin / sh is a link to / bin / bash, so bash should be the shell used by the tramp.

This is not the same. When called as "sh", it will behave like sh, not bash, so bash specific rc / profile files (for example ~ / .bash_profile, ~ / .bashrc) will not be received. However, the ~ / .profile file will be read. Your problem may be to use bash syntax to set stuff in your ~ / .profile.

This will not work:

export PATH=/some/path:$PATH 

But it will be:

 PATH=/some/path:$PATH export PATH 
+2
source

Source: https://habr.com/ru/post/914970/


All Articles